]>
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), | |
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 | ||
28 | AliITSOnlineSPDscanInfo::~AliITSOnlineSPDscanInfo() { | |
29 | } | |
30 | ||
31 | void 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; | |
40 | for (Int_t i=0; i<10; i++) { | |
41 | fChipPresent[i]=kTRUE; | |
42 | } | |
43 | } | |
44 | ||
45 | UInt_t AliITSOnlineSPDscanInfo::AddScanStep() { | |
46 | // add a new scan step, allocate space for TArrayI | |
47 | fNSteps++; | |
48 | fTriggers.Set(fNSteps); | |
49 | fTriggers.AddAt(0, fNSteps-1); | |
50 | return fNSteps-1; | |
51 | } | |
52 | ||
53 | void AliITSOnlineSPDscanInfo::IncrementTriggers(UInt_t nsi) { | |
54 | // increment the nr of triggers for step nsi | |
55 | if (nsi<fNSteps) { | |
56 | fTriggers.AddAt(GetTriggers(nsi)+1,nsi); | |
57 | } | |
58 | } | |
59 | void AliITSOnlineSPDscanInfo::SetTriggers(UInt_t nsi, UInt_t val) { | |
60 | // set the nr of triggers for step nsi | |
61 | if (nsi<fNSteps) { | |
62 | fTriggers.AddAt(val,nsi); | |
63 | } | |
64 | } | |
65 | ||
66 | UInt_t AliITSOnlineSPDscanInfo::GetTriggers(UInt_t nsi) const { | |
67 | // get the nr of triggers for step nsi | |
68 | if (nsi<fNSteps) return fTriggers.At(nsi); | |
69 | else return 0; | |
70 | } |