#ifndef ALIRSNLISTOUTPUT_H #define ALIRSNLISTOUTPUT_H // // Class AliRsnListOutput // // This class defines a base classe to implement a Output // which uses the internal RSN package event format (AliRsnEvent). // It contains some default flags which turn out to be useful: // - a flag to select only the "true" pairs (tracks from same resonance) // - a flag to know if the computation is done over two events (mixing) // // Any kind of analysis object should be implemented as inheriting from this // because the AliRsnAnalyzer which executes the analysis will accept a collection // of such objects, in order to have a unique format of processing method // // The user who implements a kind of computation type should inherit from // this class and override the virtual Outputs defined in it, which // initialize the final output histogram and define how to process data. // // // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) // #include #include #include #include #include #include #include #include #include #include class AliCFContainer; class AliRsnValue; class AliRsnDaughter; class AliRsnEvent; class AliRsnListOutput : public TNamed { public: enum EOut { kHistoDefault, kHistoSparse, kCFContainer }; AliRsnListOutput(const char *name = "", EOut type = kHistoDefault); AliRsnListOutput(const AliRsnListOutput ©); AliRsnListOutput &operator=(const AliRsnListOutput ©); virtual ~AliRsnListOutput(); EOut GetType() const {return fType;} Int_t GetSteps() const {return fSteps;} TObjArray *GetValues() {return &fValues;} Int_t GetNValues() {return (fNValues = fValues.GetEntries());} AliRsnValue *GetValue(Int_t i) const {return (AliRsnValue *)fValues[i];} Int_t GetIndex() const {return fIndex;} Bool_t GetFillHistogramOnlyInRange() { return fCheckHistRange; } void SetType(EOut type) {fType = type;} void SetSteps(Int_t n) {fSteps = n;} void SetSkipFailed(Bool_t y) {fSkipFailed = y;} void SetFillHistogramOnlyInRange(Bool_t fillInRangeOnly) { fCheckHistRange = fillInRangeOnly; } void AddValue(AliRsnValue *value); virtual void Reset(); virtual Bool_t Init(const char *prefix, TList *list); virtual Bool_t Fill(TObject *target, Int_t step = 0); virtual Bool_t Fill(AliRsnEvent *ev,AliRsnDaughter *d); private: TH1 *CreateHistogram(const char *name); THnSparseF *CreateHistogramSparse(const char *name); AliCFContainer *CreateCFContainer(const char *name); Bool_t fSkipFailed; // tell to skip fills when one computation fails EOut fType; // output format among allowed ones Int_t fSteps; // number of steps (only for container) TObjArray fValues; // container for all related values Int_t fNValues; //! number of values (internal use) TList *fList; //! list containing the output Int_t fIndex; // index of object in the list Bool_t fCheckHistRange;// check if values is in histogram range TArrayD fArray; //! temp array of computed values ClassDef(AliRsnListOutput, 2) // AliRsnListOutput class }; #endif