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