19 #include "GaudiKernel/MsgStream.h"
20 #include "GaudiKernel/EventIDBase.h"
28 m_timestamp(
IOVTime::UNDEFTIMESTAMP)
47 m_timestamp = eid.time_stamp()*1000000000LL + eid.time_stamp_ns_offset();
49 if (eid.isRunEvent()) {
50 m_time = ( (
uint64_t) eid.run_number() << 32) + eid.event_number();
51 if (eid.isTimeStamp()) {
56 }
else if (eid.isLumiEvent()) {
57 m_time = ( (
uint64_t) eid.lumi_block() << 32) + eid.event_number();
58 if (eid.isTimeStamp()) {
78 m_timestamp = timestamp;
154 IOVTime::operator std::string ()
const {
155 std::ostringstream
os;
158 os << (m_time>>32) <<
"," << ( m_time & 0
xFFFFFFFF );
161 if (isRunEvent())
os <<
":";
168 IOVTime::operator EventIDBase()
const {
170 return EventIDBase(
run(),EventIDBase::UNDEFEVT,
173 }
else if (isTimestamp()) {
174 return EventIDBase(EventIDBase::UNDEFNUM,EventIDBase::UNDEFEVT,
176 }
else if (isRunEvent()) {
177 return EventIDBase(
run(),EventIDBase::UNDEFEVT,
178 EventIDBase::UNDEFNUM,0,
181 return EventIDBase();
186 os << (std::string) rhs;
191 os << (std::string) rhs;