]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/hough/AliL3Histogram1D.h
Added AliL3Stopwatch.
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Histogram1D.h
CommitLineData
f7473b79 1#ifndef ALIL3_HISTOGRAM1D
2#define ALIL3_HISTOGRAM1D
3
4#include "AliL3RootTypes.h"
f7473b79 5
95a00d93 6#ifdef use_root
7#include <TH1.h>
8#endif
f7473b79 9
10class AliL3Histogram1D {
11
12 private:
13
14 Double_t *fContent; //!
15 Char_t fName[100];
16 Int_t fNbins;
17 Int_t fNcells;
18 Int_t fEntries;
19
20 Int_t fThreshold;
21 Double_t fXmin;
22 Double_t fXmax;
23
24
25#ifdef use_root
26 TH1F *fRootHisto;
27#endif
28
29 public:
30 AliL3Histogram1D();
31 AliL3Histogram1D(Char_t *name,Char_t *id,Int_t nxbin,Double_t xmin,Double_t xmax);
32 virtual ~AliL3Histogram1D();
33
34 void Reset();
35 void Fill(Double_t x,Int_t weight=1);
36 void AddBinContent(Int_t bin,Int_t weight);
b1886074 37 Int_t GetMaximumBin();
f7473b79 38 Int_t FindBin(Double_t x);
39 Double_t GetBinContent(Int_t bin);
40 Double_t GetBinCenter(Int_t bin);
41 Int_t GetNEntries() {return fEntries;}
42
43 void SetBinContent(Int_t bin,Int_t value);
44 void SetThreshold(Int_t i) {fThreshold = i;}
45
46
47#ifdef use_root
48 void Draw(Char_t *option="hist");
49 TH1F *GetRootHisto() {return fRootHisto;}
50#endif
51
b1886074 52 ClassDef(AliL3Histogram1D,1) //1D histogram class
f7473b79 53
54};
55
56#endif