]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/ITSbase/AliITSDCSAnalyzerSDD.h
RAW + ROOT map including ROOT libs
[u/mrichter/AliRoot.git] / ITS / ITSbase / AliITSDCSAnalyzerSDD.h
1 #ifndef ALIITSDCSANALYZERSDD_H
2 #define ALIITSDCSANALYZERSDD_H
3
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
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 ///////////////////////////////////////////////////////////////////////
14
15 #include <TMap.h>
16 #include <TObjArray.h>
17 #include <TFile.h>
18 #include "AliITSDCSDataSDD.h"
19 #include "AliITSgeomTGeo.h"
20
21 class AliITSDCSAnalyzerSDD : public TObject 
22 {
23
24  public:
25   AliITSDCSAnalyzerSDD();
26   ~AliITSDCSAnalyzerSDD();
27
28
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 
36
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
44                         //
45                         //  low edge = value * (100 - percent) %
46                         //  upper edge = value * (100 + percent) %
47                         //
48                         // These four Setters allows to tune tresholds for each DCS variable
49                         //   independently. By default all tresholds are set to 0 % .
50
51
52   void AnalyzeData( TMap* dcsMap );
53                         // Processes the data
54
55   void PrintDCSDPNames( FILE *output = stdout );
56                         // Prints module identifications in text mode
57
58   AliITSDCSDataSDD* GetDCSData( Int_t iModule ) const { return fDCSData[iModule]; }
59                         // Returns data for module specified by its index in range 0..259
60
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]
64
65   void Export( char *outputDCSFileName );
66                         // Exports all stored AliITSDCSDataSDD type object into specified root file. Objects are named as
67                         //
68                         // DCSDataSDD_module<number>
69                         //
70                         // where <number> is in range 0..256 and it is obtained by calling
71                         //
72                         // AliITSgeomTGeo::GetModuleIndex( layer, ladder, moduleInLadder ) - 240
73
74  protected:
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
79
80   void Init();          // Creates module text identifications
81
82  private:
83
84   enum { kNmodules=260,
85          kNladders3=14,
86          kNladders4=22,
87          kNmodLad3=6,
88          kNmodLad4=8 };                   // Basic SDD geometry
89
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
98
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.
106
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
111
112   ClassDef(AliITSDCSAnalyzerSDD, 3);
113
114 }; /*class AliITSDCSAnalyzerSDD*/
115
116 #endif