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