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