]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineSPDscanInfo.cxx
AliITSOnlineSPDscan and AliITSOnlineSPDscanInfo: Changes in calibration header format...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDscanInfo.cxx
CommitLineData
b15de2d2 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// AliITSOnlineSPDscan class. //
7/////////////////////////////////////////////////////////////////
8
9#include "AliITSOnlineSPDscanInfo.h"
10
11ClassImp(AliITSOnlineSPDscanInfo)
12
13AliITSOnlineSPDscanInfo::AliITSOnlineSPDscanInfo():
14 fType(999),
15 fRunNr(0),
16 fRouterNr(999),
17 fNSteps(0),
18 fTriggers(0),
19 fRowStart(0),
20 fRowEnd(255),
21 fDacStep(1),
22 fDacStart(0),
23 fDacEnd(255)
24{
25 ClearThis();
26}
27
28AliITSOnlineSPDscanInfo::~AliITSOnlineSPDscanInfo() {
29}
30
31void AliITSOnlineSPDscanInfo::ClearThis() {
32 // reset all values for this object
33 fNSteps=0;
34 fTriggers=0;
35 fType=999;
36 fRunNr=0;
37 fRouterNr=999;
38 fRowStart=0;
39 fRowEnd=255;
ad18504e 40 for (Int_t hs=0; hs<6; hs++) {
41 fHalfStaveScanned[hs]=kFALSE;
42 }
b15de2d2 43 for (Int_t i=0; i<10; i++) {
44 fChipPresent[i]=kTRUE;
45 }
46}
47
48UInt_t AliITSOnlineSPDscanInfo::AddScanStep() {
49 // add a new scan step, allocate space for TArrayI
50 fNSteps++;
51 fTriggers.Set(fNSteps);
52 fTriggers.AddAt(0, fNSteps-1);
53 return fNSteps-1;
54}
b15de2d2 55void AliITSOnlineSPDscanInfo::IncrementTriggers(UInt_t nsi) {
56 // increment the nr of triggers for step nsi
57 if (nsi<fNSteps) {
58 fTriggers.AddAt(GetTriggers(nsi)+1,nsi);
59 }
60}
61void AliITSOnlineSPDscanInfo::SetTriggers(UInt_t nsi, UInt_t val) {
62 // set the nr of triggers for step nsi
63 if (nsi<fNSteps) {
64 fTriggers.AddAt(val,nsi);
65 }
66}
b15de2d2 67UInt_t AliITSOnlineSPDscanInfo::GetTriggers(UInt_t nsi) const {
68 // get the nr of triggers for step nsi
69 if (nsi<fNSteps) return fTriggers.At(nsi);
70 else return 0;
71}
ad18504e 72void AliITSOnlineSPDscanInfo::SetHalfStaveScanned(UInt_t val, Bool_t b) {
73 // set half stave scanned
74 if (val<6) {
75 fHalfStaveScanned[val]=b;
76 }
77}
78Bool_t AliITSOnlineSPDscanInfo::GetHalfStaveScanned(UInt_t val) {
79 // set half stave scanned
80 if (val<6) {
81 return fHalfStaveScanned[val];
82 }
83 else {
84 printf("hs requested is out of range (hs=%d)\n",val);
85 return kFALSE;
86 }
87}