1 ////////////////////////////////////////////////////////////
2 // Author: Henrik Tydesjo //
3 // Interface class to the containers of an online mean //
5 ////////////////////////////////////////////////////////////
8 #include "AliITSOnlineSPDscanMeanTh.h"
9 #include "AliITSOnlineSPDscanInfoMeanTh.h"
11 ClassImp(AliITSOnlineSPDscanMeanTh)
13 AliITSOnlineSPDscanMeanTh::AliITSOnlineSPDscanMeanTh(Char_t *fileName) {
15 sprintf(fFileName,"%s",fileName);
16 // look for a previously saved info object
17 // (if file not found create a new one and return, else read)
18 FILE* fp0 = fopen(fFileName, "r");
20 fScanInfo = new AliITSOnlineSPDscanInfoMeanTh();
21 fFile = new TFile(fFileName, "RECREATE");
26 fFile = new TFile(fFileName, "READ");
28 fFile->GetObject("AliITSOnlineSPDscanInfo", fScanInfo);
33 AliITSOnlineSPDscanMeanTh::AliITSOnlineSPDscanMeanTh(const AliITSOnlineSPDscanMeanTh& scan) :
34 AliITSOnlineSPDscanMultiple(scan)
37 AliITSOnlineSPDscanMeanTh::~AliITSOnlineSPDscanMeanTh() {}
39 AliITSOnlineSPDscanMeanTh& AliITSOnlineSPDscanMeanTh::operator=(const AliITSOnlineSPDscanMeanTh& scan) {
40 // assignment operator (should not be used)
41 printf("This object should not be copied!");
43 // still do nothing...
48 //void AliITSOnlineSPDscanMeanTh::ReadFromTObjArray(TObjArray *arr) {
50 // Int_t nrEntries = arr->GetEntriesFast();
51 // if (nrEntries>0 && nrEntries%2==1) {
52 // fScanInfo = (AliITSOnlineSPDscanInfoMeanTh*) arr->At(0);
53 // fInfoModified=kTRUE;
54 // FillFromTObjArray(arr,nrEntries);
58 UInt_t AliITSOnlineSPDscanMeanTh::AddScanStep() {
60 return ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->AddScanStep();
63 void AliITSOnlineSPDscanMeanTh::SetDacLow(UInt_t nsi, UInt_t hs, Int_t val) {
64 // set dac low value for step nsi and half stave hs
66 ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->SetDacLow(nsi,hs,val);
69 void AliITSOnlineSPDscanMeanTh::SetDacHigh(UInt_t nsi, UInt_t hs, Int_t val) {
70 // set dac high value for step nsi and half stave hs
72 ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->SetDacHigh(nsi,hs,val);
75 void AliITSOnlineSPDscanMeanTh::SetTPAmp(UInt_t nsi, UInt_t hs, Int_t val) {
76 // set test pulse amplitude for step nsi and half stave hs
78 ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->SetTPAmp(nsi,hs,val);
82 Int_t AliITSOnlineSPDscanMeanTh::GetDacLow(UInt_t nsi, UInt_t hs) {
83 return ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->GetDacLow(nsi,hs);
85 Int_t AliITSOnlineSPDscanMeanTh::GetDacHigh(UInt_t nsi, UInt_t hs) {
86 return ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->GetDacHigh(nsi,hs);
88 Int_t AliITSOnlineSPDscanMeanTh::GetTPAmp(UInt_t nsi, UInt_t hs) {
89 return ((AliITSOnlineSPDscanInfoMeanTh*)fScanInfo)->GetTPAmp(nsi,hs);