psana/include/EventTime.h

Go to the documentation of this file.
00001 #ifndef PSANA_EVENTTIME_H
00002 #define PSANA_EVENTTIME_H
00003 
00004 #include <boost/cstdint.hpp>
00005 
00006 namespace psana {
00007 
00008 /// @addtogroup psana
00009 
00010 /**
00011  *  @ingroup psana
00012  *
00013  *  @brief Object used to jump to events when using Indexing.
00014  *
00015  *  @version $Id: EventTime.h 7696 2014-02-27 00:40:59Z cpo@SLAC.STANFORD.EDU $
00016  *
00017  *  @author Christopher O'Grady
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

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7