ATLAS Offline Software
Classes | Functions | Variables
python.TriggerHandler Namespace Reference

Classes

class  TriggerHandler
 
class  TriggerL1Data
 

Functions

def timeVal (val)
 
def timeString (iovkey)
 
def runLBString (iovkey)
 

Variables

 th = TriggerHandler()
 
 verbose
 
 allL1Triggers
 
string tstart = '2011-10-16:06:00:00'
 
string tend = '2011-10-17:04:00:00'
 

Function Documentation

◆ runLBString()

def python.TriggerHandler.runLBString (   iovkey)

Definition at line 281 of file TriggerHandler.py.

281 def runLBString(iovkey):
282  "Convert the IOVtime (63 bit) to a string representing timestamp"
283  if (iovkey==cool.ValidityKeyMin):
284  return "ValidityKeyMin"
285  elif (iovkey==cool.ValidityKeyMax):
286  return "ValidityKeyMax"
287  else:
288  # Round to avoid bias if microseconds exist
289  run = iovkey >> 32
290  lb = iovkey & 0xFFFFFFFF
291  return "%d/%d" % (run, lb)
292 
293 
294 # Executed from the command line, for testing only

◆ timeString()

def python.TriggerHandler.timeString (   iovkey)

Definition at line 270 of file TriggerHandler.py.

270 def timeString(iovkey):
271  "Convert the IOVtime (63 bit) to a string representing timestamp"
272  if (iovkey==cool.ValidityKeyMin):
273  return "ValidityKeyMin"
274  elif (iovkey==cool.ValidityKeyMax):
275  return "ValidityKeyMax"
276  else:
277  # Round to avoid bias if microseconds exist
278  stime=int(round(iovkey/1000000000))
279  return time.strftime('%Y-%m-%d:%H:%M:%S/UTC', time.gmtime(stime))
280 

◆ timeVal()

def python.TriggerHandler.timeVal (   val)

Definition at line 250 of file TriggerHandler.py.

250 def timeVal(val):
251  "Convert argument to time in seconds, treating as a literal or date"
252  try:
253  a=int(val)
254  return a
255  except ValueError:
256  try:
257  ts=time.strptime(val,'%Y-%m-%d:%H:%M:%S/%Z')
258  return int(calendar.timegm(ts))*1000000000
259 
260  # Try again with UTC attached
261  except ValueError:
262  try:
263  ts=time.strptime(val+'/UTC', '%Y-%m-%d:%H:%M:%S/%Z')
264  return int(calendar.timegm(ts))*1000000000
265 
266  except ValueError:
267  print("ERROR in time specification:",val,"- use e.g. 2007-05-25:14:01:00/UTC")
268  sys.exit(-1)
269 

Variable Documentation

◆ allL1Triggers

python.TriggerHandler.allL1Triggers

Definition at line 298 of file TriggerHandler.py.

◆ tend

string python.TriggerHandler.tend = '2011-10-17:04:00:00'

Definition at line 300 of file TriggerHandler.py.

◆ th

python.TriggerHandler.th = TriggerHandler()

Definition at line 296 of file TriggerHandler.py.

◆ tstart

string python.TriggerHandler.tstart = '2011-10-16:06:00:00'

Definition at line 299 of file TriggerHandler.py.

◆ verbose

python.TriggerHandler.verbose

Definition at line 297 of file TriggerHandler.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
python.TriggerHandler.timeVal
def timeVal(val)
Definition: TriggerHandler.py:250
python.TriggerHandler.timeString
def timeString(iovkey)
Definition: TriggerHandler.py:270
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.TriggerHandler.runLBString
def runLBString(iovkey)
Definition: TriggerHandler.py:281