CMS 3D CMS Logo

autoCondPhase2.py
Go to the documentation of this file.
1 import six
2 from Configuration.StandardSequences.CondDBESSource_cff import GlobalTag as essource
3 connectionString = essource.connect.value()
4 
5 SiPixelLARecord = "SiPixelLorentzAngleRcd"
6 SiPixelSimLARecord = "SiPixelLorentzAngleSimRcd"
7 SiPixelGenErrorRecord = "SiPixelGenErrorDBObjectRcd"
8 SiPixelTemplatesRecord = "SiPixelTemplateDBObjectRcd"
9 SiPixel2DTemplatesRecord = "SiPixel2DTemplateDBObjectRcd"
10 
11 #combines in a single dict of dict the tags defined below
12 allTags={}
13 
14 
15 allTags["LA"] = {
16  'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T6_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
17  'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T14_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
18  'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_T15_v0_mc' ,SiPixelLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
19 }
20 
21 allTags["LAWidth"] = {
22  'T6' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T6_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
23  'T14' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T14_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
24  'T15' : ( ','.join( [ 'SiPixelLorentzAngle_phase2_forWidth_T15_v0_mc' ,SiPixelLARecord,connectionString, "forWidth", "2019-07-15 12:00:00.000"] ), ),
25 }
26 
27 allTags["SimLA"] = {
28  'T6' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T6_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
29  'T14' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T14_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
30  'T15' : ( ','.join( [ 'SiPixelSimLorentzAngle_phase2_T15_v0_mc' ,SiPixelSimLARecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
31 }
32 
33 
36 
37 allTags["GenError"] = {
38  'T6' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T6_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
39  'T14' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T14_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
40  'T15' : ( ','.join( [ 'SiPixelGenErrorDBOject_phase2_T15_v0_mc' ,SiPixelGenErrorRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
41 }
42 
43 allTags["Template"] = {
44  'T6' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T6_v0_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
45  'T14' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T14_v0_mc' ,SiPixelTemplatesRecord,connectionString, "", "2019-07-15 12:00:00.000"] ), ),
46  'T15' : ( ','.join( [ 'SiPixelTemplateDBObject_phase2_T15_v0_mc' ,SiPixelTemplatesRecord,connectionString, "" , "2019-07-15 12:00:00.000"] ), ),
47 }
48 
49 allTags["Template2Dnum"] = {
50  'T6' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T6_v0_num' ,SiPixel2DTemplatesRecord,connectionString, "numerator", "2019-07-15 12:00:00.000"] ), ),
51  'T14' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T14_v0_num' ,SiPixel2DTemplatesRecord,connectionString, "numerator", "2019-07-15 12:00:00.000"] ), ),
52  'T15' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T15_v0_num' ,SiPixel2DTemplatesRecord,connectionString, "numerator", "2019-07-15 12:00:00.000"] ), ),
53 }
54 
55 allTags["Template2Dden"] = {
56  'T6' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T6_v0_den' ,SiPixel2DTemplatesRecord,connectionString, "denominator", "2019-07-15 12:00:00.000"] ), ),
57  'T14' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T14_v0_den' ,SiPixel2DTemplatesRecord,connectionString, "denominator", "2019-07-15 12:00:00.000"] ), ),
58  'T15' : ( ','.join( [ 'SiPixel2DTemplateDBObject_phase2_T15_v0_den' ,SiPixel2DTemplatesRecord,connectionString, "denominator", "2019-07-15 12:00:00.000"] ), ),
59 }
60 
61 # list of active tags to be replaced
62 activeKeys = ["LA","LAWidth","SimLA"]
63 
64 # list of geometries supported
65 activeDets = ["T6","T14","T15"]
66 phase2GTs = {}
67 for det in activeDets:
68  appendedTags = ()
69  for key in activeKeys:
70  appendedTags += allTags[key][det]
71  phase2GTs["phase2_realistic_"+det] = ('phase2_realistic', appendedTags)
72 
73 # method called in autoAlCa
74 def autoCondPhase2(autoCond):
75  for key,val in six.iteritems(phase2GTs):
76  if len(val)==1 :
77  autoCond[key] = ( autoCond[val[0]] )
78  else:
79  autoCond[key] = ( autoCond[val[0]],) + val[1]
80 
81  return autoCond
def autoCondPhase2(autoCond)
All of the following conditions are not yet in active use, but will be activated in GT along the way...
static std::string join(char **cmd)
Definition: RemoteFile.cc:17