]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/RAWDatabase/AliStats.h
Merge branch 'master' of http://git.cern.ch/pub/AliRoot
[u/mrichter/AliRoot.git] / RAW / RAWDatabase / AliStats.h
CommitLineData
a197a4ce 1#ifndef ALISTATS_H
2#define ALISTATS_H
d04aea32 3// @(#) $Id$
a197a4ce 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
a0f34e87 15
a197a4ce 16#ifndef ROOT_TObject
17#include <TObject.h>
18#endif
19
20#ifndef ROOT_TDatime
21#include <TDatime.h>
22#endif
23
24#ifndef ROOT_TString
25#include <TString.h>
26#endif
27
a197a4ce 28// Forward class declarations
a0f34e87 29#ifndef ROOT_TH1F
30#include <TH1F.h>
31#endif
a197a4ce 32
33class AliStats : public TObject {
34
35public:
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; }
ad594815 42 void SetFirstId(Int_t run, Int_t event) { fRun = run; fFirstEvent = event; }
43 void SetLastId(Int_t event) { fLastEvent = event; }
a197a4ce 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);
a197a4ce 49
50 Int_t GetEvents() const { return fEvents; }
ad594815 51 Int_t GetRun() const { return fRun; }
a197a4ce 52 Int_t GetFirstEvent() const { return fFirstEvent; }
a197a4ce 53 Int_t GetLastEvent() const { return fLastEvent; }
54 TDatime &GetBeginTime() { return fBegin; }
55 TDatime &GetEndTime() { return fEnd; }
56 Double_t GetFileSize() const { return fFileSize; }
57 Int_t GetCompressionMode() const { return fCompMode; }
58 Float_t GetCompressionFactor() const { return fCompFactor; }
59 Bool_t GetFilterState() const { return fFilter; }
60 const char *GetFileName() const { return fFileName; }
61 TH1F *GetRTHist() const { return fRTHist; }
62
63private:
64 Int_t fEvents; // number of events in this file
ad594815 65 Int_t fRun; // run number of first event in file
a197a4ce 66 Int_t fFirstEvent; // event number of first event in file
a197a4ce 67 Int_t fLastEvent; // event number of last event in file
68 TDatime fBegin; // begin of filling time
69 TDatime fEnd; // end of filling time
70 TString fFileName; // name of file containing this data
71 Double_t fFileSize; // size of file
72 Float_t fCompFactor; // tree compression factor
73 Int_t fCompMode; // compression mode
74 Bool_t fFilter; // 3rd level filter on/off
75 TH1F *fRTHist; // histogram of real-time to process chunck of data
76 Float_t fChunk; //!chunk to be histogrammed
77
da445579 78 ClassDef(AliStats,2) // Statistics object
a197a4ce 79};
80
81#endif