]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineSPDphysInfo.cxx
introducing SDD, SSD layer misal (Andrea) + helper methods for hierarchical alignment...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDphysInfo.cxx
CommitLineData
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
11ClassImp(AliITSOnlineSPDphysInfo)
12
13AliITSOnlineSPDphysInfo::AliITSOnlineSPDphysInfo():
14 fNrRuns(0),
15 fRunNrs(0),
16 fEqNr(999),
17 fNrEvents(0)
18{}
19
20AliITSOnlineSPDphysInfo::~AliITSOnlineSPDphysInfo() {}
21
22void AliITSOnlineSPDphysInfo::ClearThis() {
23 // reset all values for this object
24 fNrRuns=0;
25 fRunNrs=0;
26 fEqNr=999;
27 fNrEvents=0;
28}
29
30void 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
37UInt_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
47void 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}