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