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