Go to the documentation of this file.00001
00002 globalTag = {
00003 'FULL': 'auto:startup',
00004 'GRun': 'auto:startup',
00005 'data': 'auto:hltonline',
00006 'HIon': 'auto:starthi',
00007 'PIon': 'auto:startup',
00008 }
00009
00010
00011
00012 class ConnectionL1TMenu(object):
00013 def __init__(self, value):
00014 self.override = None
00015 self.connect = None
00016
00017
00018 if value:
00019 if ',' in value:
00020 self.override = value.split(',')[0]
00021 self.connect = value.split(',')[1]
00022 else:
00023 self.override = value
00024 self.connect = None
00025
00026
00027
00028 class ConnectionL1TMenuXml(object):
00029 def __init__(self, value):
00030 self.XmlFile = None
00031 self.LumiDir = None
00032
00033
00034 if value:
00035 if ',' in value:
00036 self.XmlFile = value.split(',')[0]
00037 self.LumiDir = value.split(',')[1]
00038 else:
00039 self.XmlFile = value
00040 self.LumiDir = "startup"
00041
00042
00043
00044 class ConnectionHLTMenu(object):
00045 def __init__(self, value):
00046 self.value = value
00047 self.db = None
00048 self.name = None
00049 self.run = None
00050
00051
00052 if value:
00053 if ':' in self.value:
00054 (db, name) = self.value.split(':')
00055 if db == 'run':
00056 self.run = name
00057 elif db in ('hltdev', 'orcoff'):
00058 self.db = db
00059 self.name = name
00060 else:
00061 raise Exception('Unknown ConfDB database "%s", valid values are "hltdev" (default) and "orcoff")' % db)
00062 else:
00063 self.db = 'hltdev'
00064 self.name = self.value
00065
00066
00067
00068 class HLTProcessOptions(object):
00069 def __init__(self):
00070 self.menu = None
00071 self.name = 'HLTX'
00072 self.type = 'GRun'
00073 self.data = True
00074 self.online = False
00075 self.globaltag = None
00076 self.l1 = None
00077 self.l1Xml = None
00078 self.emulator = None
00079 self.unprescale = False
00080 self.open = False
00081 self.errortype = False
00082 self.profiling = False
00083 self.timing = False
00084 self.paths = None
00085 self.input = None
00086 self.events = 100
00087 self.output = 'all'
00088 self.fragment = False
00089 self.fastsim = False
00090
00091
00092
00093 def __setattr__(self, name, value):
00094 if name is 'menu' and type(value) is not ConnectionHLTMenu:
00095
00096 object.__setattr__(self, name, ConnectionHLTMenu(value))
00097 elif name is 'l1' and type(value) is not ConnectionL1TMenu:
00098
00099 object.__setattr__(self, name, ConnectionL1TMenu(value))
00100 elif name is 'l1Xml' and type(value) is not ConnectionL1TMenuXml:
00101
00102 object.__setattr__(self, name, ConnectionL1TMenuXml(value))
00103 elif name is 'fastsim' and value:
00104
00105 object.__setattr__(self, 'fastsim', True)
00106 object.__setattr__(self, 'fragment', True)
00107 object.__setattr__(self, 'data', False)
00108 elif name is 'open' and value:
00109
00110 object.__setattr__(self, 'open', True)
00111 object.__setattr__(self, 'unprescale', True)
00112 elif name is 'profiling' and value:
00113
00114 object.__setattr__(self, 'profiling', True)
00115 elif name is 'timing' and value:
00116
00117 object.__setattr__(self, 'timing', True)
00118 object.__setattr__(self, 'profiling', True)
00119 else:
00120 object.__setattr__(self, name, value)