]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnVManager.cxx
Made a general review to fix as possible most coding conventions violations.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnVManager.cxx
1 //
2 // Class AliRsnVManager
3 //
4 // Base "manager" class.
5 // It is built in order to manage a list of objects which share
6 // the same level in the work flow of the analysis.
7 // This base class contains simply the list of "child" objects
8 // and the methods to add objects to the list or retrieve the list.
9 //
10 // author     : M. Vala       [martin.vala@cern.ch]
11 // revised by : A. Pulvirenti [alberto.pulvirenti@ct.infn.it]
12 //
13
14 #include "AliLog.h"
15
16 #include "AliRsnVManager.h"
17
18 ClassImp(AliRsnVManager)
19
20 //_____________________________________________________________________________
21 AliRsnVManager::AliRsnVManager(const char*name) :
22     TNamed(name, name),
23     fArray(0)
24 {
25 //
26 // Default constructor
27 //
28 }
29
30 //_____________________________________________________________________________
31 AliRsnVManager::~AliRsnVManager()
32 {
33 //
34 // Destructor
35 //
36 }
37
38 //_____________________________________________________________________________
39 void AliRsnVManager::Add(TObject*const obj)
40 {
41 //
42 // Add a new object in the list.
43 //
44
45   fArray.Add((TObject*)obj);
46 }
47
48 //_____________________________________________________________________________
49 void AliRsnVManager::Print(Option_t* /*dummy*/) const
50 {
51 //
52 // Overload of the standard TObject::Print() method.
53 //
54
55   PrintArray();
56 }
57
58 //_____________________________________________________________________________
59 void AliRsnVManager::PrintArray() const
60 {
61 //
62 // Calls the "Print()" method of all objects
63 // stored in the list, to print their informations.
64 //
65
66   TObject *obj = 0;
67   TObjArrayIter next(&fArray);
68   while ((obj = (TObject*)next())) obj->Print();
69 }