]>
Commit | Line | Data |
---|---|---|
205cbea7 | 1 | #ifndef ALIMCGENHANDLER_H |
2 | #define ALIMCGENHANDLER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id: AliMCGenHandler.h 61697 2013-03-26 12:17:26Z agheata $ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliMCGenHandler | |
11 | // This class can be used with the analysis framework to generate event on | |
12 | // the fly and analyse them. | |
13 | // | |
14 | // Origin: Andrei Gheata, Jan Fiete Grosse-Oetringhaus | |
15 | //------------------------------------------------------------------------- | |
16 | ||
17 | #include "AliInputEventHandler.h" | |
18 | ||
19 | class TFile; | |
20 | class TTree; | |
21 | class AliMCEvent; | |
22 | class AliGenerator; | |
23 | class AliRunLoader; | |
24 | class AliStack; | |
25 | class AliHeader; | |
7001abcc | 26 | class TMacro; |
205cbea7 | 27 | |
28 | class AliMCGenHandler : public AliInputEventHandler | |
29 | { | |
30 | public: | |
31 | ||
32 | AliMCGenHandler(); | |
33 | AliMCGenHandler(const char* name, const char* title); | |
34 | virtual ~AliMCGenHandler(); | |
35 | ||
36 | virtual Bool_t Init(Option_t* /*opt*/); | |
37 | virtual Bool_t Init(TTree* tree, Option_t* opt) { return AliInputEventHandler::Init(tree, opt); } | |
38 | virtual Bool_t BeginEvent(Long64_t entry); | |
39 | virtual Bool_t FinishEvent(); | |
40 | ||
41 | AliMCEvent* MCEvent() const {return fMCEvent;} | |
42 | ||
43 | void SetGenerator(AliGenerator* generator) { fGenerator = generator; } | |
7001abcc | 44 | |
205cbea7 | 45 | void SetSeedMode(Int_t mode) { fSeedMode = mode; } |
e5f6f504 | 46 | void SetSeed(UInt_t seed) { fSeed = seed; } |
47 | UInt_t GetSeed() { return fSeed; } | |
7001abcc | 48 | |
49 | void SetGeneratorMacroPath(const char* macroPath) { fGeneratorMacroPath = macroPath; } | |
50 | void SetGeneratorMacroParameters(const char* params) { fGeneratorMacroParameters = params; } | |
51 | void SetGeneratorCustomization(TMacro* macro) { fGeneratorCustomization = macro; } | |
205cbea7 | 52 | |
53 | private: | |
54 | AliMCGenHandler(const AliMCGenHandler& handler); | |
55 | AliMCGenHandler& operator=(const AliMCGenHandler& handler); | |
56 | ||
57 | AliMCEvent *fMCEvent; //! MC Event | |
58 | Long64_t fEventNumber; //! current event number | |
59 | AliStack* fStack; //! current AliStack pointer | |
60 | AliHeader* fHeader; //! current AliHeader pointer | |
61 | ||
62 | AliGenerator *fGenerator; // generator | |
e5f6f504 | 63 | Int_t fSeedMode; // which seed is to be used: 0 (default): nothing/set externally; 1: use fSeed; 2: current time; 3: AliEn job id |
64 | UInt_t fSeed; // can be used to set seed manually (fSeedMode == 1); contains last used seed (fSeedMode == 2 || 3) | |
7001abcc | 65 | |
66 | TString fGeneratorMacroPath; // path to macro creating the generator object | |
67 | TString fGeneratorMacroParameters; // parameters passed to the creating macro | |
68 | TMacro *fGeneratorCustomization; // customization macro for generator object | |
205cbea7 | 69 | |
7001abcc | 70 | ClassDef(AliMCGenHandler, 2) // MC Gen Handler |
205cbea7 | 71 | }; |
72 | #endif |