-
Notifications
You must be signed in to change notification settings - Fork 1
/
AliRPCRunStatistics.h
61 lines (54 loc) · 2.95 KB
/
AliRPCRunStatistics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// AliRunRPCStatistics.h
//
// Created by Gabriele Gaetano Fronzé
// Copyright © 2016 Gabriele Gaetano Fronzé. All rights reserved.
//
#ifndef AliRPCRunStatistics_h
#define AliRPCRunStatistics_h
#include <stdio.h>
#include "TObject.h"
#include "TString.h"
class AliRPCRunStatistics : public TObject{
public:
AliRPCRunStatistics();
AliRPCRunStatistics(const AliRPCRunStatistics &obj) : TObject(obj){};
AliRPCRunStatistics(UInt_t runNumber, ULong64_t timeStampStart, ULong64_t timeStampStop, UInt_t year, Bool_t isCalib, Bool_t isDark, Double_t meanDarkCurrent, Double_t meanTotalCurrent, Double_t meanHV, ULong64_t totalScalerCountsBending, ULong64_t totalScalerCountsNotBending);
~AliRPCRunStatistics(){};
inline UInt_t GetRunNumber() const { return fRunNumber; };
inline Double_t GetTimeStampStart() const { return (Double_t)fTimeStampStart; };
inline Double_t GetTimeStampStop() const { return (Double_t)fTimeStampStop; };
inline UInt_t GetYear() const { return fYear; };
inline Double_t GetElapsedTime() const { if(fTimeStampStop==0 || fTimeStampStart==0) return 0; else return (Double_t)(fTimeStampStop-fTimeStampStart); };
inline Bool_t GetIsCalib() const { return fIsCalib; };
inline Bool_t GetIsDark() const { return fIsDark; };
inline Double_t GetMeanDarkCurrent() const { return fMeanDarkCurrent; };
inline Double_t GetMeanTotalCurrent() const { return fMeanTotalCurrent; };
inline Double_t GetMeanNetCurrent() const { return fMeanTotalCurrent-fMeanDarkCurrent; };
inline Double_t GetMeanHV() const { return fMeanHV; };
inline Double_t GetTotalScalerCountsBending() const { return (Double_t)fTotalScalerCountsBending; };
inline Double_t GetTotalScalerCountsNotBending() const { return (Double_t)fTotalScalerCountsNotBending; };
inline Double_t GetMeanRateBending() const { return (Double_t)fTotalScalerCountsBending/(Double_t)(fTimeStampStop-fTimeStampStart); };
inline Double_t GetMeanRateNotBending() const { return (Double_t)fTotalScalerCountsNotBending/(Double_t)(fTimeStampStop-fTimeStampStart); };
inline Double_t GetIntegratedCharge() const { if(fTimeStampStop==0 || fTimeStampStart==0) return 0; else return (fMeanTotalCurrent-fMeanDarkCurrent)*(Double_t)(fTimeStampStop-fTimeStampStart); };
inline static Bool_t SortRunStatistics(AliRPCRunStatistics* a, AliRPCRunStatistics* b ){
return a->GetTimeStampStart()<b->GetTimeStampStart();
}
Bool_t IsEqual (const TObject *obj) const;
Int_t Compare(const TObject *obj) const;
Bool_t IsSortable() const { return kTRUE; };
private:
UInt_t fRunNumber;
ULong64_t fTimeStampStart;
ULong64_t fTimeStampStop;
UInt_t fYear;
Bool_t fIsCalib;
Bool_t fIsDark;
Double_t fMeanDarkCurrent;
Double_t fMeanTotalCurrent;
Double_t fMeanHV;
ULong64_t fTotalScalerCountsBending;
ULong64_t fTotalScalerCountsNotBending;
ClassDef(AliRPCRunStatistics,4);
};
#endif /* AliRPCRunStatistics_h */