1 #ifndef ALIITSDCSANALYZERSDD_H
2 #define ALIITSDCSANALYZERSDD_H
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////
10 // Class for SDD dcs data analysis called by AliITSPreprocessorSDD //
11 // Origin: F.Prino, Torino, prino@to.infn.it //
12 // V.Pospisil, CTU Prague, gdermog@seznam.cz //
13 ///////////////////////////////////////////////////////////////////////
16 #include <TObjArray.h>
18 #include "AliITSDCSDataSDD.h"
19 #include "AliITSgeomTGeo.h"
21 class AliITSDCSAnalyzerSDD : public TObject
25 AliITSDCSAnalyzerSDD();
26 ~AliITSDCSAnalyzerSDD();
29 void SetVoltageDelays( Int_t HVDelay, Int_t MVDelay ) { fHVDelay = HVDelay; fMVDelay = MVDelay; }
30 void SetTemperatureDelays( Int_t TLDelay, Int_t TRDelay ) { fTLDelay = TLDelay; fTRDelay = TRDelay; }
31 void SetStatusDelays( Int_t StTLDelay, Int_t StTRDelay, Int_t OKDelay )
32 { fStTLDelay = StTLDelay; fStTRDelay = StTRDelay; fOKDelay = OKDelay; }
33 // There is some delay between variable readout and setting up the time stamp. Delays differs
34 // in voltage and temperature readouts. So it is necessary to substract some value from time stamps
35 // during the data processing
37 void SetHVThreshold( Float_t percent=0.1 ) { fHVThresholdFrac = percent / 100.0; };
38 void SetMVThreshold( Float_t percent=0.1 ) { fMVThresholdFrac = percent / 100.0; };
39 void SetTLThreshold( Float_t percent=0.1 ) { fTLThresholdFrac = percent / 100.0; };
40 void SetTRThreshold( Float_t percent=0.1 ) { fTRThresholdFrac = percent / 100.0; };
41 // It is possible to keep value arrays condensed - new value is stored
42 // only if it crosses a treshold. This threshold is determined from
43 // last stored value by
45 // low edge = value * (100 - percent) %
46 // upper edge = value * (100 + percent) %
48 // These four Setters allows to tune tresholds for each DCS variable
49 // independently. By default all tresholds are set to 0 % .
52 void AnalyzeData( TMap* dcsMap );
55 void PrintDCSDPNames( FILE *output = stdout );
56 // Prints module identifications in text mode
58 AliITSDCSDataSDD* GetDCSData( Int_t iModule ) const { return fDCSData[iModule]; }
59 // Returns data for module specified by its index in range 0..259
61 AliITSDCSDataSDD* GetDCSData( Int_t iLayer, Int_t iLadder, Int_t iModule ) const
62 { return fDCSData[AliITSgeomTGeo::GetModuleIndex( iLayer, iLadder, iModule ) - 240]; }
63 // Returns data for module specified by layer[3..4], ladder[1..22] and module number[1..8]
65 void Export( char *outputDCSFileName );
66 // Exports all stored AliITSDCSDataSDD type object into specified root file. Objects are named as
68 // DCSDataSDD_module<number>
70 // where <number> is in range 0..256 and it is obtained by calling
72 // AliITSgeomTGeo::GetModuleIndex( layer, ladder, moduleInLadder ) - 240
75 AliITSDCSAnalyzerSDD(const AliITSDCSAnalyzerSDD& /* dcsa */);
76 AliITSDCSAnalyzerSDD& operator=(const AliITSDCSAnalyzerSDD& /* dcsa */);
77 // Copy constructor and assignment operator not allowed.
78 // They are protected to avoid misuse
80 void Init(); // Creates module text identifications
88 kNmodLad4=8 }; // Basic SDD geometry
90 TString fHVDPNames[kNmodules]; // DCS DP names for High Voltage
91 TString fMVDPNames[kNmodules]; // DCS DP names for Medium Voltage
92 TString fOKDPNames[kNmodules]; // DCS DP names for Medium Voltage
93 TString fTLDPNames[kNmodules]; // DCS DP names for Temperature Left
94 TString fTRDPNames[kNmodules]; // DCS DP names for Temperature Right
95 TString fTLStDPNames[kNmodules]; // DCS DP names for status of Temperature Left
96 TString fTRStDPNames[kNmodules]; // DCS DP names for status of Temperature Right
97 AliITSDCSDataSDD *fDCSData[kNmodules]; // values of DCS data points
99 Int_t fHVDelay; // There is some delay between variable readout
100 Int_t fMVDelay; // and setting up the time stamp. Delays differs
101 Int_t fTLDelay; // in voltage and temperature readouts. So it is
102 Int_t fTRDelay; // necessary to substract some value from time stamp
103 Int_t fStTLDelay; // during the data processing.
104 Int_t fStTRDelay; // Here are the values of delays stored
105 Int_t fOKDelay; // for the 7 variables.
107 Float_t fHVThresholdFrac; // Value of HV won't be stored until it won't exceeds this fraction of last stored value
108 Float_t fMVThresholdFrac; // Same for MV
109 Float_t fTLThresholdFrac; // Same for TL
110 Float_t fTRThresholdFrac; // Same for TR
112 ClassDef(AliITSDCSAnalyzerSDD, 3);
114 }; /*class AliITSDCSAnalyzerSDD*/