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

IrfCalHit.h

Go to the documentation of this file.
00001 #ifndef IrfCalHit_H
00002 #define IrfCalHit_H 1
00003 
00004 
00005 // Include files
00006 #include <iostream>
00007 #include "GaudiKernel/Kernel.h"
00008 #include "GaudiKernel/ContainedObject.h"
00009 #include "GaudiKernel/SmartRefVector.h"
00010 #include "GlastEvent/TopLevel/Definitions.h"
00011 #include "GlastEvent/Utilities/CellID.h"
00012 #include "GaudiKernel/ObjectVector.h"
00013 #include "GaudiKernel/ObjectList.h"
00014 
00015 
00017 extern const CLID& CLID_IrfCalHit;
00024 //------------------------------------------------------------------------------
00025 //
00026 // GlastName:   IrfCalHits
00027 //
00028 // Notes:       This class was reworked from the class of the same name in  
00029 //              LHCbEvent
00030 //
00031 //
00032 //------------------------------------------------------------------------------
00033 
00034 class IrfCalHit : virtual public ContainedObject {
00035 
00036 public:
00038   IrfCalHit()                                    { }
00040   virtual ~IrfCalHit()                           { }
00041 
00043   virtual const CLID& clID() const   { return IrfCalHit::classID(); }
00044   static const CLID& classID()       { return CLID_IrfCalHit; }
00045 
00047   double energy() const                                 { return m_energy; }
00049   void setEnergy( double value )                        { m_energy = value; }
00050 
00051 
00053   virtual StreamBuffer& serialize( StreamBuffer& s );
00055   virtual StreamBuffer& serialize( StreamBuffer& s ) const;
00057   virtual std::ostream& fillStream( std::ostream& s ) const;
00058 
00059   
00061   double plusResponse() const               { return m_plusEnd; }
00062   void  setPlusResponse(float value)       { m_plusEnd = value; }
00063 
00065   double minusResponse() const                { return m_minusEnd; }
00066   void  setMinusResponse(float value)        {m_minusEnd = value;}
00067 
00069   unsigned int layer () const               { return m_layer; }
00070   void setLayer(unsigned int value)         { m_layer = value; }
00071 
00073   unsigned int index () const               { return m_index; }
00074   void setId (long value)                   { m_id = value; }
00075 
00076 
00077 
00078 private:
00079   
00080   double m_energy;  
00081   double m_minusEnd;  // response from the diode on the "left" end of the log
00082   double m_plusEnd; // response from the diode on the "right" end of the log  
00083 
00084   
00085   unsigned int         m_index;    // index of this crystal within a layer
00086   unsigned int         m_layer;    // layer number
00087   unsigned int         m_id;       // Log index number
00088 
00089 
00090 };
00091 
00092 
00094 inline StreamBuffer& IrfCalHit::serialize( StreamBuffer& s ) const                 {
00095   ContainedObject::serialize(s);
00096   return s
00097     << m_energy
00098     << m_minusEnd
00099     << m_plusEnd;
00100 }
00101 
00102 
00104 inline StreamBuffer& IrfCalHit::serialize( StreamBuffer& s )                       {
00105   ContainedObject::serialize(s);
00106   return s
00107     >> m_energy
00108     >> m_minusEnd
00109     >> m_plusEnd;
00110 }
00111 
00112 
00114 inline std::ostream& IrfCalHit::fillStream( std::ostream& s ) const                {
00115   return s
00116     << "class IrfCalHit :"
00117     << "\n    Energy    = "
00118     << m_energy
00119     << m_minusEnd
00120     << m_plusEnd;
00121 }
00122 
00123   
00125 template <class TYPE> class ObjectVector;
00126 typedef ObjectVector<IrfCalHit>     IrfCalHitVector;
00127 template <class TYPE> class ObjectList;
00128 typedef ObjectList<IrfCalHit>       IrfCalHitList;
00129 
00130 
00131 #endif // GLASTEVENT_IrfCalHit_H

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