CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
options.py
Go to the documentation of this file.
1 # available "type"s and relative global tags
2 globalTag = {
3  '2014': 'auto:run1_mc_2014',
4  'Fake': 'auto:run1_mc_Fake',
5  'FULL': 'auto:run2_mc_FULL',
6  'GRun': 'auto:run2_mc_GRun', # use as default
7  'HIon': 'auto:run2_mc_HIon',
8  'PIon': 'auto:run2_mc_PIon',
9  'data': 'auto:run1_hlt',
10 }
11 
12 
13 # type used to store a reference to an L1 menu
15  def __init__(self, value):
16  self.override = None
17  self.connect = None
18 
19  # extract the override tag and the connection string
20  if value:
21  if ',' in value:
22  self.override = value.split(',')[0]
23  self.connect = value.split(',')[1]
24  else:
25  self.override = value
26  self.connect = None
27 
28 
29 # type used to store a reference to an L1 menu
31  def __init__(self, value):
32  self.XmlFile = None
33  self.LumiDir = None
34 
35  # extract the override tag and the connection string
36  if value:
37  if ',' in value:
38  self.XmlFile = value.split(',')[0]
39  self.LumiDir = value.split(',')[1]
40  else:
41  self.XmlFile = value
42  self.LumiDir = "startup"
43 
44 
45 # type used to store a reference to an HLT configuration
47  def __init__(self, value):
48  self.value = value
49  self.db = None
50  self.name = None
51  self.run = None
52 
53  # extract the database and configuration name
54  if value:
55  if ':' in self.value:
56  (db, name) = self.value.split(':')
57  if db == 'run':
58  self.run = name
59  elif db in ('hltdev', 'orcoff'):
60  self.db = db
61  self.name = name
62  else:
63  raise Exception('Unknown ConfDB database "%s", valid values are "hltdev" (default) and "orcoff")' % db)
64  else:
65  self.db = 'hltdev'
66  self.name = self.value
67 
68 
69 # options marked with a (*) only apply when creating a whole process configuration
71  def __init__(self):
72  self.menu = None # hlt menu
73  self.name = 'HLTX' # (*) if set, override the process name
74  self.type = 'GRun' # defines global options for 'GRun', 'HIon', 'PIon' or 'online' menus
75  self.data = True # run on data (true) or mc (false)
76  self.online = False # (*) run online (true) or offline (false)
77  self.globaltag = None # (*) if set, override the GlobalTag
78  self.l1 = None # (*) if set, override the L1 menu
79  self.l1Xml = None # (*) if set, override the L1 menu Xml
80  self.l1skim = False # (*) if set, add snippet to process L1 skim files done with new L1, ignoring old L1
81  self.emulator = None # (*) if set, run (part of) the L1 emulator instead of taking the L1 results from the data
82  self.prescale = None # (*) if set, force the use of a specific prescale column. If set to "none", unprescale all paths
83  self.open = False # if set, cms.ignore all filters, making all paths run on and accept all events
84  self.errortype = False # if set, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
85  self.profiling = False # if set, instrument the menu for profiling measurements
86  self.timing = False # if set, instrument the menu for timing measurements (implies profiling)
87  self.paths = None # if set, include in the dump only the given paths (wildcards are supported)
88  self.input = None # (*) if set, run on a specific input file
89  self.events = 100 # (*) run on these many events
90  self.output = 'all' # (*) output 'all', 'minimal' or 'none' output modules
91  self.fragment = False # prepare a configuration fragment (true) or a whole process (false)
92  self.fastsim = False # prepare a configuration fragment suitable for FastSim
93 
94 
95  # convert HLT and L1 menus to a dedicated object representation on the fly
96  def __setattr__(self, name, value):
97  if name is 'menu' and type(value) is not ConnectionHLTMenu:
98  # format 'menu' as needed
99  object.__setattr__(self, name, ConnectionHLTMenu(value))
100  elif name is 'l1' and type(value) is not ConnectionL1TMenu:
101  # format '--l1' as needed
102  object.__setattr__(self, name, ConnectionL1TMenu(value))
103  elif name is 'l1Xml' and type(value) is not ConnectionL1TMenuXml:
104  # format '--l1Xml' as needed
105  object.__setattr__(self, name, ConnectionL1TMenuXml(value))
106  elif name is 'fastsim' and value:
107  # '--fastsim' implies '--fragment' and '--mc'
108  object.__setattr__(self, 'fastsim', True)
109  object.__setattr__(self, 'fragment', True)
110  object.__setattr__(self, 'data', False)
111  elif name is 'open' and value:
112  # '--open' implies '--unprescale'
113  object.__setattr__(self, 'open', True)
114  object.__setattr__(self, 'prescale', "none")
115  elif name is 'prescale' and value is not None:
116  # '--open' overrides '--prescale', set the prescale value only if '--open' is not set
117  if not self.open:
118  object.__setattr__(self, 'prescale', value)
119  elif name is 'profiling' and value:
120  # '--profiling'
121  object.__setattr__(self, 'profiling', True)
122  elif name is 'timing' and value:
123  # '--timing' implies '--profiling'
124  object.__setattr__(self, 'timing', True)
125  object.__setattr__(self, 'profiling', True)
126  else:
127  object.__setattr__(self, name, value)
list object
Definition: dbtoconf.py:77