CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
Eras.Eras Class Reference
Inheritance diagram for Eras.Eras:

Public Member Functions

def __init__ (self)
 
def addEra (self, name, obj)
 
def inspect (self, name=None, onlyChosen=False, details=True)
 
def inspectEra (self, e, details)
 
def inspectModifier (self, m, details)
 

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

◆ __init__()

def Eras.Eras.__init__ (   self)

Definition at line 10 of file Eras.py.

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

Member Function Documentation

◆ addEra()

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

Definition at line 91 of file Eras.py.

91  def addEra(self,name,obj):
92  setattr(self,name,obj)
93 

◆ inspect()

def Eras.Eras.inspect (   self,
  name = None,
  onlyChosen = False,
  details = True 
)

Definition at line 108 of file Eras.py.

108  def inspect(self,name=None,onlyChosen=False,details=True):
109  if name==None:
110  print('Inspecting the known eras', end=' ')
111  if onlyChosen: print(' (all active)')
112  else: print('(all eras defined)')
113  else:
114  print('Inspecting the '+name+' era', end=' ')
115 
116  allEras=[]
117  for key, value in self.__dict__.items():
118  if isinstance(value, ModifierChain): allEras.append(key)
119 
120  for e in allEras:
121  if name is not None and name==e:
122  self.inspectEra(e,details)
123  if name is None:
124  if not onlyChosen or getattr(self,e).isChosen():
125  self.inspectEra(e,details)
126 
127 eras=Eras()
128 
129 
130 #eras.inspect()

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

◆ inspectEra()

def Eras.Eras.inspectEra (   self,
  e,
  details 
)

Definition at line 97 of file Eras.py.

97  def inspectEra(self,e,details):
98  print('\nEra:',e)
99  print(' isChosen:',getattr(self,e)._isChosen())
100  if details: print(' Modifiers:')
101  nmod=0
102  for value in getattr(self,e).__dict__['_ModifierChain__chain']:
103  if isinstance(value, Modifier):
104  nmod=nmod+1
105  if details: self.inspectModifier(value,details)
106  print(' ',nmod,'modifiers defined')
107 

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

Referenced by Eras.Eras.inspect().

◆ inspectModifier()

def Eras.Eras.inspectModifier (   self,
  m,
  details 
)

Definition at line 94 of file Eras.py.

94  def inspectModifier(self,m,details):
95  print(' ',m.__dict__ ['_Modifier__processModifiers'])
96 

References print().

Referenced by Eras.Eras.inspectEra().

Member Data Documentation

◆ pythonCfgLines

Eras.Eras.pythonCfgLines

Definition at line 73 of file Eras.py.

Eras
Definition: Eras.py:1
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46