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