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

In This Package:

HeaderObject.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_HeaderObject_H
00016 #define BaseEvent_HeaderObject_H 1
00017 
00018 // Include files
00019 #include "Event/IHeader.h"
00020 #include "Event/TemporalDataObject.h"
00021 #include "Context/Context.h"
00022 #include "Conventions/JobId.h"
00023 #include "GaudiKernel/boost_allocator.h"
00024 #include <vector>
00025 #include <ostream>
00026 
00027 // Forward declarations
00028 
00029 namespace DayaBay 
00030 {
00031 
00032   // Forward declarations
00033   
00034   // Class ID definition
00035   static const CLID CLID_HeaderObject = 51102;
00036   
00037   // Namespace for locations in TDS
00038   namespace HeaderObjectLocation {
00039     static const std::string& Default = "";
00040   }
00041   
00042 
00053   class HeaderObject: public TemporalDataObject, virtual public IHeader
00054   {
00055   public:
00056 
00058   static const std::string& defaultLocation() { return HeaderObjectLocation::Default; }
00059   virtual const std::string& defLoc() const { return HeaderObjectLocation::Default; }
00060   
00062     HeaderObject() : m_context(),
00063                      m_execNumber(0),
00064                      m_randomState(),
00065                      m_inputHeaders(),
00066                      m_jobId() {}
00067   
00069   ~HeaderObject();
00070   
00071     // Retrieve pointer to class definition structure
00072     virtual const CLID& clID() const;
00073     static const CLID& classID();
00074   
00076     void setInputHeaders(const std::vector<const DayaBay::IHeader*>& iheaders);
00077   
00079     void addInputHeader(const DayaBay::IHeader* iheader);
00080   
00082     std::ostream& fillStream(std::ostream& s) const;
00083   
00085     const TimeStamp& timeStamp() const;
00086   
00088     void setTimeStamp(const TimeStamp& ts);
00089   
00091     const std::vector<const DayaBay::IHeader*> findHeaders(const CLID& clid) const;
00092   
00095   const Context& context() const;
00096   
00099   void setContext(const Context& value);
00100   
00103   int execNumber() const;
00104   
00107   void setExecNumber(int value);
00108   
00111   const std::vector<unsigned long>& randomState() const;
00112   
00115   void setRandomState(const std::vector<unsigned long>& value);
00116   
00119   const std::vector<const DayaBay::IHeader*>& inputHeaders() const;
00120   
00123   const DayaBay::JobId& jobId() const;
00124   
00127   void setJobId(const DayaBay::JobId& value);
00128   
00129   
00130   #ifndef GOD_NOALLOC
00132     static void* operator new ( size_t size )
00133     {
00134       return ( sizeof(HeaderObject) == size ? 
00135                boost::singleton_pool<HeaderObject, sizeof(HeaderObject)>::malloc() :
00136                ::operator new(size) );
00137     }
00138   
00142     static void* operator new ( size_t size, void* pObj )
00143     {
00144       return ::operator new (size,pObj);
00145     }
00146   
00148     static void operator delete ( void* p )
00149     {
00150       boost::singleton_pool<HeaderObject, sizeof(HeaderObject)>::is_from(p) ?
00151       boost::singleton_pool<HeaderObject, sizeof(HeaderObject)>::free(p) :
00152       ::operator delete(p);
00153     }
00154   
00157     static void operator delete ( void* p, void* pObj )
00158     {
00159       ::operator delete (p, pObj);
00160     }
00161   #endif
00162   protected:
00163 
00164   private:
00165 
00166     Context                              m_context;      
00167     int                                  m_execNumber;   
00168     std::vector<unsigned long>           m_randomState;  
00169     std::vector<const DayaBay::IHeader*> m_inputHeaders; 
00170     DayaBay::JobId                       m_jobId;        
00171   
00172   }; // class HeaderObject
00173 
00174   inline std::ostream& operator<< (std::ostream& str, const HeaderObject& obj)
00175   {
00176     return obj.fillStream(str);
00177   }
00178   
00179 } // namespace DayaBay;
00180 
00181 // -----------------------------------------------------------------------------
00182 // end of class
00183 // -----------------------------------------------------------------------------
00184 
00185 // Including forward declarations
00186 
00187 inline const CLID& DayaBay::HeaderObject::clID() const
00188 {
00189   return DayaBay::HeaderObject::classID();
00190 }
00191 
00192 inline const CLID& DayaBay::HeaderObject::classID()
00193 {
00194   return CLID_HeaderObject;
00195 }
00196 
00197 inline const Context& DayaBay::HeaderObject::context() const 
00198 {
00199   return m_context;
00200 }
00201 
00202 inline void DayaBay::HeaderObject::setContext(const Context& value) 
00203 {
00204   m_context = value;
00205 }
00206 
00207 inline int DayaBay::HeaderObject::execNumber() const 
00208 {
00209   return m_execNumber;
00210 }
00211 
00212 inline void DayaBay::HeaderObject::setExecNumber(int value) 
00213 {
00214   m_execNumber = value;
00215 }
00216 
00217 inline const std::vector<unsigned long>& DayaBay::HeaderObject::randomState() const 
00218 {
00219   return m_randomState;
00220 }
00221 
00222 inline void DayaBay::HeaderObject::setRandomState(const std::vector<unsigned long>& value) 
00223 {
00224   m_randomState = value;
00225 }
00226 
00227 inline const std::vector<const DayaBay::IHeader*>& DayaBay::HeaderObject::inputHeaders() const 
00228 {
00229   return m_inputHeaders;
00230 }
00231 
00232 inline const DayaBay::JobId& DayaBay::HeaderObject::jobId() const 
00233 {
00234   return m_jobId;
00235 }
00236 
00237 inline void DayaBay::HeaderObject::setJobId(const DayaBay::JobId& value) 
00238 {
00239   m_jobId = value;
00240 }
00241 
00242 
00243 #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