![]() |
|
|||
File indexing completed on 2025-08-05 08:21:08
0001 /** 0002 \file factory.h 0003 0004 \author Thomas Burton 0005 \date 10/9/12 0006 \copyright 2012 BNL. 0007 */ 0008 0009 #ifndef _PYTHIAERHIC_FACTORY_H_ 0010 #define _PYTHIAERHIC_FACTORY_H_ 0011 0012 #include <string> 0013 0014 #include <eicsmear/erhic/EventFactory.h> 0015 0016 class TBranch; 0017 class TTree; 0018 0019 // Forward declaration of erhic::EventPythia. 0020 namespace erhic { 0021 class EventPythia; 0022 } // namespace erhic 0023 0024 /** 0025 Factor class for PYTHIA events. 0026 Handles creating the ROOT tree branch and copying values from 0027 PYTHIA common blocks/modules to the event. 0028 */ 0029 class Factory : public erhic::VirtualEventFactory { 0030 public: 0031 0032 /** Constructor */ 0033 Factory(); 0034 0035 /** Destructor */ 0036 virtual ~Factory(); 0037 0038 /** Populate the stored event with the current contents of 0039 PYTHIA and return a pointer to the event. 0040 Do not delete this pointer! 0041 */ 0042 erhic::EventPythia* Create(); 0043 0044 /** 0045 Returns a string with the full (including namespace) class name 0046 of the event type produced. 0047 This is important for use with ROOT TTree to ensure the correct 0048 event type in branches. 0049 */ 0050 virtual std::string EventName() const; 0051 0052 /** 0053 Add a branch named "name" for the event type generated 0054 by this factory to a ROOT TTree. 0055 Returns a pointer to the branch, or NULL in the case of an error. 0056 */ 0057 virtual TBranch* Branch(TTree& tree, const std::string& name); 0058 0059 private: 0060 0061 erhic::EventPythia* mEvent; 0062 }; // class Factory 0063 0064 #endif // _PYTHIAERHIC_FACTORY_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |