Coverity fix
[u/mrichter/AliRoot.git] / TRD / TRDbase / AliTRDCalDCSFEEv2.h
1 #ifndef ALITRDCALDCSFEEV2_H
2 #define ALITRDCALDCSFEEV2_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDCalDCSFEEv2.h 18952 2007-06-08 11:36:12Z cblume $ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 //  TRD calibration class for FEE configuration parameters                   //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "TObject.h"
15 #include "TString.h"
16
17 //class TString;
18
19 class AliTRDCalDCSFEEv2 : public TObject {
20
21  public:
22
23   AliTRDCalDCSFEEv2();
24   AliTRDCalDCSFEEv2(const AliTRDCalDCSFEEv2 &c);
25   virtual ~AliTRDCalDCSFEEv2() { };
26   AliTRDCalDCSFEEv2 &operator=(const AliTRDCalDCSFEEv2 &c);
27
28   void    SetStatusBit(Int_t stbit)                  { fStatusBit           = (Char_t)stbit;        }
29   void    SetDCSid(Int_t dcsid)                      { fDCSID               = (Short_t)dcsid;       }
30   void    SetSM(Int_t smid)                          { fSM                  = (Char_t)smid;         }
31   void    SetStack(Int_t stid)                       { fStack               = (Char_t)stid;         }
32   void    SetLayer(Int_t lyid)                       { fLayer               = (Char_t)lyid;         }
33   void    SetNumberOfTimeBins(Int_t value)           { fNumberOfTimeBins    = (Short_t)value;       }
34   void    SetConfigTag(Int_t cfgt)                   { fConfigTag           = (Short_t)cfgt;        }
35   void    SetSingleHitThres(Int_t sht)               { fSingleHitThres      = (Short_t)sht;         }
36   void    SetThreePadClustThres(Int_t tpct)          { fThrPdClsThres       = (Short_t)tpct;        }
37   void    SetSelectiveNoZS(Int_t snzs)               { fSelNoZS             = (Short_t)snzs;        }
38   void    SetFastStatNoise(Int_t fstn)               { fFastStatNoise       = (Short_t)fstn;        }
39   void    SetTCFilterWeight(Int_t tcfw)              { fTCFilterWeight      = (Short_t)tcfw;        }
40   void    SetTCFilterShortDecPar(Int_t sdp)          { fTCFilterShortDecPar = (Short_t)sdp;         }
41   void    SetTCFilterLongDecPar(Int_t ldp)           { fTCFilterLongDecPar  = (Short_t)ldp;         }
42   void    SetGainTableRocSerial(Int_t gts)           { fGainTableRocSerial  = (UChar_t)gts;         }
43   void    SetFilterType(TString fity)                { fFilterType          = fity;                 }
44   void    SetReadoutParam(TString rpar)              { fReadoutParam        = rpar;                 }
45   void    SetTestPattern(TString tpat)               { fTestPattern         = tpat;                 }
46   void    SetTrackletMode(TString tmde)              { fTrackletMode        = tmde;                 }
47   void    SetTrackletDef(TString tdef)               { fTrackletDef         = tdef;                 }
48   void    SetTriggerSetup(TString trse)              { fTriggerSetup        = trse;                 }
49   void    SetAddOptions(TString adop)                { fAddOptions          = adop;                 }
50   void    SetConfigName(TString cfgn)                { fConfigName          = cfgn;                 }
51   void    SetConfigVersion(TString cfgv)             { fConfigVersion       = cfgv;                 }
52   void    SetGainTableName(TString gt)               { fGainTableName       = gt;                   }
53   void    SetGainTableDesc(TString gd)               { fGainTableDesc       = gd;                   }
54   void    SetGainTableRocType(TString gr)            { fGainTableRocType    = gr;                   }
55   void    SetMCMGlobalState(Int_t r,Int_t m,Int_t g) { fRStateGSM[r][m]     = (Char_t)g;            }
56   void    SetMCMStateNI(Int_t r,Int_t m,Int_t v)     { fRStateNI[r][m]      = (Char_t)v;            }
57   void    SetMCMEventCnt(Int_t r,Int_t m,Int_t v)    { fRStateEV[r][m]      = v;                    }
58   void    SetMCMPtCnt(Int_t r,Int_t m,Int_t v)       { fRStatePTRG[r][m]    = v;                    }
59   void    SetGainTableAdcdac(Int_t r,Int_t m,Int_t v){ fGainTableAdcdac[r][m]         = (Char_t)v;  }
60   void    SetGainTableFgfn(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgfn[r][m][a] = (Short_t)v; }
61   void    SetGainTableFgan(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgan[r][m][a] = (Char_t)v;  }
62
63   Int_t   GetStatusBit() const                       { return (Int_t)fStatusBit;                    }
64   Int_t   GetDCSid() const                           { return (Int_t)fDCSID;                        }
65   Int_t   GetSM() const                              { return (Int_t)fSM;                           }
66   Int_t   GetStack() const                           { return (Int_t)fStack;                        }
67   Int_t   GetLayer() const                           { return (Int_t)fLayer;                        }
68   Int_t   GetNumberOfTimeBins() const                { return (Int_t)fNumberOfTimeBins;             }
69   Int_t   GetConfigTag() const                       { return (Int_t)fConfigTag;                    }
70   Int_t   GetSingleHitThres() const                  { return (Int_t)fSingleHitThres;               }
71   Int_t   GetThreePadClustThres() const              { return (Int_t)fThrPdClsThres;                }
72   Int_t   GetSelectiveNoZS() const                   { return (Int_t)fSelNoZS;                      }
73   Int_t   GetTCFilterWeight() const                  { return (Int_t)fTCFilterWeight;               }
74   Int_t   GetTCFilterShortDecPar() const             { return (Int_t)fTCFilterShortDecPar;          }
75   Int_t   GetTCFilterLongDecPar() const              { return (Int_t)fTCFilterLongDecPar;           }
76   Int_t   GetFastStatNoise() const                   { return (Int_t)fFastStatNoise;                }
77   Int_t   GetGainTableRocSerial() const              { return (Int_t)fGainTableRocSerial;           }
78   TString GetFilterType() const                      { return fFilterType;                          }
79   TString GetReadoutParam() const                    { return fReadoutParam;                        }
80   TString GetTestPattern() const                     { return fTestPattern;                         }
81   TString GetTrackletMode() const                    { return fTrackletMode;                        }
82   TString GetTrackletDef() const                     { return fTrackletDef;                         }
83   TString GetTriggerSetup() const                    { return fTriggerSetup;                        }
84   TString GetAddOptions() const                      { return fAddOptions;                          }
85   TString GetConfigName() const                      { return fConfigName;                          }
86   TString GetConfigVersion() const                   { return fConfigVersion;                       }
87   TString GetGainTableName() const                   { return fGainTableName;                       }
88   TString GetGainTableDesc() const                   { return fGainTableDesc;                       }
89   TString GetGainTableRocType() const                { return fGainTableRocType;                    }
90   Int_t   GetMCMGlobalState(Int_t r,Int_t m) const   { return (Char_t)fRStateGSM[r][m];             }
91   Int_t   GetMCMStateNI(Int_t r,Int_t m) const       { return (Char_t)fRStateNI[r][m];              }
92   Int_t   GetMCMEventCnt(Int_t r,Int_t m) const      { return fRStateEV[r][m];                      }
93   Int_t   GetMCMPtCnt(Int_t r,Int_t m) const         { return fRStatePTRG[r][m];                    }
94   Int_t   GetGainTableAdcdac(Int_t r,Int_t m) const  { return (Int_t)fGainTableAdcdac[r][m];        }
95   Int_t   GetGainTableFgfn(Int_t r,Int_t m,Int_t a) const  { return (Int_t)fGainTableFgfn[r][m][a]; }
96   Int_t   GetGainTableFgan(Int_t r,Int_t m,Int_t a) const  { return (Int_t)fGainTableFgan[r][m][a]; }
97
98  protected:
99
100   static const Char_t fgkROB = 8;       // Number of readout boards
101   static const Char_t fgkMCM = 18;      // Number of MCMs
102   static const Char_t fgkADC = 21;      // Number of ADC channels
103   
104   Char_t   fStatusBit;                  // 0 if everything is OK, otherwise !=0 (see impl. file)
105   Char_t   fSM;                         // the number of the supermode 0..17
106   Char_t   fStack;                      // the number of the stack 0..4
107   Char_t   fLayer;                      // the number of the layer 0..5
108   Char_t   fGainTableFgan[(Int_t)fgkROB][(Int_t)fgkMCM][(Int_t)fgkADC]; // array of gain table fgan values
109   Char_t   fGainTableAdcdac[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of gain table adcdac values
110   Char_t   fRStateGSM[(Int_t)fgkROB][(Int_t)fgkMCM];  // array of the global states of the MCMs
111   Char_t   fRStateNI[(Int_t)fgkROB][(Int_t)fgkMCM];   // array of the network interface states of the MCMs
112   UChar_t  fGainTableRocSerial;         // the roc serial of the chamber from the gain table
113   Short_t  fDCSID;                      // ID of the DCS-Board
114   Short_t  fNumberOfTimeBins;           // Number of timebins  
115   Short_t  fConfigTag;                  // Configuration tag
116   Short_t  fSingleHitThres;             // threshold of single hits (arg of readout param)
117   Short_t  fThrPdClsThres;              // threshold of 3-pad clusters (arg of readout param)
118   Short_t  fSelNoZS;                    // write every fSelNoZS'th event without ZS
119   Short_t  fTCFilterWeight;             // tail cancellation filter weight
120   Short_t  fTCFilterShortDecPar;        // tail cancellation filter short decay parameter
121   Short_t  fTCFilterLongDecPar;         // tail cancellation filter long decay parameter
122   Short_t  fFastStatNoise;              // collect statistics for fast noise mode
123   Short_t  fGainTableFgfn[(Int_t)fgkROB][(Int_t)fgkMCM][(Int_t)fgkADC]; // array of gain table fgfn values
124   Int_t    fRStateEV[(Int_t)fgkROB][(Int_t)fgkMCM];   // array of the event counters of the MCMs
125   Int_t    fRStatePTRG[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of the pretrigger counters of the MCMs
126   TString  fGainTableRocType;           // the roc type from the gain table
127   TString  fFilterType;                 // filter type (p, pgt, nf)
128   TString  fReadoutParam;               // readout parameter (zs, nozs, testpattern)
129   TString  fTestPattern;                // value of testpattern (for readout param)
130   TString  fTrackletMode;               // tracklet mode (trk, csmtrk, notrk)
131   TString  fTrackletDef;                // definition for tracklet mode trk
132   TString  fTriggerSetup;               // trigger setup (ptrg, autotrg, autol0)
133   TString  fAddOptions;                 // additional options (nopm, nion)
134   TString  fConfigName;                 // Configuration name
135   TString  fConfigVersion;              // Configuration version
136   TString  fGainTableName;              // the name of the gain table
137   TString  fGainTableDesc;              // the description of the gain table
138
139   ClassDef(AliTRDCalDCSFEEv2,2)          // TRD calibration class for TRD FEE parameters
140 };
141 #endif