1 #ifndef ALIRSNLISTOUTPUT_H
2 #define ALIRSNLISTOUTPUT_H
5 // General class for outputs which can stay into a TList
11 #include <TObjArray.h>
17 #include <THnSparse.h>
19 #include "AliCFContainer.h"
23 class AliRsnListOutput : public TNamed {
33 AliRsnListOutput(const char *name = "", EOut type = kHistoDefault);
34 AliRsnListOutput(const AliRsnListOutput ©);
35 const AliRsnListOutput& operator=(const AliRsnListOutput ©);
36 virtual ~AliRsnListOutput();
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;}
48 void AddValue(AliRsnValue *value);
51 virtual Bool_t Init(const char *prefix, TList *list);
52 virtual Bool_t Fill(TObject *target, Int_t step = 0);
56 TH1* CreateHistogram(const char *name);
57 THnSparseF* CreateHistogramSparse(const char *name);
58 AliCFContainer* CreateCFContainer(const char *name);
60 Bool_t fSkipFailed; // tell to skip fills when one computation fails
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
68 TArrayD fArray; //! temp array of computed values
70 ClassDef(AliRsnListOutput, 1) // AliRsnListOutput class