00001 // $Header: /nfs/slac/g/glast/ground/cvs/GlastEvent/GlastEvent/Utilities/ProcessingVersion.h,v 1.2 2001/04/18 19:07:26 igable Exp $ 00002 #ifndef LHCBEVENT_PROCESSINGVERSION_H 00003 #define LHCBEVENT_PROCESSINGVERSION_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: ProcessingVersion 00015 // 00016 // Description: Placeholder for processing version (used on the (sub)event level 00017 // and on the level of LHCb containers of physics objects) 00018 // 00019 // Author: Pavel Binko 00020 // Changes: P.Binko 19/10/1999 : Formating of ASCII output 00021 // 00022 //------------------------------------------------------------------------------ 00023 00024 00025 class ProcessingVersion { 00026 00027 public: 00028 00030 ProcessingVersion( long version ) 00031 : m_version(version) { } 00032 ProcessingVersion() 00033 : m_version(0) { } 00035 ~ProcessingVersion() { } 00036 00038 long versionNumber() const { 00039 return m_version; 00040 } 00042 void setVersionNumber( long value ) { 00043 m_version = value; 00044 } 00046 friend bool operator < ( const ProcessingVersion& left, 00047 const ProcessingVersion& right) { 00048 return left.m_version < right.m_version; 00049 } 00051 friend bool operator == ( const ProcessingVersion& left, 00052 const ProcessingVersion& right) { 00053 return left.m_version == right.m_version; 00054 } 00055 00057 friend StreamBuffer& operator<< ( StreamBuffer& s, 00058 const ProcessingVersion& obj ) { 00059 return s << obj.m_version; 00060 } 00062 friend StreamBuffer& operator>> ( StreamBuffer& s, 00063 ProcessingVersion& obj ) { 00064 return s >> obj.m_version; 00065 } 00066 00068 friend std::ostream& operator<< ( std::ostream& s, 00069 const ProcessingVersion& obj ) { 00070 return obj.fillStream(s); 00071 } 00073 std::ostream& fillStream( std::ostream& s ) const { 00074 return s << "class ProcessingVersion : " 00075 << GlastEventField( GlastEvent::field5 ) 00076 << m_version; 00077 } 00078 00079 private: 00080 00081 // Version number 00082 long m_version; 00083 00084 }; 00085 00086 00087 #endif // LHCBEVENT_PROCESSINGVERSION_H
1.2.3 written by Dimitri van Heesch,
© 1997-2000