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

In This Package:

CalibSource.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 RunData_CalibSource_H
00016 #define RunData_CalibSource_H 1
00017 
00018 // Include files
00019 #include "Conventions/Calibration.h"
00020 #include "GaudiKernel/boost_allocator.h"
00021 #include <ostream>
00022 
00023 // Forward declarations
00024 
00025 namespace DayaBay 
00026 {
00027 
00028   // Forward declarations
00029 
00039   class CalibSource
00040   {
00041   public:
00042 
00044     CalibSource() : m_id(DayaBay::CalibSourceId(0)),
00045                     m_ledFrequency(0),
00046                     m_adZPosition(0) {}
00047   
00049     CalibSource(const CalibSource & rh);
00050   
00052      CalibSource & operator=(const CalibSource & rh);
00053   
00055     virtual ~CalibSource() {}
00056   
00058    virtual std::ostream& fillStream(std::ostream& s) const;
00059   
00062   const DayaBay::CalibSourceId& id() const;
00063   
00066   void setId(const DayaBay::CalibSourceId& value);
00067   
00070   double ledFrequency() const;
00071   
00074   void setLedFrequency(double value);
00075   
00078   double adZPosition() const;
00079   
00082   void setAdZPosition(double value);
00083   
00084   
00085   #ifndef GOD_NOALLOC
00087     static void* operator new ( size_t size )
00088     {
00089       return ( sizeof(CalibSource) == size ? 
00090                boost::singleton_pool<CalibSource, sizeof(CalibSource)>::malloc() :
00091                ::operator new(size) );
00092     }
00093   
00097     static void* operator new ( size_t size, void* pObj )
00098     {
00099       return ::operator new (size,pObj);
00100     }
00101   
00103     static void operator delete ( void* p )
00104     {
00105       boost::singleton_pool<CalibSource, sizeof(CalibSource)>::is_from(p) ?
00106       boost::singleton_pool<CalibSource, sizeof(CalibSource)>::free(p) :
00107       ::operator delete(p);
00108     }
00109   
00112     static void operator delete ( void* p, void* pObj )
00113     {
00114       ::operator delete (p, pObj);
00115     }
00116   #endif
00117   protected:
00118 
00119   private:
00120 
00121     DayaBay::CalibSourceId m_id;           
00122     double                 m_ledFrequency; 
00123     double                 m_adZPosition;  
00124   
00125   }; // class CalibSource
00126 
00127   inline std::ostream& operator<< (std::ostream& str, const CalibSource& obj)
00128   {
00129     return obj.fillStream(str);
00130   }
00131   
00132 } // namespace DayaBay;
00133 
00134 // -----------------------------------------------------------------------------
00135 // end of class
00136 // -----------------------------------------------------------------------------
00137 
00138 // Including forward declarations
00139 
00140 inline DayaBay::CalibSource::CalibSource(const DayaBay::CalibSource & rh) : 
00141    m_id( rh.m_id ),
00142    m_ledFrequency( rh.m_ledFrequency ),
00143    m_adZPosition( rh.m_adZPosition )
00144    {}
00145 
00146 inline DayaBay::CalibSource & DayaBay::CalibSource::operator=(const DayaBay::CalibSource & rh) {
00147   if ( this != &rh ) {
00148     m_id           = rh.m_id;
00149     m_ledFrequency = rh.m_ledFrequency;
00150     m_adZPosition  = rh.m_adZPosition;
00151   }
00152   return *this;
00153 }
00154 
00155 inline std::ostream& DayaBay::CalibSource::fillStream(std::ostream& s) const
00156 {
00157   s << "{ " << "id :    " << m_id << std::endl
00158             << "ledFrequency :  " << (float)m_ledFrequency << std::endl
00159             << "adZPosition :   " << (float)m_adZPosition << std::endl << " }";
00160   return s;
00161 }
00162 
00163 
00164 inline const DayaBay::CalibSourceId& DayaBay::CalibSource::id() const 
00165 {
00166   return m_id;
00167 }
00168 
00169 inline void DayaBay::CalibSource::setId(const DayaBay::CalibSourceId& value) 
00170 {
00171   m_id = value;
00172 }
00173 
00174 inline double DayaBay::CalibSource::ledFrequency() const 
00175 {
00176   return m_ledFrequency;
00177 }
00178 
00179 inline void DayaBay::CalibSource::setLedFrequency(double value) 
00180 {
00181   m_ledFrequency = value;
00182 }
00183 
00184 inline double DayaBay::CalibSource::adZPosition() const 
00185 {
00186   return m_adZPosition;
00187 }
00188 
00189 inline void DayaBay::CalibSource::setAdZPosition(double value) 
00190 {
00191   m_adZPosition = value;
00192 }
00193 
00194 
00195 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:22:13 2011 for RunData by doxygen 1.4.7