00001
00002 #ifndef LHCBEVENT_PARTICLEID_H
00003 #define LHCBEVENT_PARTICLEID_H 1
00004
00005
00006
00007 #include <iostream>
00008 #include "GaudiKernel/StreamBuffer.h"
00009 #include "GlastEvent/TopLevel/Definitions.h"
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 class ParticleID {
00026
00027 public:
00028
00030 ParticleID( long id )
00031 : m_id(id) { }
00032 ParticleID()
00033 : m_id(0) { }
00035 ~ParticleID() { }
00036
00038 long id () const {
00039 return m_id;
00040 }
00042 operator long()const{return m_id;}
00043
00045 void setID (long value) {
00046 m_id = value;
00047 }
00048
00050 friend StreamBuffer& operator<< ( StreamBuffer& s, const ParticleID& obj ) {
00051 return s << obj.m_id;
00052 }
00054 friend StreamBuffer& operator>> ( StreamBuffer& s, ParticleID& obj ) {
00055 return s >> obj.m_id;
00056 }
00057
00059 friend std::ostream& operator<< ( std::ostream& s, const ParticleID& obj ) {
00060 return obj.fillStream(s);
00061 }
00063 std::ostream& fillStream( std::ostream& s ) const {
00064 return s << "class ParticleID : "
00065 << GlastEventField( GlastEvent::field4 )
00066 << m_id;
00067 }
00068
00069 private:
00070
00072 long m_id;
00073
00074 };
00075
00076
00077 #endif // LHCBEVENT_PARTICLEID_H