| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ElecCrate.h

Go to the documentation of this file.
00001 
00002 //   **************************************************************************
00003 //   *                                                                        *
00004 //   *                      ! ! ! A T T E N T I O N ! ! !                     *
00005 //   *                                                                        *
00006 //   *  This file was created automatically by GaudiObjDesc, please do not    *
00007 //   *  delete it or edit it by hand.                                         *
00008 //   *                                                                        *
00009 //   *  If you want to change this file, first change the corresponding       *
00010 //   *  xml-file and rerun the tools from GaudiObjDesc (or run make if you    *
00011 //   *  are using it from inside a Gaudi-package).                            *
00012 //   *                                                                        *
00013 //   **************************************************************************
00014 
00015 #ifndef ElecEvent_ElecCrate_H
00016 #define ElecEvent_ElecCrate_H 1
00017 
00018 // Include files
00019 #include "Conventions/Detectors.h"
00020 #include "Conventions/Electronics.h"
00021 #include "Event/TemporalDataObject.h"
00022 #include "GaudiKernel/boost_allocator.h"
00023 #include <ostream>
00024 
00025 // Forward declarations
00026 
00027 namespace DayaBay 
00028 {
00029 
00030   // Forward declarations
00031   class ElecCrateHeader;
00032   
00033 
00043   class ElecCrate
00044   {
00045   public:
00046 
00048   ElecCrate(const DayaBay::Detector& detector,
00049               DayaBay::ElecCrateHeader* header);
00050   
00052   ElecCrate(const Site::Site_t& site,
00053               const DetectorId::DetectorId_t& detectorId,
00054               DayaBay::ElecCrateHeader* header);
00055   
00057     ElecCrate() : m_detector(0),
00058                   m_header(0) {}
00059   
00061     virtual ~ElecCrate() {}
00062   
00064    virtual std::ostream& fillStream(std::ostream& s) const;
00065   
00068   const DayaBay::Detector& detector() const;
00069   
00072   void setDetector(const DayaBay::Detector& value);
00073   
00076   const DayaBay::ElecCrateHeader* header() const;
00077   
00080   void setHeader(DayaBay::ElecCrateHeader* value);
00081   
00082   
00083   #ifndef GOD_NOALLOC
00085     static void* operator new ( size_t size )
00086     {
00087       return ( sizeof(ElecCrate) == size ? 
00088                boost::singleton_pool<ElecCrate, sizeof(ElecCrate)>::malloc() :
00089                ::operator new(size) );
00090     }
00091   
00095     static void* operator new ( size_t size, void* pObj )
00096     {
00097       return ::operator new (size,pObj);
00098     }
00099   
00101     static void operator delete ( void* p )
00102     {
00103       boost::singleton_pool<ElecCrate, sizeof(ElecCrate)>::is_from(p) ?
00104       boost::singleton_pool<ElecCrate, sizeof(ElecCrate)>::free(p) :
00105       ::operator delete(p);
00106     }
00107   
00110     static void operator delete ( void* p, void* pObj )
00111     {
00112       ::operator delete (p, pObj);
00113     }
00114   #endif
00115   protected:
00116 
00117   private:
00118 
00119     DayaBay::Detector         m_detector; 
00120     DayaBay::ElecCrateHeader* m_header;   
00121   
00122   }; // class ElecCrate
00123 
00124   inline std::ostream& operator<< (std::ostream& str, const ElecCrate& obj)
00125   {
00126     return obj.fillStream(str);
00127   }
00128   
00129 } // namespace DayaBay;
00130 
00131 // -----------------------------------------------------------------------------
00132 // end of class
00133 // -----------------------------------------------------------------------------
00134 
00135 // Including forward declarations
00136 #include "Event/ElecCrateHeader.h"
00137 
00138 
00139 inline DayaBay::ElecCrate::ElecCrate(const DayaBay::Detector& detector,
00140                                      DayaBay::ElecCrateHeader* header) 
00141 {
00142 
00143           setDetector(detector);
00144           setHeader(header);
00145         
00146 }
00147 
00148 inline DayaBay::ElecCrate::ElecCrate(const Site::Site_t& site,
00149                                      const DetectorId::DetectorId_t& detectorId,
00150                                      DayaBay::ElecCrateHeader* header) 
00151 {
00152 
00153           setDetector(DayaBay::Detector(site,
00154                                         detectorId));
00155           setHeader(header);
00156         
00157 }
00158 
00159 inline std::ostream& DayaBay::ElecCrate::fillStream(std::ostream& s) const
00160 {
00161   s << "{ " << "detector :      " << m_detector << std::endl
00162             << "header :        " << m_header << std::endl << " }";
00163   return s;
00164 }
00165 
00166 
00167 inline const DayaBay::Detector& DayaBay::ElecCrate::detector() const 
00168 {
00169   return m_detector;
00170 }
00171 
00172 inline void DayaBay::ElecCrate::setDetector(const DayaBay::Detector& value) 
00173 {
00174   m_detector = value;
00175 }
00176 
00177 inline const DayaBay::ElecCrateHeader* DayaBay::ElecCrate::header() const 
00178 {
00179   return m_header;
00180 }
00181 
00182 inline void DayaBay::ElecCrate::setHeader(DayaBay::ElecCrateHeader* value) 
00183 {
00184   m_header = value;
00185 }
00186 
00187 
00188 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:32:32 2011 for ElecEvent by doxygen 1.4.7