-
Notifications
You must be signed in to change notification settings - Fork 1
/
AliRPCRunStatistics.cpp
48 lines (43 loc) · 1.7 KB
/
AliRPCRunStatistics.cpp
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
//
// AliRPCRunStatistics.cpp
//
// Created by Gabriele Gaetano Fronzé
// Copyright © 2016 Gabriele Gaetano Fronzé. All rights reserved.
//
#include "AliRPCRunStatistics.h"
#include "TClass.h"
AliRPCRunStatistics::AliRPCRunStatistics() : TObject(){
fRunNumber=0;
fTimeStampStart=0;
fTimeStampStop=0;
fYear=0;
fIsCalib=kFALSE;
fIsDark=kFALSE;
fMeanDarkCurrent=0.;
fMeanTotalCurrent=0.;
fMeanHV=0.;
fTotalScalerCountsBending=0.;
fTotalScalerCountsNotBending=0.;
};
AliRPCRunStatistics::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): TObject(){
fRunNumber=runNumber;
fTimeStampStart=timeStampStart;
fTimeStampStop=timeStampStop;
fYear=year;
fIsCalib=isCalib;
fIsDark=isDark;
fMeanDarkCurrent=(meanDarkCurrent>0?meanDarkCurrent:0);
fMeanTotalCurrent=(meanTotalCurrent>0?meanTotalCurrent:0);
if(fMeanTotalCurrent<fMeanDarkCurrent) fMeanTotalCurrent=fMeanDarkCurrent;
fMeanHV=meanHV;
fTotalScalerCountsBending=totalScalerCountsBending;
fTotalScalerCountsNotBending=totalScalerCountsNotBending;
};
Bool_t AliRPCRunStatistics::IsEqual (const TObject *obj) const {
return fTimeStampStart == ((AliRPCRunStatistics*)obj)->GetTimeStampStart();
};
Int_t AliRPCRunStatistics::Compare(const TObject *obj) const {
if ( fTimeStampStart < ((AliRPCRunStatistics*)obj)->GetTimeStampStart() ) return -1;
if ( fTimeStampStart == ((AliRPCRunStatistics*)obj)->GetTimeStampStart() ) return 0;
else return 1;
};