ATLAS Offline Software
JetTagCalibration/share/installDB.py
Go to the documentation of this file.
1 # python script to install the DB and the root files in the run area
2 # - first the local database should be created with the script defineDB.py
3 # - then this script can be run: python installLocalDB.py
4 # NB: if only a specific tagger is needed, change the folders list accordingly
5 # LV 2008/01/19
6 
7 
8 theCalibrationTag = "MyCalibV1"
9 
10 localRootFiles = True
11 print '---> Installing calibration files for b-tagging. Tag is ',theCalibrationTag
12 import os,commands,sys
13 
14 folders = [ 'IP1D','IP2D','IP3D','SV1','SV2','SoftMu','SoftEl','JetFitter','JetProb' ]
15 
16 jets = [ 'Cone4H1Topo','Cone4H1Tower','Cone7H1Topo','Cone7H1Tower','Kt4H1Topo','Kt4H1Tower','Kt6H1Topo','Kt6H1Tower','Cone4Truth','Cone7Truth','Kt4Truth','Kt6Truth' ]
17 
18 for folder in folders:
19  longname = 'BTagging'+theCalibrationTag+'_'+folder
20  if (folder != 'JetFitter'):
21  longname = longname + '.root'
22  if localRootFiles:
23  print '---> Inserting file ',longname
24  else:
25  print '---> Getting and inserting file ',longname
26  os.system('get_files -data '+longname)
27  os.system('coolHist_insertFileToCatalog.py '+longname)
28  else:
29  for jet in jets:
30  longname2 = longname+'_'+jet+'ParticleJets.root'
31  if localRootFiles:
32  print '---> Inserting file ',longname2
33  else:
34  print '---> Getting and inserting file ',longname2
35  os.system('get_files -data '+longname2)
36  os.system('coolHist_insertFileToCatalog.py '+longname2)
37