]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnLoopEvent.cxx
Macros to plot QA train output
[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
42 AliRsnLoop::operator=(copy);
43
44 return (*this);
45}
46
47//_____________________________________________________________________________
48AliRsnLoopEvent::~AliRsnLoopEvent()
49{
50//
51// Destructor
52//
53}
54
55//_____________________________________________________________________________
56void AliRsnLoopEvent::Print(Option_t* /*option*/) const
57{
58//
59// Prints info about pair
60//
61
62 AliRsnLoop::Print();
63}
64
65//_____________________________________________________________________________
66Bool_t AliRsnLoopEvent::Init(const char *prefix, TList *list)
67{
68//
69// Initialization function.
70// Loops on all functions and eventual the ntuple, to initialize output objects.
71//
72
73 return AliRsnLoop::Init(Form("%s_%s", prefix, GetName()), list);
74}
75
76//_____________________________________________________________________________
77Int_t AliRsnLoopEvent::DoLoop
78(AliRsnEvent *evMain, AliRsnDaughterSelector *, AliRsnEvent *, AliRsnDaughterSelector *)
79{
80//
81// Loop function.
82// Computes what is needed from passed events.
83// Returns the number of pairs successfully processed.
84//
85
86 TObjArrayIter next(&fOutputs);
87 AliRsnListOutput *out = 0x0;
88
89 // check cuts
90 if (!OkEvent(evMain)) return 0;
91
92 while ( (out = (AliRsnListOutput*)next()) ) {
93 out->Fill(evMain);
94 }
95
96 return 1;
97}