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

SummaryPID.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GlastEvent/GlastEvent/Utilities/SummaryPID.h,v 1.2 2001/04/18 19:07:26 igable Exp $
00002 #ifndef LHCBEVENT_SUMMARYPID_H
00003 #define LHCBEVENT_SUMMARYPID_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:   SummaryPId
00015 // 
00016 // Description: Class containg summary of all possible compatible
00017 //              particleID with a track
00018 //              For the moment it is a placeholder containg 2 
00019 //              integer values, where coded words for possible particle
00020 //              and antiparticleID are stored
00021 //
00022 // Author:      G.Corti
00023 // Changes:     P.Binko 19/10/1999 : Formating of ASCII output
00024 //
00025 //------------------------------------------------------------------------------
00026 
00027 
00028 class SummaryPID                                                               {
00029 
00030 public:
00031 
00032   // Constructors
00033   SummaryPID( long pValue, long antipValue )
00034     : m_pIDCode(pValue),
00035       m_antiPIDCode(antipValue)                                              { }
00036   SummaryPID()
00037     : m_pIDCode(0),
00038       m_antiPIDCode(0)                                                       { }
00039   // Destructor
00040   ~SummaryPID()                                                              { }
00041 
00042   // Retrieve first element of summary particle ID
00043   // at the moment coded word containing all comaptible particle IDs
00044   long pIDCode() const                                                       {
00045     return m_pIDCode;
00046   }
00047 
00049   void setPIDCode( long value )                                              {
00050     m_pIDCode = value;
00051   }
00052 
00053   // Retrieve second element of summary particle Id
00054   // at the moment coded word containing all comaptible particle IDs
00055   long antiPIDCode() const                                                   {
00056     return m_antiPIDCode;
00057   }
00058 
00060   void setAntiPIDCode( long value )                                          {
00061     m_antiPIDCode = value;
00062   }
00063 
00065   friend StreamBuffer& operator<< ( StreamBuffer& s, const SummaryPID& obj ) {
00066     return s
00067       << obj.m_pIDCode
00068       << obj.m_antiPIDCode;
00069   }
00070 
00072   friend StreamBuffer& operator>> ( StreamBuffer& s, SummaryPID& obj )       {
00073     return s
00074       >> obj.m_pIDCode
00075       >> obj.m_antiPIDCode;
00076   }
00077 
00079   friend std::ostream& operator<< ( std::ostream& s, const SummaryPID& obj ) {
00080     return obj.fillStream(s);
00081   }
00083   std::ostream& fillStream( std::ostream& s ) const                          {
00084     return s
00085       << "class SummaryPID : ( "
00086       << GlastEventField( GlastEvent::field5 )
00087       << m_pIDCode << ", "
00088       << GlastEventField( GlastEvent::field5 )
00089       << m_antiPIDCode << " )";
00090   }
00091 
00092 private:
00093 
00094   long m_pIDCode;                 // Particle ID Summary number
00095   long m_antiPIDCode;             // Anti Particle ID Summary number
00096 
00097 };
00098 
00099 
00100 #endif    // LHCBEVENT_PARTICLEID_H

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