Coverity fix
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnLoop.h
CommitLineData
c865cb1d 1#ifndef ALIRSNLOOP_H
2#define ALIRSNLOOP_H
3
4//
b63357a0 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.
c865cb1d 10//
11
12#include "TNamed.h"
13#include "TObjArray.h"
14
15#include "AliRsnListOutput.h"
16#include "AliRsnValue.h"
17#include "AliRsnCutSet.h"
18
19class TList;
20class AliRsnEvent;
21class AliRsnListOutput;
22class AliRsnDaughterSelector;
23
24class AliRsnLoop : public TNamed {
25public:
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);
b63357a0 35 AliRsnLoop& operator=(const AliRsnLoop &copy);
c865cb1d 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
49protected:
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
55private:
56
57 ClassDef(AliRsnLoop, 1)
58};
59
60#endif