]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnLoop.h
50f311d1139ffcd101fa649fe38525c505c0853e
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnLoop.h
1 #ifndef ALIRSNLOOP_H
2 #define ALIRSNLOOP_H
3
4 //
5 // Base class object for all computation devices.
6 //
7
8 #include "TNamed.h"
9 #include "TObjArray.h"
10
11 #include "AliRsnListOutput.h"
12 #include "AliRsnValue.h"
13 #include "AliRsnCutSet.h"
14
15 class TList;
16 class AliRsnEvent;
17 class AliRsnListOutput;
18 class AliRsnDaughterSelector;
19
20 class AliRsnLoop : public TNamed {
21 public:
22
23    enum EOut {
24       kH1,
25       kHSparse,
26       kNtuple
27    };
28
29    AliRsnLoop(const char *name = "default", Bool_t isMixed = kFALSE);
30    AliRsnLoop(const AliRsnLoop &copy);
31    AliRsnLoop& operator=(const AliRsnLoop&);
32    ~AliRsnLoop();
33    
34    void           SetMixed(Bool_t yn = kTRUE)     {fIsMixed = yn;}
35    void           SetEventCuts(AliRsnCutSet *set) {fEventCuts = set;}
36    Bool_t         IsMixed() const                 {return fIsMixed;}
37    AliRsnCutSet*  GetEventCuts()                  {return fEventCuts;}
38    Bool_t         OkEvent(AliRsnEvent *rsn);
39    
40    virtual void   AddOutput(TObject *output);
41    virtual void   Print(Option_t *option = "") const;
42    virtual Bool_t Init(const char *prefix, TList *list);
43    virtual Int_t  DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
44
45 protected:
46
47    Bool_t         fIsMixed;    //  flag to know if the loop works with event mixing
48    AliRsnCutSet  *fEventCuts;  //  event cuts
49    TClonesArray   fOutputs;    //  output object definitions
50
51 private:
52
53    ClassDef(AliRsnLoop, 1)
54 };
55
56 #endif