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