Fix for the case of non-existent calibration files
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDscanInfoMeanTh.cxx
CommitLineData
b15de2d2 1/////////////////////////////////////////////////////////////////
2// Author: Henrik Tydesjo //
3// This class is used as a container online. //
4// It holds additional information needed for a mean threshold //
5// scan. //
6// This class should only be used through the interface of the //
7// AliITSOnlineSPDscanMeanTh class. //
8/////////////////////////////////////////////////////////////////
9
10#include "AliITSOnlineSPDscanInfoMeanTh.h"
11
12ClassImp(AliITSOnlineSPDscanInfoMeanTh)
13
14AliITSOnlineSPDscanInfoMeanTh::AliITSOnlineSPDscanInfoMeanTh() :
470cfbd1 15 AliITSOnlineSPDscanInfoMultiple() {}
b15de2d2 16
17AliITSOnlineSPDscanInfoMeanTh::~AliITSOnlineSPDscanInfoMeanTh() {}
18
19UInt_t AliITSOnlineSPDscanInfoMeanTh::AddScanStep() {
20 // add a new scan step, allocate space in the TArrays
21 UInt_t returnval = AliITSOnlineSPDscanInfoMultiple::AddScanStep();
22 for (UInt_t hs=0; hs<6; hs++) {
23 fDacLow[hs].Set(fNSteps);
24 fDacLow[hs].AddAt(-1, fNSteps-1);
25 fDacHigh[hs].Set(fNSteps);
26 fDacHigh[hs].AddAt(-1, fNSteps-1);
27 fTPAmps[hs].Set(fNSteps);
28 fTPAmps[hs].AddAt(-1, fNSteps-1);
29 }
30 return returnval;
31}
32
33void AliITSOnlineSPDscanInfoMeanTh::SetDacLow(UInt_t nsi, UInt_t hs, Int_t val) {
34 if (nsi<fNSteps) fDacLow[hs].AddAt(val,nsi);
35}
36void AliITSOnlineSPDscanInfoMeanTh::SetDacHigh(UInt_t nsi, UInt_t hs, Int_t val) {
37 if (nsi<fNSteps) fDacHigh[hs].AddAt(val,nsi);
38}
39void AliITSOnlineSPDscanInfoMeanTh::SetTPAmp(UInt_t nsi, UInt_t hs, Int_t val) {
40 if (nsi<fNSteps) fTPAmps[hs].AddAt(val,nsi);
41}
42Int_t AliITSOnlineSPDscanInfoMeanTh::GetDacLow(UInt_t nsi, UInt_t hs) const {
43 if (nsi<fNSteps) return fDacLow[hs].At(nsi);
44 else return -1;
45}
46Int_t AliITSOnlineSPDscanInfoMeanTh::GetDacHigh(UInt_t nsi, UInt_t hs) const {
47 if (nsi<fNSteps) return fDacHigh[hs].At(nsi);
48 else return -1;
49}
50Int_t AliITSOnlineSPDscanInfoMeanTh::GetTPAmp(UInt_t nsi, UInt_t hs) const {
51 if (nsi<fNSteps) return fTPAmps[hs].At(nsi);
52 else return -1;
53}