Skip to content

Commit

Permalink
Merge pull request cms-sw#30078 from mmusich/tkAllInOneSupportMultipl…
Browse files Browse the repository at this point in the history
…eTags_11_1_X

11.1.X  [Tracker Alignment] All-in-one tool support of multiple tags in user-inputed sqlite file
  • Loading branch information
cmsbuild authored Jun 3, 2020
2 parents 88b60b3 + 264f873 commit 1f9bca2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,12 @@ def getTagsMap(db):
con = conddblib.connect(url = conddblib.make_url(db))
session = con.session()
TAG = session.get_dbtype(conddblib.Tag)
q1 = session.query(TAG.object_type).order_by(TAG.name).all()[0]
q2 = session.query(TAG.name).order_by(TAG.name).all()[0]
dictionary = dict(zip(q1, q2))
dictionary = {}
for i in range(0,len(session.query(TAG.object_type).order_by(TAG.name).all())):
q1 = session.query(TAG.object_type).order_by(TAG.name).all()[i][0]
q2 = session.query(TAG.name).order_by(TAG.name).all()[i][0]
dictionary[q1]=q2

return dictionary

def clean_name(s):
Expand Down
2 changes: 2 additions & 0 deletions Alignment/OfflineValidation/test/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fi
## copy into local sqlite file the ideal alignment
echo "COPYING locally Ideal Alignment ..."
conddb --yes --db pro copy TrackerAlignment_Upgrade2017_design_v4 --destdb myfile.db
conddb --yes --db pro copy TrackerAlignmentErrorsExtended_Upgrade2017_design_v0 --destdb myfile.db

echo "GENERATING all-in-one tool configuration ..."
cat <<EOF >> validation_config.ini
Expand All @@ -29,6 +30,7 @@ style = 2001
title = express
globaltag = 92X_dataRun2_Express_v2
condition TrackerAlignmentRcd = sqlite_file:myfile.db,TrackerAlignment_Upgrade2017_design_v4
condition TrackerAlignmentErrorExtendedRcd = sqlite_file:myfile.db,TrackerAlignmentErrorsExtended_Upgrade2017_design_v0
color = 2
style = 2402
Expand Down

0 comments on commit 1f9bca2

Please sign in to comment.