]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnLoopEvent.cxx
Implementation of all needed changes in the package in order to speed-up the executio...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnLoopEvent.cxx
1 //
2 // Computator for single daughters.
3 // Implements a simple loop on tracks from one of the entry lists
4 // filled by the task AliRsnInputHandler, adding a check on their
5 // definition specified in the daughter def.
6 //
7
8 #include "AliLog.h"
9
10 #include "AliRsnEvent.h"
11
12 #include "AliRsnLoopEvent.h"
13
14 ClassImp(AliRsnLoopEvent)
15
16 //_____________________________________________________________________________
17 AliRsnLoopEvent::AliRsnLoopEvent(const char *name) :
18    AliRsnLoop(name)
19 {
20 //
21 // Default constructor
22 //
23 }
24
25 //_____________________________________________________________________________
26 AliRsnLoopEvent::AliRsnLoopEvent(const AliRsnLoopEvent& copy) :
27    AliRsnLoop(copy)
28 {
29 //
30 // Copy constructor
31 //
32 }
33
34 //_____________________________________________________________________________
35 AliRsnLoopEvent& AliRsnLoopEvent::operator=(const AliRsnLoopEvent& copy)
36 {
37 //
38 // Assignment operator
39 //
40
41    AliRsnLoop::operator=(copy);
42
43    return (*this);
44 }
45
46 //_____________________________________________________________________________
47 AliRsnLoopEvent::~AliRsnLoopEvent()
48 {
49 //
50 // Destructor
51 //
52 }
53
54 //_____________________________________________________________________________
55 void AliRsnLoopEvent::Print(Option_t* /*option*/) const
56 {
57 //
58 // Prints info about pair
59 //
60
61    AliRsnLoop::Print();
62 }
63
64 //_____________________________________________________________________________
65 Bool_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 //_____________________________________________________________________________
76 Int_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 }