Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TimeStamp.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GlastEvent/GlastEvent/Utilities/TimeStamp.h,v 1.2 2001/04/18 19:07:26 igable Exp $
00002 #ifndef LHCBEVENT_TIMESTAMP_H
00003 #define LHCBEVENT_TIMESTAMP_H 1
00004 
00005 
00006 // Include files
00007 #include <iostream>
00008 #include "GaudiKernel/StreamBuffer.h"
00009 #include "GlastEvent/TopLevel/Definitions.h"
00010 
00011 
00012 //------------------------------------------------------------------------------
00013 //
00014 // ClassName:   TimeStamp
00015 //  
00016 // Description: Placeholder for the time stamp
00017 //              (decision about precision and range has to be made)
00018 //
00019 // Author:      Pavel Binko
00020 // Changes:     P.Binko 19/10/1999 : Formating of ASCII output
00021 //
00022 //------------------------------------------------------------------------------
00023 
00024 
00025 class TimeStamp                                                                {
00026 
00027 public:
00028 
00030   TimeStamp()
00031     : m_time(0)                                                              { }
00032   TimeStamp( long t )
00033     : m_time(t)                                                              { }
00035   ~TimeStamp()                                                               { }
00036 
00038   long time() const                                                            {
00039     return m_time;
00040   }
00042   void setTime( long value )                                                   {
00043     m_time = value;
00044   }
00045 
00047   friend StreamBuffer& operator<< ( StreamBuffer& s, const TimeStamp& obj )    {
00048     return s << obj.m_time;
00049   }
00051   friend StreamBuffer& operator>> ( StreamBuffer& s, TimeStamp& obj )          {
00052     return s >> obj.m_time;
00053   }
00054 
00056   friend std::ostream& operator<< ( std::ostream& s, const TimeStamp& obj )    {
00057     return obj.fillStream(s);
00058   }
00060   std::ostream& fillStream( std::ostream& s ) const                            {
00061     return s << "class TimeStamp : "
00062       << GlastEventField( GlastEvent::field12 )
00063       << m_time;
00064   }
00065 
00066 private:
00067 
00069   long m_time;
00070 
00071 };
00072 
00073 
00074 #endif    // LHCBEVENT_TIMESTAMP_H

Generated at Wed Nov 21 12:22:50 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000