#ifndef ALICOUNTERCOLLECTION_H
#define ALICOUNTERCOLLECTION_H
#include <TNamed.h>
class TString;
class TObjArray;
class THnSparse;
class THashList;
class TArrayI;
class TH1D;
class TH2D;
class TCollection;
class AliCounterCollection : public TNamed {
public:
AliCounterCollection(const char* name = "counters");
virtual ~AliCounterCollection();
virtual void Clear(Option_t* = "");
void AddRubric(TString name, TString listOfKeyWords);
void AddRubric(TString name, Int_t maxNKeyWords);
void Init(Bool_t weightedCounters = kFALSE);
TString GetKeyWords(TString rubric) const;
void Count(TString externalKey, Int_t value = 1);
void Count(TString externalKey, Double_t value);
Double_t GetSum(TString selections = "", Bool_t* longCounters = 0x0);
TH1D* Get(TString rubric1, TString selections);
TH2D* Get(TString rubric1, TString rubric2, TString selections);
virtual void Print(const Option_t* opt = "") const;
void PrintKeyWords() const;
void PrintValue(TString selections);
void Print(TString rubrics, TString selections, Bool_t removeEmpty = kFALSE);
void PrintSum(TString selections = "");
virtual void Draw(Option_t* opt = "") {Draw(opt, "");}
TH1D* Draw(TString rubric1, TString selections);
TH2D* Draw(TString rubric1, TString rubric2, TString selections);
void Add(const AliCounterCollection* counter);
Long64_t Merge(TCollection* list);
void Sort(Option_t* opt = "", Bool_t asInt = kFALSE);
void SortRubric(TString rubric, Bool_t asInt = kFALSE);
private:
AliCounterCollection(const AliCounterCollection& rhs);
AliCounterCollection& operator = (const AliCounterCollection& rhs);
Int_t GetNActiveBins(Int_t dim);
Bool_t ContainsAny(Int_t dim);
const Int_t* FindBins(const TString& externalKey, Bool_t allocate, Int_t& nEmptySlots);
Int_t FindDim(const TString& rubricName) const;
Int_t FindBin(Int_t dim, const TString& keyWord, Bool_t allocate);
Short_t** DecodeSelection(const TString& selections, const TObjArray& displayedRubrics);
Bool_t Select(Bool_t include, const TString& rubric, const TString& keywords, Bool_t displayed, Short_t* selectBins[]);
void CleanListOfStrings(TObjArray* list);
void CountAsDouble(TString externalKey, Double_t value);
void PrintList(const TH1D* hist, Bool_t removeEmpty, Bool_t longCounters) const;
void PrintArray(const TH2D* hist, Bool_t removeEmpty, Bool_t longCounters) const;
void PrintListOfArrays(const THnSparse* hist, Bool_t removeEmpty, Bool_t longCounters) const;
Int_t GetMaxLabelSize(THashList* labels) const;
TObject* Projection(const TObjArray& data, const TString& selections, Bool_t& longCounters);
Int_t* CheckConsistency(const AliCounterCollection* c);
void Sort(const Bool_t* rubricsToSort, Bool_t asInt);
THashList* SortAsInt(const THashList* labels);
void ConvertToTHnSparseL(THnSparse* &h);
private:
THashList* fRubrics;
TArrayI* fRubricsSize;
THnSparse* fCounters;
Bool_t fWeightedCounters;
Bool_t fLongCounters;
ClassDef(AliCounterCollection, 3);
};
#endif
AliCounterCollection.h:10 AliCounterCollection.h:11 AliCounterCollection.h:12 AliCounterCollection.h:13 AliCounterCollection.h:14 AliCounterCollection.h:15 AliCounterCollection.h:16 AliCounterCollection.h:17 AliCounterCollection.h:18 AliCounterCollection.h:19 AliCounterCollection.h:20 AliCounterCollection.h:21 AliCounterCollection.h:22 AliCounterCollection.h:23 AliCounterCollection.h:24 AliCounterCollection.h:25 AliCounterCollection.h:26 AliCounterCollection.h:27 AliCounterCollection.h:28 AliCounterCollection.h:29 AliCounterCollection.h:30 AliCounterCollection.h:31 AliCounterCollection.h:32 AliCounterCollection.h:33 AliCounterCollection.h:34 AliCounterCollection.h:35 AliCounterCollection.h:36 AliCounterCollection.h:37 AliCounterCollection.h:38 AliCounterCollection.h:39 AliCounterCollection.h:40 AliCounterCollection.h:41 AliCounterCollection.h:42 AliCounterCollection.h:43 AliCounterCollection.h:44 AliCounterCollection.h:45 AliCounterCollection.h:46 AliCounterCollection.h:47 AliCounterCollection.h:48 AliCounterCollection.h:49 AliCounterCollection.h:50 AliCounterCollection.h:51 AliCounterCollection.h:52 AliCounterCollection.h:53 AliCounterCollection.h:54 AliCounterCollection.h:55 AliCounterCollection.h:56 AliCounterCollection.h:57 AliCounterCollection.h:58 AliCounterCollection.h:59 AliCounterCollection.h:60 AliCounterCollection.h:61 AliCounterCollection.h:62 AliCounterCollection.h:63 AliCounterCollection.h:64 AliCounterCollection.h:65 AliCounterCollection.h:66 AliCounterCollection.h:67 AliCounterCollection.h:68 AliCounterCollection.h:69 AliCounterCollection.h:70 AliCounterCollection.h:71 AliCounterCollection.h:72 AliCounterCollection.h:73 AliCounterCollection.h:74 AliCounterCollection.h:75 AliCounterCollection.h:76 AliCounterCollection.h:77 AliCounterCollection.h:78 AliCounterCollection.h:79 AliCounterCollection.h:80 AliCounterCollection.h:81 AliCounterCollection.h:82 AliCounterCollection.h:83 AliCounterCollection.h:84 AliCounterCollection.h:85 AliCounterCollection.h:86 AliCounterCollection.h:87 AliCounterCollection.h:88 AliCounterCollection.h:89 AliCounterCollection.h:90 AliCounterCollection.h:91 AliCounterCollection.h:92 AliCounterCollection.h:93 AliCounterCollection.h:94 AliCounterCollection.h:95 AliCounterCollection.h:96 AliCounterCollection.h:97 AliCounterCollection.h:98 AliCounterCollection.h:99 AliCounterCollection.h:100 AliCounterCollection.h:101 AliCounterCollection.h:102 AliCounterCollection.h:103 AliCounterCollection.h:104 AliCounterCollection.h:105 AliCounterCollection.h:106 AliCounterCollection.h:107 AliCounterCollection.h:108 AliCounterCollection.h:109 AliCounterCollection.h:110 AliCounterCollection.h:111 AliCounterCollection.h:112 AliCounterCollection.h:113 AliCounterCollection.h:114 AliCounterCollection.h:115 AliCounterCollection.h:116 AliCounterCollection.h:117 AliCounterCollection.h:118 AliCounterCollection.h:119 AliCounterCollection.h:120 AliCounterCollection.h:121 AliCounterCollection.h:122 AliCounterCollection.h:123 AliCounterCollection.h:124 AliCounterCollection.h:125 AliCounterCollection.h:126 AliCounterCollection.h:127 AliCounterCollection.h:128 AliCounterCollection.h:129 AliCounterCollection.h:130 AliCounterCollection.h:131 AliCounterCollection.h:132 AliCounterCollection.h:133 AliCounterCollection.h:134 AliCounterCollection.h:135 AliCounterCollection.h:136 AliCounterCollection.h:137 AliCounterCollection.h:138 AliCounterCollection.h:139 AliCounterCollection.h:140 AliCounterCollection.h:141 AliCounterCollection.h:142 AliCounterCollection.h:143 AliCounterCollection.h:144 AliCounterCollection.h:145 AliCounterCollection.h:146 AliCounterCollection.h:147 AliCounterCollection.h:148