]>
Commit | Line | Data |
---|---|---|
a197a4ce | 1 | #ifndef ALISTATS_H |
2 | #define ALISTATS_H | |
3 | // @(#)alimdc:$Name$:$Id$ | |
4 | // Author: Fons Rademakers 26/11/99 | |
5 | ||
6 | /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. * | |
7 | * See cxx source for full Copyright notice */ | |
8 | ||
9 | ////////////////////////////////////////////////////////////////////////// | |
10 | // // | |
11 | // AliStats // | |
12 | // // | |
13 | ////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | #include <TObject.h> | |
17 | #endif | |
18 | ||
19 | #ifndef ROOT_TDatime | |
20 | #include <TDatime.h> | |
21 | #endif | |
22 | ||
23 | #ifndef ROOT_TString | |
24 | #include <TString.h> | |
25 | #endif | |
26 | ||
27 | ||
28 | // Forward class declarations | |
29 | class AliRawDB; | |
30 | class TH1F; | |
31 | ||
32 | ||
33 | class AliStats : public TObject { | |
34 | ||
35 | public: | |
36 | AliStats(const char *filename = "", Int_t compmode = 0, Bool_t filter = kFALSE); | |
37 | AliStats(const AliStats &rhs); | |
38 | virtual ~AliStats(); | |
39 | AliStats &operator=(const AliStats &rhs); | |
40 | ||
41 | void SetEvents(Int_t events) { fEvents = events; } | |
42 | void SetFirstId(Int_t run, Int_t event) { fFirstRun = run; fFirstEvent = event; } | |
43 | void SetLastId(Int_t run, Int_t event) { fLastRun = run; fLastEvent = event; } | |
44 | void SetBeginTime() { fBegin.Set(); } | |
45 | void SetEndTime() { fEnd.Set(); } | |
46 | void SetFileSize(Double_t size) { fFileSize = size; } | |
47 | void SetCompressionFactor(Float_t comp) { fCompFactor = comp; } | |
48 | void Fill(Float_t time); | |
49 | void WriteToDB(AliRawDB *rawdb); | |
50 | ||
51 | Int_t GetEvents() const { return fEvents; } | |
52 | Int_t GetFirstRun() const { return fFirstRun; } | |
53 | Int_t GetFirstEvent() const { return fFirstEvent; } | |
54 | Int_t GetLastRun() const { return fLastRun; } | |
55 | Int_t GetLastEvent() const { return fLastEvent; } | |
56 | TDatime &GetBeginTime() { return fBegin; } | |
57 | TDatime &GetEndTime() { return fEnd; } | |
58 | Double_t GetFileSize() const { return fFileSize; } | |
59 | Int_t GetCompressionMode() const { return fCompMode; } | |
60 | Float_t GetCompressionFactor() const { return fCompFactor; } | |
61 | Bool_t GetFilterState() const { return fFilter; } | |
62 | const char *GetFileName() const { return fFileName; } | |
63 | TH1F *GetRTHist() const { return fRTHist; } | |
64 | ||
65 | private: | |
66 | Int_t fEvents; // number of events in this file | |
67 | Int_t fFirstRun; // run number of first event in file | |
68 | Int_t fFirstEvent; // event number of first event in file | |
69 | Int_t fLastRun; // run number of last event in file | |
70 | Int_t fLastEvent; // event number of last event in file | |
71 | TDatime fBegin; // begin of filling time | |
72 | TDatime fEnd; // end of filling time | |
73 | TString fFileName; // name of file containing this data | |
74 | Double_t fFileSize; // size of file | |
75 | Float_t fCompFactor; // tree compression factor | |
76 | Int_t fCompMode; // compression mode | |
77 | Bool_t fFilter; // 3rd level filter on/off | |
78 | TH1F *fRTHist; // histogram of real-time to process chunck of data | |
79 | Float_t fChunk; //!chunk to be histogrammed | |
80 | ||
81 | ClassDef(AliStats,1) // Statistics object | |
82 | }; | |
83 | ||
84 | #endif |