1 #ifndef ALIITSONLINESPDFO_H
2 #define ALIITSONLINESPDFO_H
3 /* Copyright(c) 2008-2010, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////
8 // Author: A. Mastroserio //
9 // This class is used within the detector algorithm framework //
10 // to write and read FO scan data. //
11 ////////////////////////////////////////////////////////////////
14 #include <THashList.h>
18 class AliITSOnlineSPDfoInfo;
20 class AliITSOnlineSPDfo {
23 AliITSOnlineSPDfo();//ctor
24 AliITSOnlineSPDfo(TString inputfile, Int_t runNr, Int_t eqId);
25 AliITSOnlineSPDfo(const AliITSOnlineSPDfo &c);
27 virtual ~AliITSOnlineSPDfo(){ delete fArray; delete fDACnames;} //dctor
29 enum {kFOPOL=0, kCONVPOL=1, kCOMPREF=2, kCGPOL =3, kPreVTH=4, kIdFOPOL=20, kIdCONVPOL=17, kIdCOMPREF=16, kIdCGPOL=14, kIdPreVTH=39};
32 void AddMeasurement(const TArrayS dac, Short_t measure[3], Int_t hs, Int_t chipId);
33 Int_t CheckDACEntry(const TArrayS dac);
34 TString CreateDACEntry(const TArrayS dacs) const;
35 TArrayS CreateDACArray(const TArrayS dacs, const TArrayS dacId) const;
36 void CreateOutputFile();
40 void SetNdacs(UInt_t ndacs) {fNdacs=ndacs;}
41 void SetFOscanParams(AliITSOnlineSPDfoInfo *info) {fInfo=info;}
42 void SetFile(TString inputfile);
43 void SetDACArray(TObjArray *obj) {if(!fArray) fArray = obj; else printf("The fArray is alreay available, no need to set it again.\n");}
46 TFile* GetFile() const {return fFile;}
47 UInt_t GetNdacs() const {return fNdacs;}
49 TObjArray *GetDACArray() const {return fArray;}
50 THashList * GetDACnameList() const {return fDACnames;}
52 TArrayI GetDACscanParams() const; // retrieves per each DAC the range and the step used in the scan
53 AliITSOnlineSPDfoInfo * GetFOscanInfo() const {return fInfo;}
54 Int_t *GetDACvalues(TString s, const Int_t ndacs) const; // translates the string in the corresponding DACS // the user has to delete the pointer after use!
55 Double_t *GetDACvaluesD(TString s, const Int_t ndacs) const; // translates the string in the corresponding DACS
63 AliITSOnlineSPDfoInfo *fInfo;
65 TObjArray *fArray; // array of the 10 chips in the 6 HS per DAC set
66 Double_t fCheckIndex; // check array index (to speed up)
68 TString fInitialConfiguration;
71 AliITSOnlineSPDfo& operator= (const AliITSOnlineSPDfo& c);
73 ClassDef(AliITSOnlineSPDfo,1)