3 datetime_string_fmt =
'%Y-%m-%d %H:%M:%S.%f' 6 return (runNumber<<32) + lumiSectionId
10 lumisection_id = lumiTime-( run << 32 )
11 return run, lumisection_id
14 timespan_from_epoch = dt - datetime.datetime(1970,1,1)
15 seconds_from_epoch =
int( timespan_from_epoch.total_seconds() )
16 nanoseconds_from_epoch = timespan_from_epoch.microseconds * 1000
17 return ( seconds_from_epoch << 32 ) + nanoseconds_from_epoch
20 seconds_from_epoch = ts >> 32
21 nanoseconds_from_epoch = ts - ( seconds_from_epoch << 32 )
22 dt = datetime.datetime.utcfromtimestamp(seconds_from_epoch)
23 return dt + datetime.timedelta( microseconds=
int(nanoseconds_from_epoch/1000) )
26 dt = datetime.datetime.strptime( sdt, datetime_string_fmt )
31 return dt.strftime( datetime_string_fmt )
def string_from_timestamp(ts)
def string_to_timestamp(sdt)
def from_lumi_time(lumiTime)
def to_lumi_time(runNumber, lumiSectionId)