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.db = 'orcoff'
59  self.run = name
60  elif db in ('hltdev', 'orcoff'):
61  self.db = db
62  self.name = name
63  else:
64  raise Exception('Unknown ConfDB database "%s", valid values are "hltdev" (default) and "orcoff")' % db)
65  else:
66  self.db = 'hltdev'
67  self.name = self.value
68 
69 
70 # options marked with a (*) only apply when creating a whole process configuration
72  def __init__(self):
73  self.menu = None # hlt menu
74  self.name = 'HLTX' # (*) if set, override the process name
75  self.type = 'GRun' # defines global options for 'GRun', 'HIon', 'PIon' or 'online' menus
76  self.data = True # run on data (true) or mc (false)
77  self.online = False # (*) run online (true) or offline (false)
78  self.globaltag = None # (*) if set, override the GlobalTag
79  self.l1 = None # (*) if set, override the L1 menu
80  self.l1Xml = None # (*) if set, override the L1 menu Xml
81  self.l1skim = False # (*) if set, add snippet to process L1 skim files done with new L1, ignoring old L1
82  self.emulator = None # (*) if set, run (part of) the L1 emulator instead of taking the L1 results from the data
83  self.prescale = None # (*) if set, force the use of a specific prescale column. If set to "none", unprescale all paths
84  self.open = False # if set, cms.ignore all filters, making all paths run on and accept all events
85  self.errortype = False # if set, change all HLTTriggerTypeFilter EDFilters to accept only error events (SelectedTriggerType = 0)
86  self.profiling = False # if set, instrument the menu for profiling measurements
87  self.timing = False # if set, instrument the menu for timing measurements (implies profiling)
88  self.paths = None # if set, include in the dump only the given paths (wildcards are supported)
89  self.input = None # (*) if set, specify the input file(s) or dataset
90  self.parent = None # (*) if set, specify the parent input file(s) or dataset
91  self.events = 100 # (*) run on these many events
92  self.output = 'all' # (*) output 'all', 'minimal' or 'none' output modules
93  self.fragment = False # prepare a configuration fragment (true) or a whole process (false)
94  self.fastsim = False # prepare a configuration fragment suitable for FastSim
95  self.hilton = False # prepare a configuration for running with hilton-like modules
96 
97 
98  # convert HLT and L1 menus to a dedicated object representation on the fly
99  def __setattr__(self, name, value):
100  if name is 'menu' and type(value) is not ConnectionHLTMenu:
101  # format 'menu' as needed
102  object.__setattr__(self, name, ConnectionHLTMenu(value))
103  elif name is 'l1' and type(value) is not ConnectionL1TMenu:
104  # format '--l1' as needed
105  object.__setattr__(self, name, ConnectionL1TMenu(value))
106  elif name is 'l1Xml' and type(value) is not ConnectionL1TMenuXml:
107  # format '--l1Xml' as needed
108  object.__setattr__(self, name, ConnectionL1TMenuXml(value))
109  elif name is 'fastsim' and value:
110  # '--fastsim' implies '--fragment' and '--mc'
111  object.__setattr__(self, 'fastsim', True)
112  object.__setattr__(self, 'fragment', True)
113  object.__setattr__(self, 'data', False)
114  elif name is 'open' and value:
115  # '--open' implies '--unprescale'
116  object.__setattr__(self, 'open', True)
117  object.__setattr__(self, 'prescale', "none")
118  elif name is 'prescale' and value is not None:
119  # '--open' overrides '--prescale', set the prescale value only if '--open' is not set
120  if not self.open:
121  object.__setattr__(self, 'prescale', value)
122  elif name is 'profiling' and value:
123  # '--profiling'
124  object.__setattr__(self, 'profiling', True)
125  elif name is 'timing' and value:
126  # '--timing' implies '--profiling'
127  object.__setattr__(self, 'timing', True)
128  object.__setattr__(self, 'profiling', True)
129  else:
130  object.__setattr__(self, name, value)
list object
Definition: dbtoconf.py:77