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

In This Package:

TemporalContainedObject.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 BaseEvent_TemporalContainedObject_H
00016 #define BaseEvent_TemporalContainedObject_H 1
00017 
00018 // Include files
00019 #include "GaudiKernel/ContainedObject.h"
00020 #include "Event/ITemporal.h"
00021 #include "Context/TimeStamp.h"
00022 #include "GaudiKernel/ObjectVector.h"
00023 #include "GaudiKernel/boost_allocator.h"
00024 #include <ostream>
00025 
00026 // Forward declarations
00027 
00028 namespace DayaBay 
00029 {
00030 
00031   // Forward declarations
00032 
00043   class TemporalContainedObject: public ContainedObject, virtual public ITemporal
00044   {
00045   public:
00046 
00048   typedef ObjectVector<TemporalContainedObject> Container;
00049   
00051     TemporalContainedObject() : m_earliest(),
00052                                 m_latest() {}
00053   
00055     virtual ~TemporalContainedObject() {}
00056   
00058    virtual std::ostream& fillStream(std::ostream& s) const;
00059   
00062     virtual const TimeStamp& earliest() const;
00063   
00066   void setEarliest(const TimeStamp& value);
00067   
00070     virtual const TimeStamp& latest() const;
00071   
00074   void setLatest(const TimeStamp& value);
00075   
00076   
00077   #ifndef GOD_NOALLOC
00079     static void* operator new ( size_t size )
00080     {
00081       return ( sizeof(TemporalContainedObject) == size ? 
00082                boost::singleton_pool<TemporalContainedObject, sizeof(TemporalContainedObject)>::malloc() :
00083                ::operator new(size) );
00084     }
00085   
00089     static void* operator new ( size_t size, void* pObj )
00090     {
00091       return ::operator new (size,pObj);
00092     }
00093   
00095     static void operator delete ( void* p )
00096     {
00097       boost::singleton_pool<TemporalContainedObject, sizeof(TemporalContainedObject)>::is_from(p) ?
00098       boost::singleton_pool<TemporalContainedObject, sizeof(TemporalContainedObject)>::free(p) :
00099       ::operator delete(p);
00100     }
00101   
00104     static void operator delete ( void* p, void* pObj )
00105     {
00106       ::operator delete (p, pObj);
00107     }
00108   #endif
00109   protected:
00110 
00111   private:
00112 
00113     TimeStamp m_earliest; 
00114     TimeStamp m_latest;   
00115   
00116   }; // class TemporalContainedObject
00117 
00119   typedef ObjectVector<TemporalContainedObject> TemporalContainedObjects;
00120   
00121   inline std::ostream& operator<< (std::ostream& str, const TemporalContainedObject& obj)
00122   {
00123     return obj.fillStream(str);
00124   }
00125   
00126 } // namespace DayaBay;
00127 
00128 // -----------------------------------------------------------------------------
00129 // end of class
00130 // -----------------------------------------------------------------------------
00131 
00132 // Including forward declarations
00133 
00134 inline std::ostream& DayaBay::TemporalContainedObject::fillStream(std::ostream& s) const
00135 {
00136   ITemporal::fillStream(s);
00137   s << "{ " << "earliest :      " << m_earliest << std::endl
00138             << "latest :        " << m_latest << std::endl << " }";
00139   return s;
00140 }
00141 
00142 
00143 inline const TimeStamp& DayaBay::TemporalContainedObject::earliest() const 
00144 {
00145   return m_earliest;
00146 }
00147 
00148 inline void DayaBay::TemporalContainedObject::setEarliest(const TimeStamp& value) 
00149 {
00150   m_earliest = value;
00151 }
00152 
00153 inline const TimeStamp& DayaBay::TemporalContainedObject::latest() const 
00154 {
00155   return m_latest;
00156 }
00157 
00158 inline void DayaBay::TemporalContainedObject::setLatest(const TimeStamp& value) 
00159 {
00160   m_latest = value;
00161 }
00162 
00163 
00164 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:18:02 2011 for BaseEvent by doxygen 1.4.7