Fixes for coverity.
[u/mrichter/AliRoot.git] / STEER / STEER / AliMCGenHandler.h
CommitLineData
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
19class TFile;
20class TTree;
21class AliMCEvent;
22class AliGenerator;
23class AliRunLoader;
24class AliStack;
25class AliHeader;
26
27class AliMCGenHandler : public AliInputEventHandler
28{
29public:
30
31 AliMCGenHandler();
32 AliMCGenHandler(const char* name, const char* title);
33 virtual ~AliMCGenHandler();
34
35 virtual Bool_t Init(Option_t* /*opt*/);
36 virtual Bool_t Init(TTree* tree, Option_t* opt) { return AliInputEventHandler::Init(tree, opt); }
37 virtual Bool_t BeginEvent(Long64_t entry);
38 virtual Bool_t FinishEvent();
39
40 AliMCEvent* MCEvent() const {return fMCEvent;}
41
42 void SetGenerator(AliGenerator* generator) { fGenerator = generator; }
43 void SetSeedMode(Int_t mode) { fSeedMode = mode; }
e5f6f504 44 void SetSeed(UInt_t seed) { fSeed = seed; }
45 UInt_t GetSeed() { return fSeed; }
205cbea7 46
47private:
48 AliMCGenHandler(const AliMCGenHandler& handler);
49 AliMCGenHandler& operator=(const AliMCGenHandler& handler);
50
51 AliMCEvent *fMCEvent; //! MC Event
52 Long64_t fEventNumber; //! current event number
53 AliStack* fStack; //! current AliStack pointer
54 AliHeader* fHeader; //! current AliHeader pointer
55
56 AliGenerator *fGenerator; // generator
e5f6f504 57 Int_t fSeedMode; // which seed is to be used: 0 (default): nothing/set externally; 1: use fSeed; 2: current time; 3: AliEn job id
58 UInt_t fSeed; // can be used to set seed manually (fSeedMode == 1); contains last used seed (fSeedMode == 2 || 3)
205cbea7 59
60 ClassDef(AliMCGenHandler,1) // MC Gen Handler
61};
62#endif