Line data Source code
1 : /////////////////////////////////////////////////////////////////
2 : // Author: Henrik Tydesjo //
3 : // This class is used as a container online. //
4 : // It holds information needed for a scan. //
5 : // This class should only be used through the interface of the //
6 : // AliITSOnlineSPDphys class. //
7 : /////////////////////////////////////////////////////////////////
8 :
9 : #include "AliITSOnlineSPDphysInfo.h"
10 :
11 116 : ClassImp(AliITSOnlineSPDphysInfo)
12 :
13 0 : AliITSOnlineSPDphysInfo::AliITSOnlineSPDphysInfo():
14 0 : fNrRuns(0),
15 0 : fRunNrs(0),
16 0 : fEqNr(999),
17 0 : fNrEvents(0)
18 0 : {}
19 :
20 0 : AliITSOnlineSPDphysInfo::~AliITSOnlineSPDphysInfo() {}
21 :
22 : void AliITSOnlineSPDphysInfo::ClearThis() {
23 : // reset all values for this object
24 0 : fNrRuns=0;
25 0 : fRunNrs=0;
26 0 : fEqNr=999;
27 0 : fNrEvents=0;
28 0 : }
29 :
30 : void AliITSOnlineSPDphysInfo::AddRunNr(UInt_t val) {
31 : // add a new run nr, allocate space for TArrayI
32 0 : fNrRuns++;
33 0 : fRunNrs.Set(fNrRuns);
34 0 : fRunNrs.AddAt(val, fNrRuns-1);
35 0 : }
36 :
37 : UInt_t AliITSOnlineSPDphysInfo::GetRunNr(UInt_t posi) const {
38 : // get run nr
39 0 : if (posi<fNrRuns) {
40 0 : return fRunNrs.At(posi);
41 : }
42 : else {
43 0 : return 0;
44 : }
45 0 : }
46 :
47 : void AliITSOnlineSPDphysInfo::AddNrEvents(Int_t val) {
48 : // add val nr of events (val could be negative)
49 0 : if (fNrEvents+val>0) {
50 0 : fNrEvents+=val;
51 0 : }
52 : else {
53 0 : fNrEvents=0;
54 : }
55 0 : }
|