ROOT logo
#ifndef ALIRSNLOOP_H
#define ALIRSNLOOP_H

//
// Base class to implement any computation within the RSN package.
// It contains only an array of output objects which must derive
// from AliRsnOutput.
// Its core functions ar Init() and DoLoop() which must be
// overloaded by any class which inherits from this.
//

#include "TNamed.h"
#include "TObjArray.h"

#include "AliRsnListOutput.h"
#include "AliRsnValue.h"
#include "AliRsnCutSet.h"

class TList;
class AliRsnEvent;
class AliRsnListOutput;
class AliRsnDaughterSelector;

class AliRsnLoop : public TNamed {
public:

   enum EOut {
      kH1,
      kHSparse,
      kNtuple
   };

   AliRsnLoop(const char *name = "default", Bool_t isMixed = kFALSE);
   AliRsnLoop(const AliRsnLoop &copy);
   AliRsnLoop &operator=(const AliRsnLoop &copy);
   ~AliRsnLoop();

   void           SetMixed(Bool_t yn = kTRUE)     {fIsMixed = yn;}
   void           SetEventCuts(AliRsnCutSet *set) {fEventCuts = set;}
   Bool_t         IsMixed() const                 {return fIsMixed;}
   AliRsnCutSet  *GetEventCuts()                  {return fEventCuts;}
   Bool_t         OkEvent(AliRsnEvent *rsn);

   virtual void   AddOutput(TObject *output);
   virtual void   Print(Option_t *option = "") const;
   virtual Bool_t Init(const char *prefix, TList *list);
   virtual Int_t  DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);

protected:

   Bool_t         fIsMixed;    //  flag to know if the loop works with event mixing
   AliRsnCutSet  *fEventCuts;  //  event cuts
   TClonesArray   fOutputs;    //  output object definitions

private:

   ClassDef(AliRsnLoop, 1)
};

#endif
 AliRsnLoop.h:1
 AliRsnLoop.h:2
 AliRsnLoop.h:3
 AliRsnLoop.h:4
 AliRsnLoop.h:5
 AliRsnLoop.h:6
 AliRsnLoop.h:7
 AliRsnLoop.h:8
 AliRsnLoop.h:9
 AliRsnLoop.h:10
 AliRsnLoop.h:11
 AliRsnLoop.h:12
 AliRsnLoop.h:13
 AliRsnLoop.h:14
 AliRsnLoop.h:15
 AliRsnLoop.h:16
 AliRsnLoop.h:17
 AliRsnLoop.h:18
 AliRsnLoop.h:19
 AliRsnLoop.h:20
 AliRsnLoop.h:21
 AliRsnLoop.h:22
 AliRsnLoop.h:23
 AliRsnLoop.h:24
 AliRsnLoop.h:25
 AliRsnLoop.h:26
 AliRsnLoop.h:27
 AliRsnLoop.h:28
 AliRsnLoop.h:29
 AliRsnLoop.h:30
 AliRsnLoop.h:31
 AliRsnLoop.h:32
 AliRsnLoop.h:33
 AliRsnLoop.h:34
 AliRsnLoop.h:35
 AliRsnLoop.h:36
 AliRsnLoop.h:37
 AliRsnLoop.h:38
 AliRsnLoop.h:39
 AliRsnLoop.h:40
 AliRsnLoop.h:41
 AliRsnLoop.h:42
 AliRsnLoop.h:43
 AliRsnLoop.h:44
 AliRsnLoop.h:45
 AliRsnLoop.h:46
 AliRsnLoop.h:47
 AliRsnLoop.h:48
 AliRsnLoop.h:49
 AliRsnLoop.h:50
 AliRsnLoop.h:51
 AliRsnLoop.h:52
 AliRsnLoop.h:53
 AliRsnLoop.h:54
 AliRsnLoop.h:55
 AliRsnLoop.h:56
 AliRsnLoop.h:57
 AliRsnLoop.h:58
 AliRsnLoop.h:59
 AliRsnLoop.h:60