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():
28 AliITSOnlineSPDscanInfo::~AliITSOnlineSPDscanInfo() {
31 void AliITSOnlineSPDscanInfo::ClearThis() {
32 // reset all values for this object
40 for (Int_t hs=0; hs<6; hs++) {
41 fHalfStaveScanned[hs]=kFALSE;
43 for (Int_t i=0; i<10; i++) {
44 fChipPresent[i]=kTRUE;
48 UInt_t AliITSOnlineSPDscanInfo::AddScanStep() {
49 // add a new scan step, allocate space for TArrayI
51 fTriggers.Set(fNSteps);
52 fTriggers.AddAt(0, fNSteps-1);
55 void AliITSOnlineSPDscanInfo::IncrementTriggers(UInt_t nsi) {
56 // increment the nr of triggers for step nsi
58 fTriggers.AddAt(GetTriggers(nsi)+1,nsi);
61 void AliITSOnlineSPDscanInfo::SetTriggers(UInt_t nsi, UInt_t val) {
62 // set the nr of triggers for step nsi
64 fTriggers.AddAt(val,nsi);
67 UInt_t AliITSOnlineSPDscanInfo::GetTriggers(UInt_t nsi) const {
68 // get the nr of triggers for step nsi
69 if (nsi<fNSteps) return fTriggers.At(nsi);
72 void AliITSOnlineSPDscanInfo::SetHalfStaveScanned(UInt_t val, Bool_t b) {
73 // set half stave scanned
75 fHalfStaveScanned[val]=b;
78 Bool_t AliITSOnlineSPDscanInfo::GetHalfStaveScanned(UInt_t val) {
79 // set half stave scanned
81 return fHalfStaveScanned[val];
84 printf("hs requested is out of range (hs=%d)\n",val);