CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
Eras.Eras Class Reference
Inheritance diagram for Eras.Eras:

Public Member Functions

def __init__
 
def addEra
 
def inspect
 
def inspectEra
 
def inspectModifier
 

Public Attributes

 pythonCfgLines
 

Detailed Description

Dummy container for all the cms.Modifier instances that config fragments
can use to selectively configure depending on what scenario is active.

Definition at line 5 of file Eras.py.

Constructor & Destructor Documentation

def Eras.Eras.__init__ (   self)

Definition at line 10 of file Eras.py.

10 
11  def __init__(self):
12  allEras=['Run1_pA',
13  'Run1_peripheralPbPb',
14  'Run2_50ns',
15  'Run2_50ns_HIPM',
16  'Run2_25ns',
17  'Run2_25ns_HIPM',
18  'Run2_25ns_peripheralPbPb',
19  'Run2_HI',
20  'Run2_2016',
21  'Run2_2016_HIPM',
22  'Run2_2016_trackingLowPU',
23  'Run2_2016_pA',
24  'Run2_2017',
25  'Run2_2017_noMkFit',
26  'Run2_2017_FastSim', #new modifier for Phase1 FastSim, skips the muon GEM sequence
27  'Run2_2017_trackingRun2',
28  'Run2_2017_trackingLowPU',
29  'Run2_2017_pp_on_XeXe',
30  'Run2_2017_ppRef',
31  'Run2_2018',
32  'Run2_2018_FastSim', #new modifier for Phase1 FastSim, skips the muon GEM sequence
33  'Run2_2018_pp_on_AA',
34  'Run2_2018_pp_on_AA_noHCALmitigation',
35  'Run2_2018_highBetaStar',
36  'Run2_2018_noMkFit',
37  'Run3',
38  'Run3_noMkFit',
39  'Run3_pp_on_PbPb',
40  'Run3_dd4hep',
41  'Run3_DDD',
42  'Phase2',
43  'Phase2C9',
44  'Phase2C10',
45  'Phase2C11',
46  'Phase2C12',
47  'Phase2C9_dd4hep',
48  'Phase2C10_dd4hep',
49  'Phase2C11_dd4hep',
50  'Phase2C11I13',
51  'Phase2C11T22',
52  'Phase2C11T23',
53  'Phase2C12_dd4hep',
54  'Phase2C11M9',
55  'Phase2C11I13M9',
56  'Phase2C11I13T22M9',
57  'Phase2C11I13T23M9',
58  'Phase2C11I13T25M9',
59  'Phase2C11I13T26M9',
60  'Phase2C11I13T27M9'
61  ]
62 
63  internalUseMods = ['run2_common', 'run2_25ns_specific',
64  'run2_50ns_specific', 'run2_HI_specific',
65  'stage1L1Trigger', 'fastSim',
66  'peripheralPbPb', 'pA_2016',
67  'run2_HE_2017', 'stage2L1Trigger', 'stage2L1Trigger_2017', 'stage2L1Trigger_2018', 'stage2L1Trigger_2021',
68  'run2_HF_2017', 'run2_HCAL_2017', 'run2_HEPlan1_2017', 'run2_HB_2018','run2_HE_2018',
69  'run3_HB', 'run3_HFSL', 'run3_common', 'run3_RPC',
70  'phase1Pixel', 'run3_GEM', 'run2_GEM_2017',
71  'run2_CSC_2018',
72  'phase2_common', 'phase2_tracker',
73  'phase2_muon', 'phase2_GEM', 'phase2_GE0',
74  'phase2_hgcal', 'phase2_timing', 'phase2_hfnose', 'phase2_hgcalV10', 'phase2_hgcalV11', 'phase2_hgcalV12',
75  'phase2_timing_layer', 'phase2_etlV4', 'phase2_hcal', 'phase2_ecal','phase2_ecal_devel',
76  'phase2_trigger',
77  'phase2_squarePixels', 'phase2_3DPixels', 'phase2_brickedPixels',
78  'trackingLowPU', 'trackingPhase1', 'ctpps', 'ctpps_2016', 'ctpps_2017', 'ctpps_2018', 'ctpps_2021', 'trackingPhase2PU140','highBetaStar_2018',
79  'tracker_apv_vfp30_2016', 'pf_badHcalMitigationOff', 'run2_miniAOD_80XLegacy','run2_miniAOD_94XFall17', 'run2_nanoAOD_92X',
80  'run2_nanoAOD_94XMiniAODv1', 'run2_nanoAOD_94XMiniAODv2', 'run2_nanoAOD_94X2016',
81  'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'run2_nanoAOD_106Xv1', 'run2_nanoAOD_106Xv2', 'run3_nanoAOD_devel',
82  'hcalHardcodeConditions', 'hcalSkipPacker',
83  'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018',
84  'bParking']
85  internalUseModChains = ['run2_2017_noTrackingModifier', 'trackingMkFitProd']
86 
87  self.pythonCfgLines = {}
88 
89  for e in allEras:
90  eObj=getattr(__import__('Configuration.Eras.Era_'+e+'_cff',globals(),locals(),[e],0),e)
91  self.addEra(e,eObj)
92  self.pythonCfgLines[e] = 'from Configuration.Eras.Era_'+e+'_cff import '+e
93 
94  for e in internalUseMods:
95  eObj=getattr(__import__('Configuration.Eras.Modifier_'+e+'_cff',globals(),locals(),[e],0),e)
96  self.addEra(e,eObj)
97  self.pythonCfgLines[e] = 'from Configuration.Eras.Modifier_'+e+'_cff import '+e
98 
99  for e in internalUseModChains:
100  eObj=getattr(__import__('Configuration.Eras.ModifierChain_'+e+'_cff',globals(),locals(),[e],0),e)
101  self.addEra(e,eObj)
102  self.pythonCfgLines[e] = 'from Configuration.Eras.ModifierChain_'+e+'_cff import '+e
103 
pythonCfgLines
Definition: Eras.py:86
def __init__
Definition: Eras.py:10
def addEra
Definition: Eras.py:104

