ATLAS Offline Software
Loading...
Searching...
No Matches
python.TriggerHandler Namespace Reference

Classes

class  TriggerHandler
class  TriggerL1Data

Functions

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

Variables

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

Function Documentation

◆ runLBString()

python.TriggerHandler.runLBString ( iovkey)

Definition at line 280 of file TriggerHandler.py.

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

◆ timeString()

python.TriggerHandler.timeString ( iovkey)

Definition at line 269 of file TriggerHandler.py.

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

◆ timeVal()

python.TriggerHandler.timeVal ( val)

Definition at line 249 of file TriggerHandler.py.

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

Variable Documentation

◆ allL1Triggers

python.TriggerHandler.allL1Triggers

Definition at line 297 of file TriggerHandler.py.

◆ tend

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

Definition at line 299 of file TriggerHandler.py.

◆ th

python.TriggerHandler.th = TriggerHandler()

Definition at line 295 of file TriggerHandler.py.

◆ tstart

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

Definition at line 298 of file TriggerHandler.py.

◆ verbose

python.TriggerHandler.verbose

Definition at line 296 of file TriggerHandler.py.