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