]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalDCS.cxx
Include informations from rstate module
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalDCS.cxx
CommitLineData
54c3cb53 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id: AliTRDCalDCS.cxx 18952 2007-06-08 11:36:12Z cblume $ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// TRD calibration class for TRD DCS parameters //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliTRDCalDCS.h"
1b2ec594 25#include "AliTRDCalDCSFEE.h"
54c3cb53 26
27ClassImp(AliTRDCalDCS)
1b2ec594 28
54c3cb53 29//_____________________________________________________________________________
30AliTRDCalDCS::AliTRDCalDCS()
31 :TNamed()
1b2ec594 32 ,fGNumberOfTimeBins(-1)
33 ,fGConfigTag(-1)
34 ,fGSingleHitThres(-1)
35 ,fGThreePadClustThres(-1)
36 ,fGSelNoZS(-1)
37 ,fGTCFilterWeight(-1)
38 ,fGTCFilterShortDecPar(-1)
39 ,fGTCFilterLongDecPar(-1)
40 ,fGFastStatNoise(-1)
41 ,fGConfigVersion(0)
42 ,fGConfigName(0)
43 ,fGFilterType(0)
44 ,fGReadoutParam(0)
45 ,fGTestPattern(0)
46 ,fGTrackletMode(0)
47 ,fGTrackletDef(0)
48 ,fGTriggerSetup(0)
49 ,fGAddOptions(0)
54c3cb53 50 ,fFEEArr(new TObjArray(540))
51 ,fPTRArr(new TObjArray(6))
52 ,fGTUArr(new TObjArray(19))
53{
54 //
55 // AliTRDCalDCS default constructor
56 //
57}
58
59//_____________________________________________________________________________
60AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
61 :TNamed(name,title)
1b2ec594 62 ,fGNumberOfTimeBins(-1)
63 ,fGConfigTag(-1)
64 ,fGSingleHitThres(-1)
65 ,fGThreePadClustThres(-1)
66 ,fGSelNoZS(-1)
67 ,fGTCFilterWeight(-1)
68 ,fGTCFilterShortDecPar(-1)
69 ,fGTCFilterLongDecPar(-1)
70 ,fGFastStatNoise(-1)
71 ,fGConfigVersion(0)
72 ,fGConfigName(0)
73 ,fGFilterType(0)
74 ,fGReadoutParam(0)
75 ,fGTestPattern(0)
76 ,fGTrackletMode(0)
77 ,fGTrackletDef(0)
78 ,fGTriggerSetup(0)
79 ,fGAddOptions(0)
54c3cb53 80 ,fFEEArr(new TObjArray(540))
81 ,fPTRArr(new TObjArray(6))
82 ,fGTUArr(new TObjArray(19))
83{
84 //
85 // AliTRDCalDCS constructor
86 //
87}
88
89//_____________________________________________________________________________
90AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
91 :TNamed(cd)
1b2ec594 92 ,fGNumberOfTimeBins(-1)
93 ,fGConfigTag(-1)
94 ,fGSingleHitThres(-1)
95 ,fGThreePadClustThres(-1)
96 ,fGSelNoZS(-1)
97 ,fGTCFilterWeight(-1)
98 ,fGTCFilterShortDecPar(-1)
99 ,fGTCFilterLongDecPar(-1)
100 ,fGFastStatNoise(-1)
101 ,fGConfigVersion(0)
102 ,fGConfigName(0)
103 ,fGFilterType(0)
104 ,fGReadoutParam(0)
105 ,fGTestPattern(0)
106 ,fGTrackletMode(0)
107 ,fGTrackletDef(0)
108 ,fGTriggerSetup(0)
109 ,fGAddOptions(0)
54c3cb53 110 ,fFEEArr(0)
111 ,fPTRArr(0)
112 ,fGTUArr(0)
113{
114 //
115 // AliTRDCalDCS copy constructor
116 //
117}
118
119//_____________________________________________________________________________
120AliTRDCalDCS &AliTRDCalDCS::operator=(const AliTRDCalDCS &cd)
121{
122 //
123 // Assignment operator
124 //
125 if (&cd == this) return *this;
126
127 new (this) AliTRDCalDCS(cd);
128 return *this;
129}
130
1b2ec594 131//_____________________________________________________________________________
132void AliTRDCalDCS::EvaluateGlobalParameters()
133{
134 for(Int_t i=0; i<540; i++) {
135 AliTRDCalDCSFEE *iDCSFEEObj;
136 iDCSFEEObj = GetCalDCSFEEObj(i);
137 if(iDCSFEEObj != NULL) {
138 if(iDCSFEEObj->GetStatusBit() == 0) {
139 // first, set the parameters of the first good ROC as global
140 fGNumberOfTimeBins = iDCSFEEObj->GetNumberOfTimeBins();
141 fGConfigTag = iDCSFEEObj->GetConfigTag();
142 fGSingleHitThres = iDCSFEEObj->GetSingleHitThres();
143 fGThreePadClustThres = iDCSFEEObj->GetThreePadClustThres();
144 fGSelNoZS = iDCSFEEObj->GetSelectiveNoZS();
145 fGTCFilterWeight = iDCSFEEObj->GetTCFilterWeight();
146 fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
147 fGTCFilterLongDecPar = iDCSFEEObj->GetTCFilterLongDecPar();
148 fGFastStatNoise = iDCSFEEObj->GetFastStatNoise();
149 fGConfigVersion = iDCSFEEObj->GetConfigVersion();
150 fGConfigName = iDCSFEEObj->GetConfigName();
151 fGFilterType = iDCSFEEObj->GetFilterType();
152 fGReadoutParam = iDCSFEEObj->GetReadoutParam();
153 fGTestPattern = iDCSFEEObj->GetTestPattern();
154 fGTrackletMode = iDCSFEEObj->GetTrackletMode();
155 fGTrackletDef = iDCSFEEObj->GetTrackletDef();
156 fGTriggerSetup = iDCSFEEObj->GetTriggerSetup();
157 fGAddOptions = iDCSFEEObj->GetAddOptions();
158 break;
159 }
160 }
161 }
162
163 for(Int_t i=0; i<540; i++) {
164 AliTRDCalDCSFEE *iDCSFEEObj;
165 iDCSFEEObj = GetCalDCSFEEObj(i);
166 if(iDCSFEEObj != NULL) {
167 if(iDCSFEEObj->GetStatusBit() == 0) {
168 // second, if any of the other good chambers differ, set the global value to -1/""
169 if(fGNumberOfTimeBins != iDCSFEEObj->GetNumberOfTimeBins()) fGNumberOfTimeBins = -2;
170 if(fGConfigTag != iDCSFEEObj->GetConfigTag()) fGConfigTag = -2;
171 if(fGSingleHitThres != iDCSFEEObj->GetSingleHitThres()) fGSingleHitThres = -2;
172 if(fGThreePadClustThres != iDCSFEEObj->GetThreePadClustThres()) fGThreePadClustThres = -2;
173 if(fGSelNoZS != iDCSFEEObj->GetSelectiveNoZS()) fGSelNoZS = -2;
174 if(fGTCFilterWeight != iDCSFEEObj->GetTCFilterWeight()) fGTCFilterWeight = -2;
175 if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
176 if(fGTCFilterLongDecPar != iDCSFEEObj->GetTCFilterLongDecPar()) fGTCFilterLongDecPar = -2;
177 if(fGFastStatNoise != iDCSFEEObj->GetFastStatNoise()) fGFastStatNoise = -2;
178 if(fGConfigVersion != iDCSFEEObj->GetConfigVersion()) fGConfigVersion = "mixed";
179 if(fGConfigName != iDCSFEEObj->GetConfigName()) fGConfigName = "mixed";
180 if(fGFilterType != iDCSFEEObj->GetFilterType()) fGFilterType = "mixed";
181 if(fGReadoutParam != iDCSFEEObj->GetReadoutParam()) fGReadoutParam = "mixed";
182 if(fGTestPattern != iDCSFEEObj->GetTestPattern()) fGTestPattern = "mixed";
183 if(fGTrackletMode != iDCSFEEObj->GetTrackletMode()) fGTrackletMode = "mixed";
184 if(fGTrackletDef != iDCSFEEObj->GetTrackletDef()) fGTrackletDef = "mixed";
185 if(fGTriggerSetup != iDCSFEEObj->GetTriggerSetup()) fGTriggerSetup = "mixed";
186 if(fGAddOptions != iDCSFEEObj->GetAddOptions()) fGAddOptions = "mixed";
187 }
188 }
189 }
190}
191