123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef UManager_h
- #define UManager_h
- // ROOT headers
- #include "TObject.h"
- // Forward declarations
- class TFile;
- class TTree;
- class TList;
- class UTask;
- class URun;
- class UEvent;
- class UParticle;
- //_________________
- class UManager : public TObject {
- public:
- /// Constructor
- UManager();
- /// Destructor
- virtual ~UManager();
- static UManager* Instance();
- void SetInputFile(const char *fileName);
- void CloseInputFile();
- void SetOutputFile(const char *fileName, Bool_t writeTree = kTRUE);
- void CloseOutputFile();
- Int_t GetEntries();
- void GetEntry(Int_t i);
- void AddTask(UTask *task);
- void Init();
- void Run(Int_t a = -1, Int_t b = -1);
- void WriteEvent(Bool_t flag = kTRUE) {fWrite = flag;}
- void Fill();
- void createRun(const char* generator, const char* comment,
- const Int_t& aProj, const Int_t& zProj, const Double_t& pProj,
- const Int_t& aTarg, const Int_t& zTarg, const Double_t& pTarg,
- const Double_t& bMin, const Double_t& bMax, const Int_t& bWeight,
- const Double_t& phiMin, const Double_t& phiMax,
- const Double_t& sigma, const Int_t& nEvents);
- URun* run() const { return fRun; }
- UEvent* event() const { return fEvent; }
- private:
- /// Instance of the manager
- static UManager *fgInstance;
- /// List of tasks
- TList *fTaskList;
- /// Input file
- TFile *fInFile;
- /// Output file
- TFile *fOutFile;
- /// Input tree
- TTree *fInTree;
- /// Output tree
- TTree *fOutTree;
- /// Run object
- URun *fRun;
- /// Event
- UEvent *fEvent;
- /// Particle
- UParticle *fParticle;
- /// Output flag
- Bool_t fWrite;
- ClassDef(UManager, 1);
- };
- #endif // UManager_h
|