///////////////////////////////////////////////////////////////////////// // This class has been automatically generated // (at Tue Mar 25 17:47:57 2014 by ROOT version 5.34/14) // from TTree CollectionTree/CollectionTree // found on file: mc12_8TeV.110070.EVNT._00010.pool.root ///////////////////////////////////////////////////////////////////////// #ifndef ClassForEventGenerator_h #define ClassForEventGenerator_h // System Headers needed by the proxy #if defined(__CINT__) && !defined(__MAKECINT__) #define ROOT_Rtypes #define ROOT_TError #endif #include #include #include #include #include #include #include #include #include #include using namespace ROOT; // forward declarations needed by this particular proxy class EventInfo_p3; class McEventCollection_p5; class GenEvent_p5; class GenVertex_p5; class GenParticle_p5; // Header needed by this particular proxy #include "utility" class print_Interface { // This class defines the list of methods that are directly used by ClassForEventGenerator, // and that can be overloaded in the user's script public: void print_Begin(TTree*) {} void print_SlaveBegin(TTree*) {} Bool_t print_Notify() { return kTRUE; } Bool_t print_Process(Long64_t) { return kTRUE; } void print_SlaveTerminate() {} void print_Terminate() {} }; class ClassForEventGenerator : public TSelector, public print_Interface { public : TTree *fChain; //!pointer to the analyzed TTree or TChain TH1 *htemp; //!pointer to the histogram TBranchProxyDirector fDirector; //!Manages the proxys // Optional User methods TClass *fClass; // Pointer to this class's description // Wrapper class for each unwounded class struct TPx_EventInfo_p3 { TPx_EventInfo_p3(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix (top,mid), obj (director, top, mid), m_AllTheData (director, obj.GetProxy(), "m_AllTheData") {}; TPx_EventInfo_p3(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix (top,mid), obj (director, parent, membername), m_AllTheData (director, obj.GetProxy(), "m_AllTheData") {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); TBranchProxy obj; TObjProxy > m_AllTheData; }; struct TStlPx_vector_GenEvent_p5_ { TStlPx_vector_GenEvent_p5_(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix (top,mid), obj (director, top, mid), m_signalProcessId (director, obj.GetProxy(), "m_signalProcessId"), m_eventNbr (director, obj.GetProxy(), "m_eventNbr"), m_mpi (director, obj.GetProxy(), "m_mpi"), m_eventScale (director, obj.GetProxy(), "m_eventScale"), m_alphaQCD (director, obj.GetProxy(), "m_alphaQCD"), m_alphaQED (director, obj.GetProxy(), "m_alphaQED"), m_signalProcessVtx (director, obj.GetProxy(), "m_signalProcessVtx"), m_beamParticle1 (director, obj.GetProxy(), "m_beamParticle1"), m_beamParticle2 (director, obj.GetProxy(), "m_beamParticle2"), m_weights (director, obj.GetProxy(), "m_weights"), m_randomStates (director, obj.GetProxy(), "m_randomStates"), m_crossSection (director, obj.GetProxy(), "m_crossSection"), m_heavyIon (director, obj.GetProxy(), "m_heavyIon"), m_pdfinfo (director, obj.GetProxy(), "m_pdfinfo"), m_momentumUnit (director, obj.GetProxy(), "m_momentumUnit"), m_lengthUnit (director, obj.GetProxy(), "m_lengthUnit"), m_verticesBegin (director, obj.GetProxy(), "m_verticesBegin"), m_verticesEnd (director, obj.GetProxy(), "m_verticesEnd"), m_particlesBegin (director, obj.GetProxy(), "m_particlesBegin"), m_particlesEnd (director, obj.GetProxy(), "m_particlesEnd") {}; TStlPx_vector_GenEvent_p5_(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix (top,mid), obj (director, parent, membername), m_signalProcessId (director, obj.GetProxy(), "m_signalProcessId"), m_eventNbr (director, obj.GetProxy(), "m_eventNbr"), m_mpi (director, obj.GetProxy(), "m_mpi"), m_eventScale (director, obj.GetProxy(), "m_eventScale"), m_alphaQCD (director, obj.GetProxy(), "m_alphaQCD"), m_alphaQED (director, obj.GetProxy(), "m_alphaQED"), m_signalProcessVtx (director, obj.GetProxy(), "m_signalProcessVtx"), m_beamParticle1 (director, obj.GetProxy(), "m_beamParticle1"), m_beamParticle2 (director, obj.GetProxy(), "m_beamParticle2"), m_weights (director, obj.GetProxy(), "m_weights"), m_randomStates (director, obj.GetProxy(), "m_randomStates"), m_crossSection (director, obj.GetProxy(), "m_crossSection"), m_heavyIon (director, obj.GetProxy(), "m_heavyIon"), m_pdfinfo (director, obj.GetProxy(), "m_pdfinfo"), m_momentumUnit (director, obj.GetProxy(), "m_momentumUnit"), m_lengthUnit (director, obj.GetProxy(), "m_lengthUnit"), m_verticesBegin (director, obj.GetProxy(), "m_verticesBegin"), m_verticesEnd (director, obj.GetProxy(), "m_verticesEnd"), m_particlesBegin (director, obj.GetProxy(), "m_particlesBegin"), m_particlesEnd (director, obj.GetProxy(), "m_particlesEnd") {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); Int_t GetEntries() { return obj.GetEntries(); } TStlProxy obj; TStlIntProxy m_signalProcessId; TStlIntProxy m_eventNbr; TStlIntProxy m_mpi; TStlDoubleProxy m_eventScale; TStlDoubleProxy m_alphaQCD; TStlDoubleProxy m_alphaQED; TStlIntProxy m_signalProcessVtx; TStlIntProxy m_beamParticle1; TStlIntProxy m_beamParticle2; TStlObjProxy > m_weights; TStlObjProxy > m_randomStates; TStlObjProxy > m_crossSection; TStlObjProxy > m_heavyIon; TStlObjProxy > m_pdfinfo; TStlIntProxy m_momentumUnit; TStlIntProxy m_lengthUnit; TStlUIntProxy m_verticesBegin; TStlUIntProxy m_verticesEnd; TStlUIntProxy m_particlesBegin; TStlUIntProxy m_particlesEnd; }; struct TStlPx_vector_GenVertex_p5_ { TStlPx_vector_GenVertex_p5_(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix (top,mid), obj (director, top, mid), m_x (director, obj.GetProxy(), "m_x"), m_y (director, obj.GetProxy(), "m_y"), m_z (director, obj.GetProxy(), "m_z"), m_t (director, obj.GetProxy(), "m_t"), m_particlesIn (director, obj.GetProxy(), "m_particlesIn"), m_particlesOut (director, obj.GetProxy(), "m_particlesOut"), m_id (director, obj.GetProxy(), "m_id"), m_weights (director, obj.GetProxy(), "m_weights"), m_barcode (director, obj.GetProxy(), "m_barcode") {}; TStlPx_vector_GenVertex_p5_(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix (top,mid), obj (director, parent, membername), m_x (director, obj.GetProxy(), "m_x"), m_y (director, obj.GetProxy(), "m_y"), m_z (director, obj.GetProxy(), "m_z"), m_t (director, obj.GetProxy(), "m_t"), m_particlesIn (director, obj.GetProxy(), "m_particlesIn"), m_particlesOut (director, obj.GetProxy(), "m_particlesOut"), m_id (director, obj.GetProxy(), "m_id"), m_weights (director, obj.GetProxy(), "m_weights"), m_barcode (director, obj.GetProxy(), "m_barcode") {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); Int_t GetEntries() { return obj.GetEntries(); } TStlProxy obj; TStlFloatProxy m_x; TStlFloatProxy m_y; TStlFloatProxy m_z; TStlFloatProxy m_t; TStlObjProxy > m_particlesIn; TStlObjProxy > m_particlesOut; TStlIntProxy m_id; TStlObjProxy > m_weights; TStlIntProxy m_barcode; }; struct TStlPx_vector_pair_intCmint__ { TStlPx_vector_pair_intCmint__(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix(top,mid), obj(director, top, mid) {}; TStlPx_vector_pair_intCmint__(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix(top,mid), obj(director, parent, membername) {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); const vector >& At(UInt_t i) { static vector > default_val; if (!obj.Read()) return default_val; vector > *temp = (vector > *)( obj.GetProxy()->GetStlStart(i) ); if (temp) return *temp; else return default_val; } const vector >& operator[](Int_t i) { return At(i); } const vector >& operator[](UInt_t i) { return At(i); } Int_t GetEntries() { return obj.GetPtr()->size(); } const vector >* operator->() { return obj.GetPtr(); } operator vector >*() { return obj.GetPtr(); } TObjProxy > > obj; }; struct TStlPx_vector_GenParticle_p5_ { TStlPx_vector_GenParticle_p5_(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix (top,mid), obj (director, top, mid), m_px (director, obj.GetProxy(), "m_px"), m_py (director, obj.GetProxy(), "m_py"), m_pz (director, obj.GetProxy(), "m_pz"), m_m (director, obj.GetProxy(), "m_m"), m_pdgId (director, obj.GetProxy(), "m_pdgId"), m_status (director, obj.GetProxy(), "m_status"), m_flow (director, obj.GetProxy(), "m_flow"), m_thetaPolarization (director, obj.GetProxy(), "m_thetaPolarization"), m_phiPolarization (director, obj.GetProxy(), "m_phiPolarization"), m_prodVtx (director, obj.GetProxy(), "m_prodVtx"), m_endVtx (director, obj.GetProxy(), "m_endVtx"), m_barcode (director, obj.GetProxy(), "m_barcode"), m_generated_mass (director, obj.GetProxy(), "m_generated_mass"), m_recoMethod (director, obj.GetProxy(), "m_recoMethod") {}; TStlPx_vector_GenParticle_p5_(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix (top,mid), obj (director, parent, membername), m_px (director, obj.GetProxy(), "m_px"), m_py (director, obj.GetProxy(), "m_py"), m_pz (director, obj.GetProxy(), "m_pz"), m_m (director, obj.GetProxy(), "m_m"), m_pdgId (director, obj.GetProxy(), "m_pdgId"), m_status (director, obj.GetProxy(), "m_status"), m_flow (director, obj.GetProxy(), "m_flow"), m_thetaPolarization (director, obj.GetProxy(), "m_thetaPolarization"), m_phiPolarization (director, obj.GetProxy(), "m_phiPolarization"), m_prodVtx (director, obj.GetProxy(), "m_prodVtx"), m_endVtx (director, obj.GetProxy(), "m_endVtx"), m_barcode (director, obj.GetProxy(), "m_barcode"), m_generated_mass (director, obj.GetProxy(), "m_generated_mass"), m_recoMethod (director, obj.GetProxy(), "m_recoMethod") {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); Int_t GetEntries() { return obj.GetEntries(); } TStlProxy obj; TStlFloatProxy m_px; TStlFloatProxy m_py; TStlFloatProxy m_pz; TStlFloatProxy m_m; TStlIntProxy m_pdgId; TStlIntProxy m_status; TStlPx_vector_pair_intCmint__ m_flow; TStlFloatProxy m_thetaPolarization; TStlFloatProxy m_phiPolarization; TStlIntProxy m_prodVtx; TStlIntProxy m_endVtx; TStlIntProxy m_barcode; TStlFloatProxy m_generated_mass; TStlShortProxy m_recoMethod; }; struct TPx_McEventCollection_p5 { TPx_McEventCollection_p5(TBranchProxyDirector* director,const char *top,const char *mid=0) : ffPrefix (top,mid), obj (director, top, mid), m_genEvents (director, obj.GetProxy(), "m_genEvents"), m_genVertices (director, obj.GetProxy(), "m_genVertices"), m_genParticles (director, obj.GetProxy(), "m_genParticles") {}; TPx_McEventCollection_p5(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) : ffPrefix (top,mid), obj (director, parent, membername), m_genEvents (director, obj.GetProxy(), "m_genEvents"), m_genVertices (director, obj.GetProxy(), "m_genVertices"), m_genParticles (director, obj.GetProxy(), "m_genParticles") {}; TBranchProxyHelper ffPrefix; InjecTBranchProxyInterface(); TBranchProxy obj; TStlPx_vector_GenEvent_p5_ m_genEvents; TStlPx_vector_GenVertex_p5_ m_genVertices; TStlPx_vector_GenParticle_p5_ m_genParticles; }; // Proxy for each of the branches, leaves and friends of the tree TPx_EventInfo_p3 EventInfo_p3_McEventInfo; TPx_McEventCollection_p5 McEventCollection_p5_GEN_EVENT; ClassForEventGenerator(TTree *tree=0) : fChain(0), htemp(0), fDirector(tree,-1), fClass (TClass::GetClass("ClassForEventGenerator")), EventInfo_p3_McEventInfo (&fDirector,"EventInfo_p3_McEventInfo"), McEventCollection_p5_GEN_EVENT(&fDirector,"McEventCollection_p5_GEN_EVENT") { } ~ClassForEventGenerator(); Int_t Version() const {return 1;} void Begin(::TTree *tree); void SlaveBegin(::TTree *tree); void Init(::TTree *tree); Bool_t Notify(); Bool_t Process(Long64_t entry); void SlaveTerminate(); void Terminate(); ClassDef(ClassForEventGenerator,0); //inject the user's code #include "print.C" }; #endif #ifdef __MAKECINT__ #pragma link C++ class ClassForEventGenerator::TPx_EventInfo_p3-; #pragma link C++ class ClassForEventGenerator::TStlPx_vector_GenEvent_p5_-; #pragma link C++ class ClassForEventGenerator::TStlPx_vector_GenVertex_p5_-; #pragma link C++ class ClassForEventGenerator::TStlPx_vector_pair_intCmint__-; #pragma link C++ class ClassForEventGenerator::TStlPx_vector_GenParticle_p5_-; #pragma link C++ class ClassForEventGenerator::TPx_McEventCollection_p5-; #pragma link C++ class ClassForEventGenerator; #endif inline ClassForEventGenerator::~ClassForEventGenerator() { // destructor. Clean up helpers. } inline void ClassForEventGenerator::Init(TTree *tree) { // Set branch addresses if (tree == 0) return; fChain = tree; fDirector.SetTree(fChain); if (htemp == 0) { htemp = fDirector.CreateHistogram(GetOption()); htemp->SetTitle("print.C"); fObject = htemp; } } Bool_t ClassForEventGenerator::Notify() { // Called when loading a new file. // Get branch pointers. fDirector.SetTree(fChain); print_Notify(); return kTRUE; } inline void ClassForEventGenerator::Begin(TTree *tree) { // The Begin() function is called at the start of the query. // When running with PROOF Begin() is only called on the client. // The tree argument is deprecated (on PROOF 0 is passed). TString option = GetOption(); print_Begin(tree); } inline void ClassForEventGenerator::SlaveBegin(TTree *tree) { // The SlaveBegin() function is called after the Begin() function. // When running with PROOF SlaveBegin() is called on each slave server. // The tree argument is deprecated (on PROOF 0 is passed). Init(tree); print_SlaveBegin(tree); } inline Bool_t ClassForEventGenerator::Process(Long64_t entry) { // The Process() function is called for each entry in the tree (or possibly // keyed object in the case of PROOF) to be processed. The entry argument // specifies which entry in the currently loaded tree is to be processed. // It can be passed to either TTree::GetEntry() or TBranch::GetEntry() // to read either all or the required parts of the data. When processing // keyed objects with PROOF, the object is already loaded and is available // via the fObject pointer. // // This function should contain the "body" of the analysis. It can contain // simple or elaborate selection criteria, run algorithms on the data // of the event and typically fill histograms. // WARNING when a selector is used with a TChain, you must use // the pointer to the current TTree to call GetEntry(entry). // The entry is always the local entry number in the current tree. // Assuming that fChain is the pointer to the TChain being processed, // use fChain->GetTree()->GetEntry(entry). fDirector.SetReadEntry(entry); htemp->Fill(print()); print_Process(entry); return kTRUE; } inline void ClassForEventGenerator::SlaveTerminate() { // The SlaveTerminate() function is called after all entries or objects // have been processed. When running with PROOF SlaveTerminate() is called // on each slave server. print_SlaveTerminate(); } inline void ClassForEventGenerator::Terminate() { // Function called at the end of the event loop. htemp = (TH1*)fObject; Int_t drawflag = (htemp && htemp->GetEntries()>0); if (gPad && !drawflag && !fOption.Contains("goff") && !fOption.Contains("same")) { gPad->Clear(); } else { if (fOption.Contains("goff")) drawflag = false; if (drawflag) htemp->Draw(fOption); } print_Terminate(); }