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  self.hilton = False # prepare a configuration for running with hilton-like modules
94 
95 
96  # convert HLT and L1 menus to a dedicated object representation on the fly
97  def __setattr__(self, name, value):
98  if name is 'menu' and type(value) is not ConnectionHLTMenu:
99  # format 'menu' as needed
100  object.__setattr__(self, name, ConnectionHLTMenu(value))
101  elif name is 'l1' and type(value) is not ConnectionL1TMenu:
102  # format '--l1' as needed
103  object.__setattr__(self, name, ConnectionL1TMenu(value))
104  elif name is 'l1Xml' and type(value) is not ConnectionL1TMenuXml:
105  # format '--l1Xml' as needed
106  object.__setattr__(self, name, ConnectionL1TMenuXml(value))
107  elif name is 'fastsim' and value:
108  # '--fastsim' implies '--fragment' and '--mc'
109  object.__setattr__(self, 'fastsim', True)
110  object.__setattr__(self, 'fragment', True)
111  object.__setattr__(self, 'data', False)
112  elif name is 'open' and value:
113  # '--open' implies '--unprescale'
114  object.__setattr__(self, 'open', True)
115  object.__setattr__(self, 'prescale', "none")
116  elif name is 'prescale' and value is not None:
117  # '--open' overrides '--prescale', set the prescale value only if '--open' is not set
118  if not self.open:
119  object.__setattr__(self, 'prescale', value)
120  elif name is 'profiling' and value:
121  # '--profiling'
122  object.__setattr__(self, 'profiling', True)
123  elif name is 'timing' and value:
124  # '--timing' implies '--profiling'
125  object.__setattr__(self, 'timing', True)
126  object.__setattr__(self, 'profiling', True)
127  else:
128  object.__setattr__(self, name, value)
list object
Definition: dbtoconf.py:77