Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

TrMeasurement.h

Go to the documentation of this file.
00001 
00002 
00003 //   **************************************************************************
00004 //   *                                                                        *
00005 //   *                      ! ! ! A T T E N T I O N ! ! !                     *
00006 //   *                                                                        *
00007 //   *  This file was created automatically by GaudiObjDesc, please do not    *
00008 //   *  delete it or edit it by hand.                                         *
00009 //   *                                                                        *
00010 //   *  If you want to change this file, first change the corresponding       *
00011 //   *  xml-file and rerun the tools from GaudiObjDesc (or run make if you    *
00012 //   *  are using it from inside a Gaudi-package).                            *
00013 //   *                                                                        *
00014 //   **************************************************************************
00015 
00016 
00017 
00018 #ifndef TrEvent_TrMeasurement_H
00019 #define TrEvent_TrMeasurement_H 1
00020 
00021 // Include files
00022 #include "Kernel/CLHEPStreams.h"
00023 #include "Event/LHCbID.h"
00024 #include "GaudiKernel/ObjectList.h"
00025 #include "GaudiKernel/ObjectVector.h"
00026 #include "GaudiKernel/StreamBuffer.h"
00027 
00028 
00038 class TrMeasurement
00039 {
00040 
00041 public: 
00042 
00043   enum Type {OTMeasurement,STMeasurement,TTMeasurement,VeloRMeasurement,VeloPhiMeasurement};   
00044 
00046   TrMeasurement() 
00047     : m_type(0),
00048     m_measurement(0.0),
00049     m_errMeasurement(0.0),
00050     m_LHCbID() {}
00051 
00053   virtual ~TrMeasurement() {}
00054 
00056   virtual TrMeasurement* clone() const = 0;
00057 
00059   virtual double z() const = 0;
00060 
00062   int type() const; 
00063 
00065   void setType(int value);
00066 
00068   double measurement() const; 
00069 
00071   void setMeasurement(double value);
00072 
00074   double errMeasurement() const; 
00075 
00077   void setErrMeasurement(double value);
00078 
00080   const LHCbID& lhCbid() const; 
00081 
00083   LHCbID& lhCbid();
00084 
00086   void setLHCbID(const LHCbID& value);
00087 
00089   friend StreamBuffer& operator<< (StreamBuffer& s, const TrMeasurement& obj)
00090   {
00091     return obj.serialize(s);
00092   }
00093 
00095   friend StreamBuffer& operator>> (StreamBuffer& s, TrMeasurement& obj)
00096   {
00097     return obj.serialize(s);
00098   }
00099 
00101   friend std::ostream& operator<< (std::ostream& s, const TrMeasurement& obj)
00102   {
00103     return obj.fillStream(s);
00104   }
00105 
00107   virtual StreamBuffer& serialize(StreamBuffer& s) const;
00108 
00110   virtual StreamBuffer& serialize(StreamBuffer& s);
00111 
00113   virtual std::ostream& fillStream(std::ostream& s) const;
00114 
00115 protected: 
00116 
00117 private: 
00118 
00119   int    m_type;           
00120   double m_measurement;    
00121   double m_errMeasurement; 
00122   LHCbID m_LHCbID;         
00123 
00124 };
00125 
00126 // -----------------------------------------------------------------------------
00127 //   end of class
00128 // -----------------------------------------------------------------------------
00129 
00130 
00131 inline int TrMeasurement::type() const 
00132 {
00133   return m_type;
00134 }
00135 
00136 inline void TrMeasurement::setType(int value)
00137 {
00138   m_type = value; 
00139 }
00140 
00141 inline double TrMeasurement::measurement() const 
00142 {
00143   return m_measurement;
00144 }
00145 
00146 inline void TrMeasurement::setMeasurement(double value)
00147 {
00148   m_measurement = value; 
00149 }
00150 
00151 inline double TrMeasurement::errMeasurement() const 
00152 {
00153   return m_errMeasurement;
00154 }
00155 
00156 inline void TrMeasurement::setErrMeasurement(double value)
00157 {
00158   m_errMeasurement = value; 
00159 }
00160 
00161 inline const LHCbID& TrMeasurement::lhCbid() const 
00162 {
00163   return m_LHCbID;
00164 }
00165 
00166 inline LHCbID& TrMeasurement::lhCbid()
00167 {
00168   return m_LHCbID;
00169 }
00170 
00171 inline void TrMeasurement::setLHCbID(const LHCbID& value)
00172 {
00173   m_LHCbID = value; 
00174 }
00175 
00176 inline StreamBuffer& TrMeasurement::serialize(StreamBuffer& s) const 
00177 {
00178   s << m_type
00179     << (float)m_measurement
00180     << (float)m_errMeasurement
00181     << m_LHCbID;
00182   return s;
00183 }
00184 
00185 inline StreamBuffer& TrMeasurement::serialize(StreamBuffer& s)
00186 {
00187   float l_measurement, l_errMeasurement;
00188   s >> m_type
00189     >> l_measurement
00190     >> l_errMeasurement
00191     >> m_LHCbID;
00192   m_measurement = l_measurement;
00193   m_errMeasurement = l_errMeasurement;
00194   return s;
00195 }
00196 
00197 inline std::ostream& TrMeasurement::fillStream(std::ostream& s) const
00198 {
00199   s << "{ "
00200     << " type:\t" << m_type << std::endl
00201     << "   measurement:\t" << (float)m_measurement << std::endl
00202     << "   errMeasurement:\t" << (float)m_errMeasurement << std::endl
00203     << "   LHCbID:\t" << m_LHCbID << " } ";
00204   return s;
00205 }
00206 
00207 
00208 #endif   

Generated on Tue Sep 28 18:11:17 2004 for New Track Event Model by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002