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 /////////////////////////////////////////////////////////////////
9 #include "AliITSOnlineSPDscanInfo.h"
11 ClassImp(AliITSOnlineSPDscanInfo)
13 AliITSOnlineSPDscanInfo::AliITSOnlineSPDscanInfo():
30 AliITSOnlineSPDscanInfo::~AliITSOnlineSPDscanInfo() {
33 void AliITSOnlineSPDscanInfo::ClearThis() {
34 // reset all values for this object
42 for (Int_t hs=0; hs<6; hs++) {
43 fHalfStaveScanned[hs]=kFALSE;
45 for (Int_t i=0; i<10; i++) {
46 fChipPresent[i]=kTRUE;
50 UInt_t AliITSOnlineSPDscanInfo::AddScanStep() {
51 // add a new scan step, allocate space for TArrayI
53 fTriggers.Set(fNSteps);
54 fTriggers.AddAt(0, fNSteps-1);
57 void AliITSOnlineSPDscanInfo::IncrementTriggers(UInt_t nsi) {
58 // increment the nr of triggers for step nsi
60 fTriggers.AddAt(GetTriggers(nsi)+1,nsi);
63 void AliITSOnlineSPDscanInfo::SetTriggers(UInt_t nsi, UInt_t val) {
64 // set the nr of triggers for step nsi
66 fTriggers.AddAt(val,nsi);
69 UInt_t AliITSOnlineSPDscanInfo::GetTriggers(UInt_t nsi) const {
70 // get the nr of triggers for step nsi
71 if (nsi<fNSteps) return fTriggers.At(nsi);
74 void AliITSOnlineSPDscanInfo::SetHalfStaveScanned(UInt_t val, Bool_t b) {
75 // set half stave scanned
77 fHalfStaveScanned[val]=b;
80 Bool_t AliITSOnlineSPDscanInfo::GetHalfStaveScanned(UInt_t val) {
81 // set half stave scanned
83 return fHalfStaveScanned[val];
86 printf("hs requested is out of range (hs=%d)\n",val);