temporary fix of bug from Savannah report 54512
[u/mrichter/AliRoot.git] / T0 / AliT0DataDCS.cxx
CommitLineData
9dcc11e4 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 *
8eb4ac75 10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
9dcc11e4 12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log: AliT0DataDCS.cxx,v $
18 Revision 2008/01/30
19Fetching data points from DCS, calculating mean and storing data to Reference DB
20
21 Version 1.1 2006/10
22Preliminary test version (T.Malkiewicz)
23*/
24
dc7ca31d 25#include "AliT0DataDCS.h"
26
27#include "AliCDBMetaData.h"
28#include "AliDCSValue.h"
29#include "AliLog.h"
30
31#include <TTimeStamp.h>
32#include <TObjString.h>
33#include <TH2F.h>
34#include <TProfile.h>
35#include <TGraph.h>
36#include <TDatime.h>
37#include <TStyle.h>
38#include <TCanvas.h>
39
9dcc11e4 40// AliT0DataDCS class
41// declaring DCS aliases for T0
42// fetching T0 data points from DCS,
43// calculating mean values for the entire run
44// and storing the result to Reference DB
45
dc7ca31d 46ClassImp(AliT0DataDCS)
47
48//---------------------------------------------------------------
49AliT0DataDCS::AliT0DataDCS():
50 TObject(),
9dcc11e4 51 fRun(0),
dc7ca31d 52 fStartTime(0),
53 fEndTime(0),
8eb4ac75 54 fStartTimeDCSQuery(0),
55 fEndTimeDCSQuery(0),
56 fAtten(0.),
955ef7d2 57 fMPDcentA(0),
58 fMPDcentC(0),
59 fMPDsemiCentA(0),
60 fMPDsemiCentC(0),
61 fTVDCtop(0),
62 fTVDCbottom(0),
63 fMPDmode(0),
dc7ca31d 64 fIsProcessed(kFALSE)
65{
8eb4ac75 66 for(Int_t i=0;i<kScalers;i++)
67 {
68 fScalerMean[i]=0.;
69 fScalerSecMean[i]=0.;
70 }
71 for(Int_t i=0;i<kHV;i++)
72 {
73 fHViA[i]=0.;
74 fHVvA[i]=0.;
75 fHViC[i]=0.;
76 fHVvC[i]=0.;
77 }
78 for(Int_t i=0;i<kLV;i++)
79 {
80 fLViA[i]=0.;
81 fLVvA[i]=0.;
82 fLViC[i]=0.;
83 fLVvC[i]=0.;
84 }
85 for(Int_t i=0;i<kTRM;i++)
86 {
87 fTRM[i]=0.;
88 }
89 for(Int_t i=0;i<kDRM;i++)
90 {
91 fDRM[i]=0.;
92 }
dc7ca31d 93
8eb4ac75 94}
dc7ca31d 95//---------------------------------------------------------------
8eb4ac75 96AliT0DataDCS::AliT0DataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime, UInt_t startTimeDCSQuery, UInt_t endTimeDCSQuery):
dc7ca31d 97 TObject(),
98 fRun(nRun),
99 fStartTime(startTime),
100 fEndTime(endTime),
8eb4ac75 101 fStartTimeDCSQuery(startTimeDCSQuery),
102 fEndTimeDCSQuery(endTimeDCSQuery),
103 fAtten(0.),
955ef7d2 104 fMPDcentA(0),
105 fMPDcentC(0),
106 fMPDsemiCentA(0),
107 fMPDsemiCentC(0),
108 fTVDCtop(0),
109 fTVDCbottom(0),
110 fMPDmode(0),
dc7ca31d 111 fIsProcessed(kFALSE)
112{
8eb4ac75 113 for(Int_t i=0;i<kScalers;i++)
114 {
115 fScalerMean[i]=0.;
116 fScalerSecMean[i]=0.;
117 }
118 for(Int_t i=0;i<kHV;i++)
119 {
120 fHViA[i]=0.;
121 fHVvA[i]=0.;
122 fHViC[i]=0.;
123 fHVvC[i]=0.;
124 }
125 for(Int_t i=0;i<kLV;i++)
126 {
127 fLViA[i]=0.;
128 fLVvA[i]=0.;
129 fLViC[i]=0.;
130 fLVvC[i]=0.;
131 }
132 for(Int_t i=0;i<kTRM;i++)
133 {
134 fTRM[i]=0.;
135 }
136 for(Int_t i=0;i<kDRM;i++)
137 {
138 fDRM[i]=0.;
139 }
140
141 AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s \n\tStartTime DCS Query %s \n\tEndTime DCS Query %s", nRun,
dc7ca31d 142 TTimeStamp(startTime).AsString(),
8eb4ac75 143 TTimeStamp(endTime).AsString(),
144 TTimeStamp(startTimeDCSQuery).AsString(),
145 TTimeStamp(endTimeDCSQuery).AsString()));
dc7ca31d 146
dc7ca31d 147 Init();
148
149}
8eb4ac75 150//---------------------------------------------------------------
151
152AliT0DataDCS::AliT0DataDCS(const AliT0DataDCS & data):
153 TObject(),
154 fRun(0),
155 fStartTime(0),
156 fEndTime(0),
157 fStartTimeDCSQuery(0),
158 fEndTimeDCSQuery(0),
159 fAtten(0.),
955ef7d2 160 fMPDcentA(0),
161 fMPDcentC(0),
162 fMPDsemiCentA(0),
163 fMPDsemiCentC(0),
164 fTVDCtop(0),
165 fTVDCbottom(0),
166 fMPDmode(0),
8eb4ac75 167 fIsProcessed(kFALSE)
168{
169
170// copy constructor
dc7ca31d 171
8eb4ac75 172 fRun=data.fRun;
173 fStartTime=data.fStartTime;
174 fEndTime=data.fEndTime;
175 fStartTimeDCSQuery=data.fStartTimeDCSQuery;
176 fEndTimeDCSQuery=data.fEndTimeDCSQuery;
177 fIsProcessed=data.fIsProcessed;
178 fAtten=data.fAtten;
955ef7d2 179 fMPDcentA=data.fMPDcentA;
180 fMPDcentC=data.fMPDcentC;
181 fMPDsemiCentA=data.fMPDsemiCentA;
182 fMPDsemiCentC=data.fMPDsemiCentC;
183 fTVDCtop=data.fTVDCtop;
184 fTVDCbottom=data.fTVDCbottom;
185 fMPDmode=data.fMPDmode;
8eb4ac75 186 for(int i=0;i<kNAliases;i++)
187 {
188 fAliasNames[i]=data.fAliasNames[i];
189 }
190
191 for(Int_t i=0;i<kScalers;i++)
192 {
193 fScalerMean[i]=data.fScalerMean[i];
194 fScalerSecMean[i]=data.fScalerSecMean[i];
195 }
196 for(Int_t i=0;i<kHV;i++)
197 {
198 fHViA[i]=data.fHViA[i];
199 fHVvA[i]=data.fHVvA[i];
200 fHViC[i]=data.fHViC[i];
201 fHVvC[i]=data.fHVvC[i];
202 }
203 for(Int_t i=0;i<kLV;i++)
204 {
205 fLViA[i]=data.fLViA[i];
206 fLVvA[i]=data.fLVvA[i];
207 fLViC[i]=data.fLViC[i];
208 fLVvC[i]=data.fLVvC[i];
209 }
210 for(Int_t i=0;i<kTRM;i++)
211 {
212 fTRM[i]=data.fTRM[i];
213 }
214 for(Int_t i=0;i<kDRM;i++)
215 {
216 fDRM[i]=data.fDRM[i];
217 }
218}
dc7ca31d 219//---------------------------------------------------------------
dc7ca31d 220
8eb4ac75 221AliT0DataDCS& AliT0DataDCS:: operator=(const AliT0DataDCS & data) {
222
223// assignment operator
224
225 this->fRun=data.fRun;
226 this->fStartTime=data.fStartTime;
227 this->fEndTime=data.fEndTime;
228 this->fStartTimeDCSQuery=data.fStartTimeDCSQuery;
229 this->fEndTimeDCSQuery=data.fEndTimeDCSQuery;
230
231 for(int i=0;i<kNAliases;i++)
232 {
233 this->fAliasNames[i]=data.fAliasNames[i];
234 }
235
236 return *this;
237}
238
239//---------------------------------------------------------------
240AliT0DataDCS::~AliT0DataDCS()
241{
dc7ca31d 242}
243
244//---------------------------------------------------------------
91366e58 245Bool_t AliT0DataDCS::ProcessData(TMap& aliasMap)
246{
8eb4ac75 247 Int_t t0_scaler[kScalers];
248 Int_t t0_scaler_sec[kScalers];
249 Int_t aliasEntr[kNAliases];
250 Float_t t0_a_hv_imon[kHV];
251 Float_t t0_a_hv_vmon[kHV];
252 Float_t t0_a_lv_imon[kLV];
253 Float_t t0_a_lv_vmon[kLV];
254 Float_t t0_c_hv_imon[kHV];
255 Float_t t0_c_hv_vmon[kHV];
256 Float_t t0_c_lv_imon[kLV];
257 Float_t t0_c_lv_vmon[kLV];
258 Float_t t0_a_cfd_thre[kCFD];
259 Float_t t0_a_cfd_walk[kCFD];
260 Float_t t0_c_cfd_thre[kCFD];
261 Float_t t0_c_cfd_walk[kCFD];
262 Float_t t0_ac_trm[kTRM];
263 Float_t t0_ac_drm[kDRM];
264 Float_t t0_atten=0.;
955ef7d2 265 Int_t t0_MPDcentA=0;
266 Int_t t0_MPDcentC=0;
267 Int_t t0_MPDsemiCentA=0;
268 Int_t t0_MPDsemiCentC=0;
269 Int_t t0_TVDCtop=0;
270 Int_t t0_TVDCbottom=0;
271 Int_t t0_MPDmode=0;
272
970bb0d0 273 TObjArray *aliasArr;
8eb4ac75 274 for(Int_t k=0; k<kScalers; k++)
275 {
276 t0_scaler[k]=0;
277 t0_scaler_sec[k]=0;
278 }
279
280 for(Int_t k=0; k<kHV; k++)
281 {
282 t0_a_hv_imon[k]=0.;
283 t0_a_hv_vmon[k]=0.;
284 t0_c_hv_imon[k]=0.;
285 t0_c_hv_vmon[k]=0.;
286 }
287 for(Int_t k=0; k<kHV; k++)
288 {
289 t0_a_lv_imon[k]=0.;
290 t0_a_lv_vmon[k]=0.;
291 t0_c_lv_imon[k]=0.;
292 t0_c_lv_vmon[k]=0.;
293 }
294 for(Int_t k=0; k<kCFD; k++)
295 {
296 t0_a_cfd_thre[k]=0.;
297 t0_a_cfd_walk[k]=0.;
298 t0_c_cfd_thre[k]=0.;
299 t0_c_cfd_walk[k]=0.;
300 }
301 for(Int_t k=0; k<kTRM; k++)
302 {
303 t0_ac_trm[k]=0.;
304 }
305 for(Int_t k=0; k<kDRM; k++)
306 {
307 t0_ac_drm[k]=0.;
308 }
309
310// here starts the main loop
311 for(Int_t j=0; j<kNAliases; j++)
970bb0d0 312 {
8eb4ac75 313 aliasEntr[j]=0;
9dcc11e4 314 for (Int_t k=0;k<32;k++)
315 {
316 t0_scaler[k]=0;
8eb4ac75 317 t0_scaler_sec[k]=0;
318
9dcc11e4 319 }
320 aliasArr = (TObjArray*) aliasMap.GetValue(fAliasNames[j].Data());
970bb0d0 321 if(!aliasArr)
322 {
323 AliError(Form("Alias %s not found!", fAliasNames[j].Data()));
91366e58 324 continue;
970bb0d0 325 }
8eb4ac75 326 Introduce(j, aliasArr);
970bb0d0 327 if(aliasArr->GetEntries()<2)
328 {
329 AliError(Form("Alias %s has just %d entries!",
330 fAliasNames[j].Data(),aliasArr->GetEntries()));
331 continue;
332 }
8eb4ac75 333 if (j < kScalers)
334 {
335 aliasEntr[j] = aliasArr->GetEntries();
336 for(Int_t l=0; l<aliasEntr[j]; l++)
337 {
338 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
339 t0_scaler[j]+= aValue->GetUInt();
340 }
341 fScalerMean[j] = t0_scaler[j] / aliasEntr[j];
342 }
343 else if (j < 2*kScalers)
970bb0d0 344 {
8eb4ac75 345 aliasEntr[j] = aliasArr->GetEntries();
346 for(Int_t l=0; l<aliasEntr[j]; l++)
347 {
348 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 349 t0_scaler_sec[j-kScalers]+= aValue->GetUInt();
8eb4ac75 350 }
19fb06bd 351 fScalerSecMean[j-kScalers] = t0_scaler_sec[j-kScalers] / aliasEntr[j];
8eb4ac75 352 }
353 else if (j < 2*kScalers+kHV)
354 {
355 aliasEntr[j] = aliasArr->GetEntries();
356 for(Int_t l=0; l<aliasEntr[j]; l++)
357 {
358 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 359 t0_a_hv_imon[j-2*kScalers]+= aValue->GetFloat();
8eb4ac75 360 }
19fb06bd 361 fHViA[j-2*kScalers] = t0_a_hv_imon[j-2*kScalers] / aliasEntr[j];
8eb4ac75 362 }
363 else if (j < 2*kScalers+2*kHV)
364 {
365 aliasEntr[j] = aliasArr->GetEntries();
366 for(Int_t l=0; l<aliasEntr[j]; l++)
367 {
368 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 369 t0_a_hv_vmon[j-(2*kScalers+kHV)]+= aValue->GetFloat();
8eb4ac75 370 }
19fb06bd 371 fHVvA[j-(2*kScalers+kHV)] = t0_a_hv_vmon[j-(2*kScalers+kHV)] / aliasEntr[j];
8eb4ac75 372 }
373 else if (j < 2*kScalers+2*kHV+kLV)
374 {
375 aliasEntr[j] = aliasArr->GetEntries();
376 for(Int_t l=0; l<aliasEntr[j]; l++)
377 {
378 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 379 t0_a_lv_imon[j-(2*kScalers+2*kHV)]+= aValue->GetFloat();
8eb4ac75 380 }
19fb06bd 381 fLViA[j-(2*kScalers+2*kHV)] = t0_a_lv_imon[j-(2*kScalers+2*kHV)] / aliasEntr[j];
8eb4ac75 382 }
383 else if (j < 2*kScalers+2*kHV+2*kLV)
384 {
385 aliasEntr[j] = aliasArr->GetEntries();
386 for(Int_t l=0; l<aliasEntr[j]; l++)
387 {
388 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 389 t0_a_lv_vmon[j-(2*kScalers+2*kHV+kLV)]+= aValue->GetFloat();
8eb4ac75 390 }
19fb06bd 391 fLVvA[j-(2*kScalers+2*kHV+kLV)] = t0_a_lv_vmon[j-(2*kScalers+2*kHV+kLV)] / aliasEntr[j];
8eb4ac75 392 }
393 else if (j < 2*kScalers+3*kHV+2*kLV)
394 {
395 aliasEntr[j] = aliasArr->GetEntries();
396 for(Int_t l=0; l<aliasEntr[j]; l++)
397 {
398 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 399 t0_c_hv_imon[j-(2*kScalers+2*kHV+2*kLV)]+= aValue->GetFloat();
8eb4ac75 400 }
19fb06bd 401 fHViC[j-(2*kScalers+2*kHV+2*kLV)] = t0_c_hv_imon[j-(2*kScalers+2*kHV+2*kLV)] / aliasEntr[j];
8eb4ac75 402 }
403 else if (j < 2*kScalers+4*kHV+2*kLV)
404 {
405 aliasEntr[j] = aliasArr->GetEntries();
406 for(Int_t l=0; l<aliasEntr[j]; l++)
407 {
408 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 409 t0_c_hv_vmon[j-(2*kScalers+3*kHV+2*kLV)]+= aValue->GetFloat();
8eb4ac75 410 }
19fb06bd 411 fHVvC[j-(2*kScalers+3*kHV+2*kLV)] = t0_c_hv_vmon[j-(2*kScalers+3*kHV+2*kLV)] / aliasEntr[j];
8eb4ac75 412 }
413 else if (j < 2*kScalers+4*kHV+3*kLV)
414 {
415 aliasEntr[j] = aliasArr->GetEntries();
416 for(Int_t l=0; l<aliasEntr[j]; l++)
417 {
418 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 419 t0_c_lv_imon[j-(2*kScalers+4*kHV+2*kLV)]+= aValue->GetFloat();
8eb4ac75 420 }
19fb06bd 421 fLViC[j-(2*kScalers+4*kHV+2*kLV)] = t0_c_lv_imon[j-(2*kScalers+4*kHV+2*kLV)] / aliasEntr[j];
8eb4ac75 422 }
423 else if (j < 2*kScalers+4*kHV+4*kLV)
424 {
425 aliasEntr[j] = aliasArr->GetEntries();
426 for(Int_t l=0; l<aliasEntr[j]; l++)
427 {
428 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 429 t0_c_lv_vmon[j-(2*kScalers+4*kHV+3*kLV)]+= aValue->GetFloat();
8eb4ac75 430 }
19fb06bd 431 fLVvC[j-(2*kScalers+4*kHV+3*kLV)] = t0_c_lv_vmon[j-(2*kScalers+4*kHV+3*kLV)] / aliasEntr[j];
8eb4ac75 432 }
433 else if (j < 2*kScalers+4*kHV+4*kLV+kCFD)
434 {
435 aliasEntr[j] = aliasArr->GetEntries();
436 for(Int_t l=0; l<aliasEntr[j]; l++)
437 {
438 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 439 t0_a_cfd_thre[j-(2*kScalers+4*kHV+4*kLV)]+= aValue->GetFloat();
8eb4ac75 440 }
19fb06bd 441 fCFDtA[j-(2*kScalers+4*kHV+4*kLV)] = t0_a_cfd_thre[j-(2*kScalers+4*kHV+4*kLV)] / aliasEntr[j];
8eb4ac75 442 }
443 else if (j < 2*kScalers+4*kHV+4*kLV+2*kCFD)
444 {
445 aliasEntr[j] = aliasArr->GetEntries();
446 for(Int_t l=0; l<aliasEntr[j]; l++)
447 {
448 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 449 t0_a_cfd_walk[j-(2*kScalers+4*kHV+4*kLV+kCFD)]+= aValue->GetFloat();
8eb4ac75 450 }
19fb06bd 451 fCFDwA[j-(2*kScalers+4*kHV+4*kLV+kCFD)] = t0_a_cfd_walk[j-(2*kScalers+4*kHV+4*kLV+kCFD)] / aliasEntr[j];
8eb4ac75 452 }
453 else if (j < 2*kScalers+4*kHV+4*kLV+3*kCFD)
454 {
455 aliasEntr[j] = aliasArr->GetEntries();
456 for(Int_t l=0; l<aliasEntr[j]; l++)
457 {
458 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 459 t0_c_cfd_thre[j-(2*kScalers+4*kHV+4*kLV+2*kCFD)]+= aValue->GetFloat();
8eb4ac75 460 }
19fb06bd 461 fCFDtC[j-(2*kScalers+4*kHV+4*kLV+2*kCFD)] = t0_c_cfd_thre[j-(2*kScalers+4*kHV+4*kLV+2*kCFD)] / aliasEntr[j];
8eb4ac75 462 }
463 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD)
464 {
465 aliasEntr[j] = aliasArr->GetEntries();
466 for(Int_t l=0; l<aliasEntr[j]; l++)
467 {
468 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 469 t0_c_cfd_walk[j-(2*kScalers+4*kHV+4*kLV+3*kCFD)]+= aValue->GetFloat();
8eb4ac75 470 }
19fb06bd 471 fCFDwC[j-(2*kScalers+4*kHV+4*kLV+3*kCFD)] = t0_c_cfd_walk[j-(2*kScalers+4*kHV+4*kLV+3*kCFD)] / aliasEntr[j];
8eb4ac75 472 }
473 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM)
474 {
475 aliasEntr[j] = aliasArr->GetEntries();
476 for(Int_t l=0; l<aliasEntr[j]; l++)
477 {
478 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 479 t0_ac_trm[j-(2*kScalers+4*kHV+4*kLV+4*kCFD)]+= aValue->GetFloat();
8eb4ac75 480 }
19fb06bd 481 fTRM[j-(2*kScalers+4*kHV+4*kLV+4*kCFD)] = t0_ac_trm[j-(2*kScalers+4*kHV+4*kLV+4*kCFD)] / aliasEntr[j];
8eb4ac75 482 }
483 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM)
484 {
485 aliasEntr[j] = aliasArr->GetEntries();
486 for(Int_t l=0; l<aliasEntr[j]; l++)
487 {
488 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
19fb06bd 489 t0_ac_drm[j-(2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM)]+= aValue->GetFloat();
8eb4ac75 490 }
19fb06bd 491 fDRM[j-(2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM)] = t0_ac_drm[j-(2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM)] / aliasEntr[j];
8eb4ac75 492 }
955ef7d2 493 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+kAtten)
8eb4ac75 494 {
495 aliasEntr[j] = aliasArr->GetEntries();
496 for(Int_t l=0; l<aliasEntr[j]; l++)
497 {
498 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
499 t0_atten += aValue->GetInt();
500 }
19fb06bd 501 fAtten = t0_atten / aliasEntr[j];
8eb4ac75 502 }
955ef7d2 503 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+2*kAtten)
504 {
505 aliasEntr[j] = aliasArr->GetEntries();
506 for(Int_t l=0; l<aliasEntr[j]; l++)
507 {
508 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
509 t0_MPDcentA += aValue->GetInt();
510 }
511 fMPDcentA = t0_MPDcentA / aliasEntr[j];
512 }
513 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+3*kAtten)
514 {
515 aliasEntr[j] = aliasArr->GetEntries();
516 for(Int_t l=0; l<aliasEntr[j]; l++)
517 {
518 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
519 t0_MPDcentC += aValue->GetInt();
520 }
521 fMPDcentC = t0_MPDcentC / aliasEntr[j];
522 }
523 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+4*kAtten)
524 {
525 aliasEntr[j] = aliasArr->GetEntries();
526 for(Int_t l=0; l<aliasEntr[j]; l++)
527 {
528 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
529 t0_MPDsemiCentA += aValue->GetInt();
530 }
531 fMPDsemiCentA = t0_MPDsemiCentA / aliasEntr[j];
532 }
533 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+5*kAtten)
534 {
535 aliasEntr[j] = aliasArr->GetEntries();
536 for(Int_t l=0; l<aliasEntr[j]; l++)
537 {
538 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
539 t0_MPDsemiCentC += aValue->GetInt();
540 }
541 fMPDsemiCentC = t0_MPDsemiCentC / aliasEntr[j];
542 }
543 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+6*kAtten)
544 {
545 aliasEntr[j] = aliasArr->GetEntries();
546 for(Int_t l=0; l<aliasEntr[j]; l++)
547 {
548 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
549 t0_TVDCtop += aValue->GetInt();
550 }
551 fTVDCtop = t0_TVDCtop / aliasEntr[j];
552 }
553 else if (j < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+7*kAtten)
554 {
555 aliasEntr[j] = aliasArr->GetEntries();
556 for(Int_t l=0; l<aliasEntr[j]; l++)
557 {
558 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
559 t0_TVDCbottom += aValue->GetInt();
560 }
561 fTVDCbottom = t0_TVDCbottom / aliasEntr[j];
562 }
563 else
564 {
565 aliasEntr[j] = aliasArr->GetEntries();
566 for(Int_t l=0; l<aliasEntr[j]; l++)
567 {
568 AliDCSValue *aValue=dynamic_cast<AliDCSValue*> (aliasArr->At(l));
569 t0_MPDmode += aValue->GetInt();
570 }
571 fMPDmode = t0_MPDmode / aliasEntr[j];
572 }
19fb06bd 573 }
dc7ca31d 574 fIsProcessed=kTRUE;
9dcc11e4 575 return kTRUE;
dc7ca31d 576}
577
578//---------------------------------------------------------------
91366e58 579void AliT0DataDCS::Init()
580{
9dcc11e4 581 TString sindex;
91366e58 582 for(int i=0;i<kNAliases;i++)
8eb4ac75 583 {
584 if (i<kScalers)
585 {
586 fAliasNames[i] = "t00_ac_scaler_";
587 sindex.Form("%02d",i);
588 fAliasNames[i] += sindex;
589 }
590 else if (i < 2*kScalers)
591 {
592 fAliasNames[i] = "t00_ac_scaler_sec_";
19fb06bd 593 sindex.Form("%02d",i-kScalers);
8eb4ac75 594 fAliasNames[i] += sindex;
595 }
596 else if (i < 2*kScalers+kHV)
597 {
598 fAliasNames[i] = "t00_a_hv_imon_";
19fb06bd 599 sindex.Form("%02d",i-2*kScalers);
8eb4ac75 600 fAliasNames[i] += sindex;
601 }
602 else if (i < 2*kScalers+2*kHV)
603 {
604 fAliasNames[i] = "t00_a_hv_vmon_";
19fb06bd 605 sindex.Form("%02d",i-(2*kScalers+kHV));
8eb4ac75 606 fAliasNames[i] += sindex;
607 }
608 else if (i < 2*kScalers+2*kHV+kLV)
609 {
610 fAliasNames[i] = "t00_a_lv_imon_";
19fb06bd 611 sindex.Form("%02d",i-(2*kScalers+2*kHV));
8eb4ac75 612 fAliasNames[i] += sindex;
613 }
614 else if (i < 2*kScalers+2*kHV+2*kLV)
615 {
616 fAliasNames[i] = "t00_a_lv_vmon_";
19fb06bd 617 sindex.Form("%02d",i-(2*kScalers+2*kHV+kLV));
8eb4ac75 618 fAliasNames[i] += sindex;
619 }
620 else if (i < 2*kScalers+3*kHV+2*kLV)
621 {
622 fAliasNames[i] = "t00_c_hv_imon_";
19fb06bd 623 sindex.Form("%02d",i-(2*kScalers+2*kHV+2*kLV));
8eb4ac75 624 fAliasNames[i] += sindex;
625 }
626 else if (i < 2*kScalers+4*kHV+2*kLV)
627 {
628 fAliasNames[i] = "t00_c_hv_vmon_";
19fb06bd 629 sindex.Form("%02d",i-(2*kScalers+3*kHV+2*kLV));
8eb4ac75 630 fAliasNames[i] += sindex;
631 }
632 else if (i < 2*kScalers+4*kHV+3*kLV)
633 {
634 fAliasNames[i] = "t00_c_lv_imon_";
19fb06bd 635 sindex.Form("%02d",i-(2*kScalers+4*kHV+2*kLV));
8eb4ac75 636 fAliasNames[i] += sindex;
637 }
638 else if (i < 2*kScalers+4*kHV+4*kLV)
639 {
640 fAliasNames[i] = "t00_c_lv_vmon_";
19fb06bd 641 sindex.Form("%02d",i-(2*kScalers+4*kHV+3*kLV));
8eb4ac75 642 fAliasNames[i] += sindex;
643 }
644 else if (i < 2*kScalers+4*kHV+4*kLV+kCFD)
645 {
646 fAliasNames[i] = "t00_a_cfd_thre_";
19fb06bd 647 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV));
8eb4ac75 648 fAliasNames[i] += sindex;
649 }
650 else if (i < 2*kScalers+4*kHV+4*kLV+2*kCFD)
651 {
652 fAliasNames[i] = "t00_a_cfd_walk_";
19fb06bd 653 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV+kCFD));
8eb4ac75 654 fAliasNames[i] += sindex;
655 }
656 else if (i < 2*kScalers+4*kHV+4*kLV+3*kCFD)
657 {
658 fAliasNames[i] = "t00_c_cfd_thre_";
19fb06bd 659 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV+2*kCFD));
8eb4ac75 660 fAliasNames[i] += sindex;
661 }
662 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD)
663 {
664 fAliasNames[i] = "t00_c_cfd_walk_";
19fb06bd 665 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV+3*kCFD));
8eb4ac75 666 fAliasNames[i] += sindex;
667 }
668 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM)
669 {
670 fAliasNames[i] = "t00_ac_trm_";
19fb06bd 671 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV+4*kCFD));
8eb4ac75 672 fAliasNames[i] += sindex;
673 }
674 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM)
675 {
676 fAliasNames[i] = "t00_ac_drm_";
19fb06bd 677 sindex.Form("%02d",i-(2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM));
8eb4ac75 678 fAliasNames[i] += sindex;
679 }
955ef7d2 680 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+kAtten)
8eb4ac75 681 {
19fb06bd 682 fAliasNames[i] = "t00_ac_atten";
8eb4ac75 683 }
955ef7d2 684 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+2*kAtten)
685 {
686 fAliasNames[i] = "t00_a_mpd_cent";
687 }
688 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+3*kAtten)
689 {
690 fAliasNames[i] = "t00_c_mpd_cent";
691 }
692 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+4*kAtten)
693 {
694 fAliasNames[i] = "t00_a_mpd_scent";
695 }
696 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+5*kAtten)
697 {
698 fAliasNames[i] = "t00_c_mpd_scent";
699 }
700 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+6*kAtten)
701 {
702 fAliasNames[i] = "t00_ac_tvdc_top";
703 }
704 else if (i < 2*kScalers+4*kHV+4*kLV+4*kCFD+kTRM+kDRM+7*kAtten)
705 {
706 fAliasNames[i] = "t00_ac_tvdc_bottom";
707 }
708 else
709 {
710 fAliasNames[i] = "t00_ac_mpd_mode";
711 }
dc7ca31d 712 }
713
dc7ca31d 714}
715
716//---------------------------------------------------------------
8eb4ac75 717void AliT0DataDCS::Introduce(UInt_t numAlias, const TObjArray* aliasArr)const
718{
dc7ca31d 719
720 int entries=aliasArr->GetEntries();
721 AliInfo(Form("************ Alias: %s **********",fAliasNames[numAlias].Data()));
722 AliInfo(Form(" %d DP values collected",entries));
723
724}
725
dc7ca31d 726
91366e58 727