]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/EventMixing/AliMixEventPool.h
Changes for #82873: Module debugging broken (Christian)
[u/mrichter/AliRoot.git] / ANALYSIS / EventMixing / AliMixEventPool.h
1 //
2 // Class AliMixEventPool
3 //
4 // AliMixEventPool is used to find
5 // similar events
6 //
7 // author:
8 //        Martin Vala (martin.vala@cern.ch)
9 //
10
11 #ifndef ALIMIXEVENTPOOL_H
12 #define ALIMIXEVENTPOOL_H
13
14 #include <TObjArray.h>
15 #include <TNamed.h>
16
17 class TEntryList;
18 class AliMixEventCutObj;
19 class AliVEvent;
20 class AliMixEventPool : public TNamed {
21 public:
22    AliMixEventPool(const char *name = "mixEventPool", const char *title = "Mix event pool");
23    AliMixEventPool(const AliMixEventPool &obj);
24    AliMixEventPool &operator= (const AliMixEventPool& obj);
25    virtual ~AliMixEventPool();
26
27    // prints object info
28    virtual void      Print(const Option_t *option = "") const;
29
30    // inits correctly object
31    Int_t       Init();
32
33    void        CreateEntryListsRecursivly(Int_t index);
34    void        SearchIndexRecursive(Int_t num, Int_t *i, Int_t *d, Int_t &index);
35    TEntryList *AddEntryList();
36
37    Bool_t      AddEntry(Long64_t entry, AliVEvent *ev);
38    TEntryList *FindEntryList(AliVEvent *ev, Int_t &idEntryList);
39
40    void        AddCut(AliMixEventCutObj *cut);
41
42    Bool_t      NeedInit() { return (fListOfEntryList.GetEntries() == 0); }
43    TObjArray  *GetListOfEntryLists() { return &fListOfEntryList; }
44    TObjArray  *GetListOfEventCuts() { return &fListOfEventCuts; }
45
46    Bool_t      SetCutValuesFromBinIndex(Int_t index);
47    void        SetBufferSize(Int_t buffer) { fBufferSize = buffer; }
48    void        SetMixNumber(Int_t numMix) { fMixNumber = numMix; }
49    Int_t       GetBufferSize() const { return fBufferSize; }
50    Int_t       GetMixNumber() const { return fMixNumber; }
51
52 private:
53
54    TObjArray   fListOfEntryList;       // list of entry lists
55    TObjArray   fListOfEventCuts;       // list of entry lists
56
57    Int_t       fBinNumber;             // bin number
58    Int_t       fBufferSize;            // buffer size
59    Int_t       fMixNumber;             // mixing number
60
61    ClassDef(AliMixEventPool, 1)
62 };
63
64 #endif