1 #ifndef ALIRSNLISTOUTPUT_H
2 #define ALIRSNLISTOUTPUT_H
5 // Class AliRsnListOutput
7 // This class defines a base classe to implement a Output
8 // which uses the internal RSN package event format (AliRsnEvent).
9 // It contains some default flags which turn out to be useful:
10 // - a flag to select only the "true" pairs (tracks from same resonance)
11 // - a flag to know if the computation is done over two events (mixing)
13 // Any kind of analysis object should be implemented as inheriting from this
14 // because the AliRsnAnalyzer which executes the analysis will accept a collection
15 // of such objects, in order to have a unique format of processing method
17 // The user who implements a kind of computation type should inherit from
18 // this class and override the virtual Outputs defined in it, which
19 // initialize the final output histogram and define how to process data.
22 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
28 #include <TObjArray.h>
34 #include <THnSparse.h>
39 class AliRsnListOutput : public TNamed {
49 AliRsnListOutput(const char *name = "", EOut type = kHistoDefault);
50 AliRsnListOutput(const AliRsnListOutput ©);
51 const AliRsnListOutput& operator=(const AliRsnListOutput ©);
52 virtual ~AliRsnListOutput();
54 EOut GetType() const {return fType;}
55 Int_t GetSteps() const {return fSteps;}
56 TObjArray* GetValues() {return &fValues;}
57 Int_t GetNValues() {return (fNValues = fValues.GetEntries());}
58 AliRsnValue* GetValue(Int_t i) const {return (AliRsnValue*)fValues[i];}
59 Int_t GetIndex() const {return fIndex;}
60 void SetType(EOut type) {fType = type;}
61 void SetSteps(Int_t n) {fSteps = n;}
62 void SetSkipFailed(Bool_t y) {fSkipFailed = y;}
64 void AddValue(AliRsnValue *value);
67 virtual Bool_t Init(const char *prefix, TList *list);
68 virtual Bool_t Fill(TObject *target, Int_t step = 0);
72 TH1* CreateHistogram(const char *name);
73 THnSparseF* CreateHistogramSparse(const char *name);
74 AliCFContainer* CreateCFContainer(const char *name);
76 Bool_t fSkipFailed; // tell to skip fills when one computation fails
77 EOut fType; // output format among allowed ones
78 Int_t fSteps; // number of steps (only for container)
79 TObjArray fValues; // container for all related values
80 Int_t fNValues; //! number of values (internal use)
81 TList *fList; //! list containing the output
82 Int_t fIndex; // index of object in the list
84 TArrayD fArray; //! temp array of computed values
86 ClassDef(AliRsnListOutput, 1) // AliRsnListOutput class