/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

TESDemoAntiNeutrino.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 TESDemoData_TESDemoAntiNeutrino_H
00016 #define TESDemoData_TESDemoAntiNeutrino_H 1
00017 
00018 // Include files
00019 #include "Event/TemporalDataObject.h"
00020 #include "Context/TimeStamp.h"
00021 #include "DataUtilities/TemporalObjectVector.h"
00022 #include "Event/TemporalContainedObject.h"
00023 #include "Event/TESDemoPositron.h"
00024 #include "Event/TESDemoNeutron.h"
00025 #include "GaudiKernel/boost_allocator.h"
00026 #include "GaudiKernel/SmartRef.h"
00027 #include <ostream>
00028 
00029 // Forward declarations
00030 
00031 namespace DayaBay 
00032 {
00033 
00034   // Forward declarations
00035 
00045   class TESDemoAntiNeutrino: public TemporalContainedObject
00046   {
00047   public:
00048 
00050     typedef TemporalObjectVector<TESDemoAntiNeutrino> Container;
00051   
00053   TESDemoAntiNeutrino(const DayaBay::TESDemoPositron* positron,
00054                         const DayaBay::TESDemoNeutron* neutron);
00055   
00057     TESDemoAntiNeutrino() {}
00058   
00060   virtual ~TESDemoAntiNeutrino();
00061   
00063    virtual std::ostream& fillStream(std::ostream& s) const;
00064   
00066     void setPositron(const SmartRef<DayaBay::TESDemoPositron>& value);
00067   
00069     void setPositron(const DayaBay::TESDemoPositron* value);
00070   
00072     void setNeutron(const SmartRef<DayaBay::TESDemoNeutron>& value);
00073   
00075     void setNeutron(const DayaBay::TESDemoNeutron* value);
00076   
00079   const DayaBay::TESDemoPositron* positron() const;
00080   
00083   const DayaBay::TESDemoNeutron* neutron() const;
00084   
00085   
00086   #ifndef GOD_NOALLOC
00087 
00088     static void* operator new ( size_t size )
00089     {
00090       return ( sizeof(TESDemoAntiNeutrino) == size ? 
00091                boost::singleton_pool<TESDemoAntiNeutrino, sizeof(TESDemoAntiNeutrino)>::malloc() :
00092                ::operator new(size) );
00093     }
00094   
00098     static void* operator new ( size_t size, void* pObj )
00099     {
00100       return ::operator new (size,pObj);
00101     }
00102   
00104     static void operator delete ( void* p )
00105     {
00106       boost::singleton_pool<TESDemoAntiNeutrino, sizeof(TESDemoAntiNeutrino)>::is_from(p) ?
00107       boost::singleton_pool<TESDemoAntiNeutrino, sizeof(TESDemoAntiNeutrino)>::free(p) :
00108       ::operator delete(p);
00109     }
00110   
00113     static void operator delete ( void* p, void* pObj )
00114     {
00115       ::operator delete (p, pObj);
00116     }
00117   #endif
00118   protected:
00119 
00120   private:
00121 
00122     SmartRef<DayaBay::TESDemoPositron> m_positron; 
00123     SmartRef<DayaBay::TESDemoNeutron>  m_neutron;  
00124   
00125   }; // class TESDemoAntiNeutrino
00126 
00127   inline std::ostream& operator<< (std::ostream& str, const TESDemoAntiNeutrino& 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::TESDemoAntiNeutrino::TESDemoAntiNeutrino(const DayaBay::TESDemoPositron* positron,
00141                                                          const DayaBay::TESDemoNeutron* neutron) 
00142 {
00143 
00144           setPositron(positron);
00145           setNeutron(neutron);
00146           setEarliest(positron->timeStamp());
00147           setLatest(neutron->timeStamp());
00148       
00149 }
00150 
00151 inline DayaBay::TESDemoAntiNeutrino::~TESDemoAntiNeutrino() 
00152 {
00153 
00154           // Takes care of reference counting
00155                 setNeutron(0);
00156           setPositron(0);
00157         
00158 }
00159 
00160 inline std::ostream& DayaBay::TESDemoAntiNeutrino::fillStream(std::ostream& s) const
00161 {
00162   TemporalContainedObject::fillStream(s);
00163   return s;
00164 }
00165 
00166 
00167 inline const DayaBay::TESDemoPositron* DayaBay::TESDemoAntiNeutrino::positron() const 
00168 {
00169   return m_positron;
00170 }
00171 
00172 inline const DayaBay::TESDemoNeutron* DayaBay::TESDemoAntiNeutrino::neutron() const 
00173 {
00174   return m_neutron;
00175 }
00176 
00177 
00178 #endif ///TESDemoData_TESDemoAntiNeutrino_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:08:47 for TESDemoData by doxygen 1.7.4