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

In This Package:

GenHeader.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 GenEvent_GenHeader_H
00016 #define GenEvent_GenHeader_H 1
00017 
00018 // Include files
00019 #include "HepMC/GenEvent.h"
00020 #include "Event/HeaderObject.h"
00021 #include "GaudiKernel/boost_allocator.h"
00022 #include <ostream>
00023 
00024 // Forward declarations
00025 
00026 namespace DayaBay 
00027 {
00028 
00029   // Forward declarations
00030   
00031   // Class ID definition
00032   static const CLID CLID_GenHeader = 51201;
00033   
00034   // Namespace for locations in TDS
00035   namespace GenHeaderLocation {
00036     static const std::string& Default = "/Event/Gen/GenHeader";
00037   }
00038   
00039 
00049   class GenHeader: public HeaderObject
00050   {
00051   public:
00052 
00054   static const std::string& defaultLocation() { return GenHeaderLocation::Default; }
00055   virtual const std::string& defLoc() const { return GenHeaderLocation::Default; }
00056   
00058     enum statusType{ Unknown = 0,
00059                      StableInProdGen = 1,
00060                      DecayedByProdGen = 2,
00061                      DocumentationParticle = 3
00062       };
00063   
00065     GenHeader() : m_generatorName("Unknown"),
00066                   m_event(0) {}
00067   
00069   virtual ~GenHeader();
00070   
00071     // Retrieve pointer to class definition structure
00072     virtual const CLID& clID() const;
00073     static const CLID& classID();
00074   
00076     void setEvent(HepMC::GenEvent* event);
00077   
00079     std::ostream& fillStream(std::ostream& s) const;
00080   
00083   const std::string& generatorName() const;
00084   
00087   void setGeneratorName(const std::string& value);
00088   
00091   const HepMC::GenEvent* event() const;
00092   
00095   HepMC::GenEvent* event();
00096   
00097   
00098   #ifndef GOD_NOALLOC
00100     static void* operator new ( size_t size )
00101     {
00102       return ( sizeof(GenHeader) == size ? 
00103                boost::singleton_pool<GenHeader, sizeof(GenHeader)>::malloc() :
00104                ::operator new(size) );
00105     }
00106   
00110     static void* operator new ( size_t size, void* pObj )
00111     {
00112       return ::operator new (size,pObj);
00113     }
00114   
00116     static void operator delete ( void* p )
00117     {
00118       boost::singleton_pool<GenHeader, sizeof(GenHeader)>::is_from(p) ?
00119       boost::singleton_pool<GenHeader, sizeof(GenHeader)>::free(p) :
00120       ::operator delete(p);
00121     }
00122   
00125     static void operator delete ( void* p, void* pObj )
00126     {
00127       ::operator delete (p, pObj);
00128     }
00129   #endif
00130   protected:
00131 
00132   private:
00133 
00134     std::string      m_generatorName; 
00135     HepMC::GenEvent* m_event;         
00136   
00137   }; // class GenHeader
00138 
00139   inline std::ostream& operator<< (std::ostream& str, const GenHeader& obj)
00140   {
00141     return obj.fillStream(str);
00142   }
00143   
00144   inline std::ostream & operator << (std::ostream & s, DayaBay::GenHeader::statusType e) {
00145     switch (e) {
00146       case DayaBay::GenHeader::Unknown               : return s << "Unknown";
00147       case DayaBay::GenHeader::StableInProdGen       : return s << "StableInProdGen";
00148       case DayaBay::GenHeader::DecayedByProdGen      : return s << "DecayedByProdGen";
00149       case DayaBay::GenHeader::DocumentationParticle : return s << "DocumentationParticle";
00150       default : return s << "ERROR wrong value for enum DayaBay::GenHeader::statusType";
00151     }
00152   }
00153   
00154   
00155 } // namespace DayaBay;
00156 
00157 // -----------------------------------------------------------------------------
00158 // end of class
00159 // -----------------------------------------------------------------------------
00160 
00161 // Including forward declarations
00162 
00163 inline const CLID& DayaBay::GenHeader::clID() const
00164 {
00165   return DayaBay::GenHeader::classID();
00166 }
00167 
00168 inline const CLID& DayaBay::GenHeader::classID()
00169 {
00170   return CLID_GenHeader;
00171 }
00172 
00173 inline const std::string& DayaBay::GenHeader::generatorName() const 
00174 {
00175   return m_generatorName;
00176 }
00177 
00178 inline void DayaBay::GenHeader::setGeneratorName(const std::string& value) 
00179 {
00180   m_generatorName = value;
00181 }
00182 
00183 inline const HepMC::GenEvent* DayaBay::GenHeader::event() const 
00184 {
00185   return m_event;
00186 }
00187 
00188 inline HepMC::GenEvent* DayaBay::GenHeader::event() 
00189 {
00190   return m_event;
00191 }
00192 
00193 
00194 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:33:11 2011 for GenEvent by doxygen 1.4.7