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 RandomHeader_RandomHeader_H 00016 #define RandomHeader_RandomHeader_H 1 00017 00018 // Include files 00019 #include "Event/HeaderObject.h" 00020 #include "GaudiKernel/boost_allocator.h" 00021 #include "GaudiKernel/SerializeSTL.h" 00022 #include <ostream> 00023 00024 // Forward declarations 00025 00026 namespace DayaBay 00027 { 00028 00029 // Forward declarations 00030 using GaudiUtils::operator<<; 00031 00032 00033 // Class ID definition 00034 static const CLID CLID_RandomHeader = 51104; 00035 00036 // Namespace for locations in TDS 00037 namespace RandomHeaderLocation { 00038 static const std::string& Default = "/Event/Random/RandomHeader"; 00039 } 00040 00041 00051 class RandomHeader: public HeaderObject 00052 { 00053 public: 00054 00056 static const std::string& defaultLocation() { return RandomHeaderLocation::Default; } 00057 virtual const std::string& defLoc() const { return RandomHeaderLocation::Default; } 00058 00060 RandomHeader() : m_HEPEngine("HepRndm::Engine<CLHEP::RanluxEngine>"), 00061 m_RndmSeeds(0) {} 00062 00064 virtual ~RandomHeader() {} 00065 00066 // Retrieve pointer to class definition structure 00067 virtual const CLID& clID() const; 00068 static const CLID& classID(); 00069 00071 virtual std::ostream& fillStream(std::ostream& s) const; 00072 00075 const std::string& hepEngine() const; 00076 00079 void setHEPEngine(const std::string& value); 00080 00083 const std::vector<long>& RndmSeeds() const; 00084 00087 void setRndmSeeds(const std::vector<long>& value); 00088 00089 00090 #ifndef GOD_NOALLOC 00092 static void* operator new ( size_t size ) 00093 { 00094 return ( sizeof(RandomHeader) == size ? 00095 boost::singleton_pool<RandomHeader, sizeof(RandomHeader)>::malloc() : 00096 ::operator new(size) ); 00097 } 00098 00102 static void* operator new ( size_t size, void* pObj ) 00103 { 00104 return ::operator new (size,pObj); 00105 } 00106 00108 static void operator delete ( void* p ) 00109 { 00110 boost::singleton_pool<RandomHeader, sizeof(RandomHeader)>::is_from(p) ? 00111 boost::singleton_pool<RandomHeader, sizeof(RandomHeader)>::free(p) : 00112 ::operator delete(p); 00113 } 00114 00117 static void operator delete ( void* p, void* pObj ) 00118 { 00119 ::operator delete (p, pObj); 00120 } 00121 #endif 00122 protected: 00123 00124 private: 00125 00126 std::string m_HEPEngine; 00127 std::vector<long> m_RndmSeeds; 00128 00129 }; // class RandomHeader 00130 00131 inline std::ostream& operator<< (std::ostream& str, const RandomHeader& obj) 00132 { 00133 return obj.fillStream(str); 00134 } 00135 00136 } // namespace DayaBay; 00137 00138 // ----------------------------------------------------------------------------- 00139 // end of class 00140 // ----------------------------------------------------------------------------- 00141 00142 // Including forward declarations 00143 00144 inline const CLID& DayaBay::RandomHeader::clID() const 00145 { 00146 return DayaBay::RandomHeader::classID(); 00147 } 00148 00149 inline const CLID& DayaBay::RandomHeader::classID() 00150 { 00151 return CLID_RandomHeader; 00152 } 00153 00154 inline std::ostream& DayaBay::RandomHeader::fillStream(std::ostream& s) const 00155 { 00156 HeaderObject::fillStream(s); 00157 s << "{ " << "HEPEngine : " << m_HEPEngine << std::endl 00158 << "RndmSeeds : " << m_RndmSeeds << std::endl << " }"; 00159 return s; 00160 } 00161 00162 00163 inline const std::string& DayaBay::RandomHeader::hepEngine() const 00164 { 00165 return m_HEPEngine; 00166 } 00167 00168 inline void DayaBay::RandomHeader::setHEPEngine(const std::string& value) 00169 { 00170 m_HEPEngine = value; 00171 } 00172 00173 inline const std::vector<long>& DayaBay::RandomHeader::RndmSeeds() const 00174 { 00175 return m_RndmSeeds; 00176 } 00177 00178 inline void DayaBay::RandomHeader::setRndmSeeds(const std::vector<long>& value) 00179 { 00180 m_RndmSeeds = value; 00181 } 00182 00183 00184 #endif