]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnLoopEvent.cxx
First version of macros for lego_train
[u/mrichter/AliRoot.git] / PWG2 / 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//_____________________________________________________________________________
27AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent& copy) :
28 AliRsnLoop(copy)
29{
30//
31// Copy constructor
32//
33}
34
35//_____________________________________________________________________________
36AliRsnLoopEvent& AliRsnLoopEvent::operator=(const AliRsnLoopEvent& copy)
37{
38//
39// Assignment operator
40//
41
e6f3a909 42 AliRsnLoop::operator=(copy);
43 return (*this);
c865cb1d 44}
45
46//_____________________________________________________________________________
47AliRsnLoopEvent::~AliRsnLoopEvent()
48{
49//
50// Destructor
51//
52}
53
54//_____________________________________________________________________________
55void AliRsnLoopEvent::Print(Option_t* /*option*/) const
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;
87
88 // check cuts
89 if (!OkEvent(evMain)) return 0;
90
91 while ( (out = (AliRsnListOutput*)next()) ) {
92 out->Fill(evMain);
93 }
94
95 return 1;
96}