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

In This Package:

ProcessHeader.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 EventBase_ProcessHeader_H
00016 #define EventBase_ProcessHeader_H 1
00017 
00018 // Include files
00019 #include "Kernel/CondDBNameTagPair.h"
00020 #include "GaudiKernel/DataObject.h"
00021 #include "GaudiKernel/boost_allocator.h"
00022 #include "GaudiKernel/SerializeSTL.h"
00023 #include <vector>
00024 #include <string>
00025 #include <ostream>
00026 
00027 // Forward declarations
00028 
00029 namespace LHCb 
00030 {
00031 
00032   // Forward declarations
00033   using GaudiUtils::operator<<;
00034   
00035   
00036   // Class ID definition
00037   static const CLID CLID_ProcessHeader = 103;
00038   
00039   // Namespace for locations in TDS
00040   namespace ProcessHeaderLocation {
00041     static const std::string& Digi = "MC/DigiHeader";
00042     static const std::string& MC = "MC/Header";
00043     static const std::string& Rec = "Rec/Header";
00044   }
00045   
00046 
00056   class ProcessHeader: public DataObject
00057   {
00058   public:
00059 
00061   ProcessHeader(const LHCb::ProcessHeader& head) : DataObject(),
00062                                                      m_randomSeeds(head.randomSeeds()),
00063                                                      m_applicationName(head.applicationName()),
00064                                                      m_applicationVersion(head.applicationVersion()),
00065                                                      m_runNumber(head.runNumber()),
00066                                                      m_condDBTags(head.condDBTags()) {}
00067   
00069     ProcessHeader() : m_randomSeeds(),
00070                       m_applicationName("Unknown"),
00071                       m_applicationVersion("Unknown"),
00072                       m_runNumber(0),
00073                       m_condDBTags() {}
00074   
00076     virtual ~ProcessHeader() {}
00077   
00078     // Retrieve pointer to class definition structure
00079     virtual const CLID& clID() const;
00080     static const CLID& classID();
00081   
00083    virtual std::ostream& fillStream(std::ostream& s) const;
00084   
00087   const std::vector < long int >& randomSeeds() const;
00088   
00091   void setRandomSeeds(const std::vector < long int >& value);
00092   
00095   const std::string& applicationName() const;
00096   
00099   void setApplicationName(const std::string& value);
00100   
00103   const std::string& applicationVersion() const;
00104   
00107   void setApplicationVersion(const std::string& value);
00108   
00111   unsigned int runNumber() const;
00112   
00115   void setRunNumber(unsigned int value);
00116   
00119   const std::vector<LHCb::CondDBNameTagPair>& condDBTags() const;
00120   
00123   void setCondDBTags(const std::vector<LHCb::CondDBNameTagPair>& value);
00124   
00125   
00126   #ifndef GOD_NOALLOC
00128     static void* operator new ( size_t size )
00129     {
00130       return ( sizeof(ProcessHeader) == size ? 
00131                boost::singleton_pool<ProcessHeader, sizeof(ProcessHeader)>::malloc() :
00132                ::operator new(size) );
00133     }
00134   
00138     static void* operator new ( size_t size, void* pObj )
00139     {
00140       return ::operator new (size,pObj);
00141     }
00142   
00144     static void operator delete ( void* p )
00145     {
00146       boost::singleton_pool<ProcessHeader, sizeof(ProcessHeader)>::is_from(p) ?
00147       boost::singleton_pool<ProcessHeader, sizeof(ProcessHeader)>::free(p) :
00148       ::operator delete(p);
00149     }
00150   
00153     static void operator delete ( void* p, void* pObj )
00154     {
00155       ::operator delete (p, pObj);
00156     }
00157   #endif
00158   protected:
00159 
00160   private:
00161 
00162     std::vector < long int >             m_randomSeeds;        
00163     std::string                          m_applicationName;    
00164     std::string                          m_applicationVersion; 
00165     unsigned int                         m_runNumber;          
00166     std::vector<LHCb::CondDBNameTagPair> m_condDBTags;         
00167   
00168   }; // class ProcessHeader
00169 
00170   inline std::ostream& operator<< (std::ostream& str, const ProcessHeader& obj)
00171   {
00172     return obj.fillStream(str);
00173   }
00174   
00175 } // namespace LHCb;
00176 
00177 // -----------------------------------------------------------------------------
00178 // end of class
00179 // -----------------------------------------------------------------------------
00180 
00181 // Including forward declarations
00182 
00183 inline const CLID& LHCb::ProcessHeader::clID() const
00184 {
00185   return LHCb::ProcessHeader::classID();
00186 }
00187 
00188 inline const CLID& LHCb::ProcessHeader::classID()
00189 {
00190   return CLID_ProcessHeader;
00191 }
00192 
00193 inline std::ostream& LHCb::ProcessHeader::fillStream(std::ostream& s) const
00194 {
00195   s << "{ " << "randomSeeds :   " << m_randomSeeds << std::endl
00196             << "applicationName :       " << m_applicationName << std::endl
00197             << "applicationVersion :    " << m_applicationVersion << std::endl
00198             << "runNumber :     " << m_runNumber << std::endl
00199             << "condDBTags :    " << m_condDBTags << std::endl << " }";
00200   return s;
00201 }
00202 
00203 
00204 inline const std::vector < long int >& LHCb::ProcessHeader::randomSeeds() const 
00205 {
00206   return m_randomSeeds;
00207 }
00208 
00209 inline void LHCb::ProcessHeader::setRandomSeeds(const std::vector < long int >& value) 
00210 {
00211   m_randomSeeds = value;
00212 }
00213 
00214 inline const std::string& LHCb::ProcessHeader::applicationName() const 
00215 {
00216   return m_applicationName;
00217 }
00218 
00219 inline void LHCb::ProcessHeader::setApplicationName(const std::string& value) 
00220 {
00221   m_applicationName = value;
00222 }
00223 
00224 inline const std::string& LHCb::ProcessHeader::applicationVersion() const 
00225 {
00226   return m_applicationVersion;
00227 }
00228 
00229 inline void LHCb::ProcessHeader::setApplicationVersion(const std::string& value) 
00230 {
00231   m_applicationVersion = value;
00232 }
00233 
00234 inline unsigned int LHCb::ProcessHeader::runNumber() const 
00235 {
00236   return m_runNumber;
00237 }
00238 
00239 inline void LHCb::ProcessHeader::setRunNumber(unsigned int value) 
00240 {
00241   m_runNumber = value;
00242 }
00243 
00244 inline const std::vector<LHCb::CondDBNameTagPair>& LHCb::ProcessHeader::condDBTags() const 
00245 {
00246   return m_condDBTags;
00247 }
00248 
00249 inline void LHCb::ProcessHeader::setCondDBTags(const std::vector<LHCb::CondDBNameTagPair>& value) 
00250 {
00251   m_condDBTags = value;
00252 }
00253 
00254 
00255 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:03:25 2011 for EventBase by doxygen 1.4.7