]>
Commit | Line | Data |
---|---|---|
c865cb1d | 1 | #ifndef ALIRSNLISTOUTPUT_H |
2 | #define ALIRSNLISTOUTPUT_H | |
3 | ||
4 | // | |
5 | // General class for outputs which can stay into a TList | |
6 | // | |
7 | ||
8 | #include <TRef.h> | |
9 | #include <TNamed.h> | |
10 | #include <TArrayI.h> | |
11 | #include <TObjArray.h> | |
12 | ||
13 | #include <TH1.h> | |
14 | #include <TH2.h> | |
15 | #include <TH3.h> | |
16 | #include <TNtuple.h> | |
17 | #include <THnSparse.h> | |
18 | ||
19 | #include "AliCFContainer.h" | |
20 | ||
21 | class AliRsnValue; | |
22 | ||
23 | class AliRsnListOutput : public TNamed { | |
24 | ||
25 | public: | |
26 | ||
27 | enum EOut { | |
28 | kHistoDefault, | |
29 | kHistoSparse, | |
30 | kCFContainer | |
31 | }; | |
32 | ||
33 | AliRsnListOutput(const char *name = "", EOut type = kHistoDefault); | |
34 | AliRsnListOutput(const AliRsnListOutput ©); | |
35 | const AliRsnListOutput& operator=(const AliRsnListOutput ©); | |
36 | virtual ~AliRsnListOutput(); | |
37 | ||
f34f960b | 38 | EOut GetType() {return fType;} |
39 | Int_t GetSteps() {return fSteps;} | |
40 | TObjArray* GetValues() {return &fValues;} | |
41 | Int_t GetNValues() {return (fNValues = fValues.GetEntries());} | |
42 | AliRsnValue* GetValue(Int_t i) {return (AliRsnValue*)fValues[i];} | |
43 | Int_t GetIndex() {return fIndex;} | |
44 | void SetType(EOut type) {fType = type;} | |
45 | void SetSteps(Int_t n) {fSteps = n;} | |
46 | void SetSkipFailed(Bool_t y) {fSkipFailed = y;} | |
c865cb1d | 47 | |
48 | void AddValue(AliRsnValue *value); | |
49 | ||
50 | virtual void Reset(); | |
51 | virtual Bool_t Init(const char *prefix, TList *list); | |
52 | virtual Bool_t Fill(TObject *target, Int_t step = 0); | |
53 | ||
54 | private: | |
55 | ||
56 | TH1* CreateHistogram(const char *name); | |
57 | THnSparseF* CreateHistogramSparse(const char *name); | |
58 | AliCFContainer* CreateCFContainer(const char *name); | |
59 | ||
f34f960b | 60 | Bool_t fSkipFailed; // tell to skip fills when one computation fails |
c865cb1d | 61 | EOut fType; // output format among allowed ones |
62 | Int_t fSteps; // number of steps (only for container) | |
63 | TObjArray fValues; // container for all related values | |
64 | Int_t fNValues; //! number of values (internal use) | |
65 | TList *fList; //! list containing the output | |
66 | Int_t fIndex; // index of object in the list | |
67 | ||
68 | TArrayD fArray; //! temp array of computed values | |
69 | ||
70 | ClassDef(AliRsnListOutput, 1) // AliRsnListOutput class | |
71 | }; | |
72 | ||
73 | #endif |