00001 #ifndef PSANA_EVENTTIME_H
00002 #define PSANA_EVENTTIME_H
00003
00004 #include <boost/cstdint.hpp>
00005
00006 namespace psana {
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 class EventTime {
00021 public:
00022 EventTime() {}
00023 EventTime(uint64_t time, uint32_t fiducial) :
00024 _time(time),_fiducial(fiducial) {}
00025 uint64_t time() const {return _time;}
00026 uint32_t seconds() const {return (_time&0xffffffff00000000)>>32;}
00027 uint32_t nanoseconds() const {return _time&0xffffffff;}
00028 uint32_t fiducial() const {return _fiducial;}
00029 private:
00030 uint64_t _time;
00031 uint32_t _fiducial;
00032 };
00033
00034 }
00035 #endif // PSANA_EVENTTIME_H