Added event cut set for MC
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnLoopEvent.cxx
CommitLineData
c865cb1d 1//
b63357a0 2// Computator for events.
3// Fills the outputs once per event,
4// using values computed on them,
5// and inheriting the same definitions of outputs
6// as in the mother AliRsnLoop class.
c865cb1d 7//
8
9#include "AliLog.h"
10
11#include "AliRsnEvent.h"
12
13#include "AliRsnLoopEvent.h"
14
15ClassImp(AliRsnLoopEvent)
16
17//_____________________________________________________________________________
18AliRsnLoopEvent::AliRsnLoopEvent(const char *name) :
19 AliRsnLoop(name)
20{
21//
22// Default constructor
23//
24}
25
26//_____________________________________________________________________________
61f275d1 27AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent &copy) :
c865cb1d 28 AliRsnLoop(copy)
29{
30//
31// Copy constructor
32//
33}
34
35//_____________________________________________________________________________
61f275d1 36AliRsnLoopEvent &AliRsnLoopEvent::operator=(const AliRsnLoopEvent &copy)
c865cb1d 37{
38//
39// Assignment operator
40//
41
61f275d1 42 AliRsnLoop::operator=(copy);
43 return (*this);
c865cb1d 44}
45
46//_____________________________________________________________________________
47AliRsnLoopEvent::~AliRsnLoopEvent()
48{
49//
50// Destructor
51//
52}
53
54//_____________________________________________________________________________
3da8cef7 55void AliRsnLoopEvent::Print(Option_t * /*option*/) const
c865cb1d 56{
57//
58// Prints info about pair
59//
60
61 AliRsnLoop::Print();
62}
63
64//_____________________________________________________________________________
65Bool_t AliRsnLoopEvent::Init(const char *prefix, TList *list)
66{
67//
68// Initialization function.
69// Loops on all functions and eventual the ntuple, to initialize output objects.
70//
71
72 return AliRsnLoop::Init(Form("%s_%s", prefix, GetName()), list);
73}
74
75//_____________________________________________________________________________
76Int_t AliRsnLoopEvent::DoLoop
77(AliRsnEvent *evMain, AliRsnDaughterSelector *, AliRsnEvent *, AliRsnDaughterSelector *)
78{
79//
80// Loop function.
81// Computes what is needed from passed events.
82// Returns the number of pairs successfully processed.
83//
84
85 TObjArrayIter next(&fOutputs);
86 AliRsnListOutput *out = 0x0;
61f275d1 87
c865cb1d 88 // check cuts
89 if (!OkEvent(evMain)) return 0;
61f275d1 90
91 while ( (out = (AliRsnListOutput *)next()) ) {
c865cb1d 92 out->Fill(evMain);
93 }
61f275d1 94
c865cb1d 95 return 1;
96}