#ifndef GENEANALYSISMANAGER_HH #define GENEANALYSISMANAGER_HH 1 #define ANALYSIS_USE #include "globals.hh" #ifdef ANALYSIS_USE #include "TFile.h" #include "TROOT.h" #include "TTree.h" #endif struct detEvent { G4double Thetacm; G4double Thetalab; G4int Ndets; G4double detE[24]; G4int detId[24]; }; class GeneAnalysisManager { /** * Analysis manager is a singleton object (there is only one instance). * The pointer to this object is available through the use of the method GetInstance(); * * @see GetInstance */ public: GeneAnalysisManager(); ~GeneAnalysisManager(); static GeneAnalysisManager *GetInstance(); void SetAnalysisFileName(G4String); void FillAng(G4double thetacm, G4double thetalab); void FillDetData(G4int ndets, G4double *edet, G4int *ndet); // void EventNo(); #ifdef ANALYSIS_USE void book(); void FillTree(); void save(); #endif private: static GeneAnalysisManager *instance; struct detEvent mydata; // G4int evtNo; G4String analysisFileName; #ifdef ANALYSIS_USE TFile *theTFile; TTree *tr; #endif }; #endif