]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/EventMixing/AliMixEventInputHandler.h
Updates for train running (L. Cunqueiro)
[u/mrichter/AliRoot.git] / ANALYSIS / EventMixing / AliMixEventInputHandler.h
CommitLineData
c5e33610 1//
2// Class AliMixEventInputHandler
3//
4// Mixing input handler prepare N events before UserExec
5// TODO example
35e08f92 6// author:
c5e33610 7// Martin Vala (martin.vala@cern.ch)
8//
9
10#ifndef ALIMIXEVENTINPUTHANDLER_H
11#define ALIMIXEVENTINPUTHANDLER_H
12
13#include <TObjArray.h>
14
15#include "AliInputEventHandler.h"
16#include <TArrayI.h>
17
18class TChain;
19class AliMixEventPool;
20class AliMixInputHandlerInfo;
21class AliMixEventInputHandler : public AliInputEventHandler {
22
23public:
35e08f92 24 AliMixEventInputHandler(const Int_t size=1);
25 virtual ~AliMixEventInputHandler() {;};
c5e33610 26
35e08f92 27 // From the interface
28 virtual Bool_t Init(Option_t *opt /*opt*/);
29 virtual Bool_t Init(TTree *tree, Option_t* /*opt*/);
30 virtual Bool_t BeginEvent(Long64_t entry /*entry*/);
31 virtual Bool_t GetEntry();
32 virtual Bool_t FinishEvent();
33 virtual Bool_t Notify();
34 virtual Bool_t Notify(const char *path);
35
36
37 void SetInputHandlerForMixing(const AliInputEventHandler *const inHandler);
38 void SetEventPool(AliMixEventPool *const evPool) {fEventPool = evPool;}
39
40 AliInputEventHandler *InputEventHandler(const Int_t index);
41 AliMixEventPool *GetEventPool() const { return fEventPool;}
42 Int_t BufferSize() const {return fBufferSize;}
43 Int_t MixedEventNumber() const {return fMixEventNumber;}
44 Long64_t EntryAll() const { return fEntryCounter;}
c5e33610 45protected:
35e08f92 46
47 Int_t fBufferSize; // Size of the buffer
48 TObjArray fInputHandlers; // buffer of input handlers
49 TObjArray fMixTrees; // buffer of input handlers
50 TArrayI fTreeMap; // tree map
51 AliMixInputHandlerInfo *fMixIntupHandlerInfoTmp; //! mix input handler info full chain
52 Long64_t fEntryCounter; // entry counter
53 AliMixEventPool *fEventPool; // event pool
54
55 Int_t fMixEventNumber; // number mix
56
c5e33610 57private:
58
35e08f92 59 AliMixEventInputHandler(const AliMixEventInputHandler &handler);
60 AliMixEventInputHandler &operator=(const AliMixEventInputHandler &handler);
c5e33610 61
35e08f92 62 ClassDef(AliMixEventInputHandler, 1)
c5e33610 63};
64
65#endif