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

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  'Phase2',
36  'Phase2_timing',
37  'Phase2_timing_layer',
38  'Phase2_timing_layer_tile',
39  'Phase2_timing_layer_bar',
40  'Phase2C4',
41  'Phase2C4_timing',
42  'Phase2C6',
43  'Phase2C6_timing',
44  'Phase2C4_timing_layer_bar',
45  'Phase2C8',
46  'Phase2C8_timing',
47  'Phase2C8_timing_layer_bar',
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',
55  'run2_HF_2017', 'run2_HCAL_2017', 'run2_HEPlan1_2017', 'run2_HB_2018','run2_HE_2018',
56  'run3_HB', 'run3_common',
57  'phase1Pixel', 'run3_GEM', 'run2_GEM_2017',
58  'run2_CSC_2018',
59  'phase2_common', 'phase2_tracker',
60  'phase2_hgcal', 'phase2_muon', 'phase2_timing', 'phase2_hgcalV9', 'phase2_hfnose', 'phase2_hgcalV10',
61  'phase2_timing_layer','phase2_timing_layer_tile','phase2_timing_layer_bar','phase2_hcal',
62  'trackingLowPU', 'trackingPhase1', 'ctpps_2016', 'trackingPhase2PU140','highBetaStar_2018',
63  'tracker_apv_vfp30_2016', 'pf_badHcalMitigation', 'run2_miniAOD_80XLegacy','run2_miniAOD_94XFall17', 'run2_nanoAOD_92X',
64  'run2_nanoAOD_94XMiniAODv1', 'run2_nanoAOD_94XMiniAODv2', 'run2_nanoAOD_94X2016',
65  'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'run2_nanoAOD_106Xv1',
66  'run2_tau_ul_2016', 'run2_tau_ul_2018',
67  'hcalHardcodeConditions', 'hcalSkipPacker',
68  'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018',
69  'bParking']
70  internalUseModChains = ['run2_2017_noTrackingModifier']
71 
72  self.pythonCfgLines = {}
73 
74  for e in allEras:
75  eObj=getattr(__import__('Configuration.Eras.Era_'+e+'_cff',globals(),locals(),[e],0),e)
76  self.addEra(e,eObj)
77  self.pythonCfgLines[e] = 'from Configuration.Eras.Era_'+e+'_cff import '+e
78 
79  for e in internalUseMods:
80  eObj=getattr(__import__('Configuration.Eras.Modifier_'+e+'_cff',globals(),locals(),[e],0),e)
81  self.addEra(e,eObj)
82  self.pythonCfgLines[e] = 'from Configuration.Eras.Modifier_'+e+'_cff import '+e
83 
84  for e in internalUseModChains:
85  eObj=getattr(__import__('Configuration.Eras.ModifierChain_'+e+'_cff',globals(),locals(),[e],0),e)
86  self.addEra(e,eObj)
87  self.pythonCfgLines[e] = 'from Configuration.Eras.ModifierChain_'+e+'_cff import '+e
88 
89 
pythonCfgLines
Definition: Eras.py:72
def __init__(self)
Definition: Eras.py:10
def addEra(self, name, obj)
Definition: Eras.py:90

Member Function Documentation

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

Definition at line 90 of file Eras.py.

90  def addEra(self,name,obj):
91  setattr(self,name,obj)
92 
def addEra(self, name, obj)
Definition: Eras.py:90
def Eras.Eras.inspect (   self,
  name = None,
  onlyChosen = False,
  details = True 
)

Definition at line 107 of file Eras.py.

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

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

Definition at line 96 of file Eras.py.

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

Referenced by Eras.Eras.inspect().

96  def inspectEra(self,e,details):
97  print('\nEra:',e)
98  print(' isChosen:',getattr(self,e)._isChosen())
99  if details: print(' Modifiers:')
100  nmod=0
101  for value in getattr(self,e).__dict__['_ModifierChain__chain']:
102  if isinstance(value, Modifier):
103  nmod=nmod+1
104  if details: self.inspectModifier(value,details)
105  print(' ',nmod,'modifiers defined')
106 
def inspectEra(self, e, details)
Definition: Eras.py:96
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def inspectModifier(self, m, details)
Definition: Eras.py:93
def Eras.Eras.inspectModifier (   self,
  m,
  details 
)

Definition at line 93 of file Eras.py.

References edm.print().

Referenced by Eras.Eras.inspectEra().

93  def inspectModifier(self,m,details):
94  print(' ',m.__dict__ ['_Modifier__processModifiers'])
95 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def inspectModifier(self, m, details)
Definition: Eras.py:93

Member Data Documentation

Eras.Eras.pythonCfgLines

Definition at line 72 of file Eras.py.