]>
Commit | Line | Data |
---|---|---|
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 | ||
15 | ClassImp(AliRsnLoopEvent) | |
16 | ||
17 | //_____________________________________________________________________________ | |
18 | AliRsnLoopEvent::AliRsnLoopEvent(const char *name) : | |
19 | AliRsnLoop(name) | |
20 | { | |
21 | // | |
22 | // Default constructor | |
23 | // | |
24 | } | |
25 | ||
26 | //_____________________________________________________________________________ | |
27 | AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent& copy) : | |
28 | AliRsnLoop(copy) | |
29 | { | |
30 | // | |
31 | // Copy constructor | |
32 | // | |
33 | } | |
34 | ||
35 | //_____________________________________________________________________________ | |
36 | AliRsnLoopEvent& AliRsnLoopEvent::operator=(const AliRsnLoopEvent& copy) | |
37 | { | |
38 | // | |
39 | // Assignment operator | |
40 | // | |
41 | ||
42 | AliRsnLoop::operator=(copy); | |
43 | ||
44 | return (*this); | |
45 | } | |
46 | ||
47 | //_____________________________________________________________________________ | |
48 | AliRsnLoopEvent::~AliRsnLoopEvent() | |
49 | { | |
50 | // | |
51 | // Destructor | |
52 | // | |
53 | } | |
54 | ||
55 | //_____________________________________________________________________________ | |
56 | void AliRsnLoopEvent::Print(Option_t* /*option*/) const | |
57 | { | |
58 | // | |
59 | // Prints info about pair | |
60 | // | |
61 | ||
62 | AliRsnLoop::Print(); | |
63 | } | |
64 | ||
65 | //_____________________________________________________________________________ | |
66 | Bool_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 | //_____________________________________________________________________________ | |
77 | Int_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 | } |