]>
Commit | Line | Data |
---|---|---|
6727e2db | 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 | ClassImp(AliITSOnlineSPDphysInfo) | |
12 | ||
13 | AliITSOnlineSPDphysInfo::AliITSOnlineSPDphysInfo(): | |
14 | fNrRuns(0), | |
15 | fRunNrs(0), | |
16 | fEqNr(999), | |
17 | fNrEvents(0) | |
18 | {} | |
19 | ||
20 | AliITSOnlineSPDphysInfo::~AliITSOnlineSPDphysInfo() {} | |
21 | ||
22 | void AliITSOnlineSPDphysInfo::ClearThis() { | |
23 | // reset all values for this object | |
24 | fNrRuns=0; | |
25 | fRunNrs=0; | |
26 | fEqNr=999; | |
27 | fNrEvents=0; | |
28 | } | |
29 | ||
30 | void AliITSOnlineSPDphysInfo::AddRunNr(UInt_t val) { | |
31 | // add a new run nr, allocate space for TArrayI | |
32 | fNrRuns++; | |
33 | fRunNrs.Set(fNrRuns); | |
34 | fRunNrs.AddAt(val, fNrRuns-1); | |
35 | } | |
36 | ||
37 | UInt_t AliITSOnlineSPDphysInfo::GetRunNr(UInt_t posi) const { | |
38 | // get run nr | |
39 | if (posi<fNrRuns) { | |
40 | return fRunNrs.At(posi); | |
41 | } | |
42 | else { | |
43 | return 0; | |
44 | } | |
45 | } | |
46 | ||
47 | void AliITSOnlineSPDphysInfo::AddNrEvents(Int_t val) { | |
48 | // add val nr of events (val could be negative) | |
49 | if (fNrEvents+val>0) { | |
50 | fNrEvents+=val; | |
51 | } | |
52 | else { | |
53 | fNrEvents=0; | |
54 | } | |
55 | } |