Member Function Documentation

def Eras.Eras.addEra (   self,
  name,
  obj 
)

Definition at line 104 of file Eras.py.

105  def addEra(self,name,obj):
106  setattr(self,name,obj)
def addEra
Definition: Eras.py:104
def Eras.Eras.inspect (   self,
  name = None,
  onlyChosen = False,
  details = True 
)

Definition at line 121 of file Eras.py.

References Eras.Eras.inspectEra(), and print().

122  def inspect(self,name=None,onlyChosen=False,details=True):
123  if name==None:
124  print('Inspecting the known eras', end=' ')
125  if onlyChosen: print(' (all active)')
126  else: print('(all eras defined)')
127  else:
128  print('Inspecting the '+name+' era', end=' ')
129 
130  allEras=[]
131  for key, value in self.__dict__.items():
132  if isinstance(value, ModifierChain): allEras.append(key)
133 
134  for e in allEras:
135  if name is not None and name==e:
136  self.inspectEra(e,details)
137  if name is None:
138  if not onlyChosen or getattr(self,e).isChosen():
139  self.inspectEra(e,details)
140 
141 eras=Eras()
142 
143 
144 #eras.inspect()
def inspect
Definition: Eras.py:121
def inspectEra
Definition: Eras.py:110
Definition: Eras.py:5
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def Eras.Eras.inspectEra (   self,
  e,
  details 
)

Definition at line 110 of file Eras.py.

References Eras.Eras.inspectModifier(), and print().

Referenced by Eras.Eras.inspect().

111  def inspectEra(self,e,details):
112  print('\nEra:',e)
113  print(' isChosen:',getattr(self,e)._isChosen())
114  if details: print(' Modifiers:')
115  nmod=0
116  for value in getattr(self,e).__dict__['_ModifierChain__chain']:
117  if isinstance(value, Modifier):
118  nmod=nmod+1
119  if details: self.inspectModifier(value,details)
120  print(' ',nmod,'modifiers defined')
def inspectEra
Definition: Eras.py:110
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def inspectModifier
Definition: Eras.py:107
def Eras.Eras.inspectModifier (   self,
  m,
  details 
)

Definition at line 107 of file Eras.py.

References print().

Referenced by Eras.Eras.inspectEra().

108  def inspectModifier(self,m,details):
109  print(' ',m.__dict__ ['_Modifier__processModifiers'])
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def inspectModifier
Definition: Eras.py:107

Member Data Documentation

Eras.Eras.pythonCfgLines

Definition at line 86 of file Eras.py.