AliRoot Core  edcc906 (edcc906)
AliEMCALPreprocessor.cxx
Go to the documentation of this file.
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 //Root
17 #include "TFile.h"
18 #include "TTree.h"
19 #include "TEnv.h"
20 #include "TParameter.h"
21 #include "TString.h"
22 #include <TTimeStamp.h>
23 
24 //AliRoot
25 #include "AliShuttleInterface.h"
26 #include "AliEMCALPreprocessor.h"
27 #include "AliLog.h"
28 #include "AliDCSValue.h"
29 #include "AliCDBMetaData.h"
33 #include "AliCaloCalibPedestal.h"
34 #include "AliCaloCalibSignal.h"
36 
37 const Int_t kValCutTemp = 100; // discard temperatures > 100 degrees
38 const Int_t kDiffCutTemp = 5; // discard temperature differences > 5 degrees
39 const TString kPedestalRunType = "PEDESTAL"; // pedestal run identifier
40 const TString kPhysicsRunType = "PHYSICS"; // physics run identifier
41 const TString kStandAloneRunType = "STANDALONE_BC"; // standalone run identifier
42 const TString kAmandaTemp = "EMC_PT_%02d.Temperature"; // Amanda string for temperature entries
43 //const Double_t kFitFraction = 0.7; // Fraction of DCS sensor fits required
44 const Double_t kFitFraction = -1.0; // Don't require minimum number of fits during commissioning
45 
46 const TString kMetaResponsible = "David Silvermyr";
47 //legacy comments and return codes from TPC
48 const TString kMetaComment = "Preprocessor AliEMCAL data base entries.";
49 const int kReturnCodeNoInfo = 9;
50 const int kReturnCodeNoObject = 2;
51 const int kReturnCodeNoEntries = 1;
52 
54 ClassImp(AliEMCALPreprocessor) ;
56 
59 //_______________________________________________________________________________________
61 AliPreprocessor("EMC",0),
62 fConfEnv(0),
63 fTemp(0),
64 fConfigOK(kTRUE)
65 { }
66 
69 //_______________________________________________________________________________________
71 AliPreprocessor("EMC",shuttle),
72 fConfEnv(0),
73 fTemp(0),
74 fConfigOK(kTRUE)
75 {
78 }
79 
82 //______________________________________________________________________________________________
84 AliPreprocessor("EMCAL",0),
85 fConfEnv(0), fTemp(0), fConfigOK(kTRUE)
86 {
87  AliFatal("Copy constructor not implemented");
88 }
89 
92 //______________________________________________________________________________________________
94 {
95  if (&source == this) return *this;
96 
97  new (this) AliEMCALPreprocessor(source);
98  return *this;
99 }
100 
103 //____________________________________________________________________________
105 {
106  if (fTemp) delete fTemp;
107 }
108 
111 //______________________________________________________________________________________________
112 void AliEMCALPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
113 {
114  UInt_t startTimeLocal = startTime-1800;
115  AliPreprocessor::Initialize(run, startTimeLocal, endTime);
116 
117  AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
118  TTimeStamp((time_t)startTime,0).AsString(),
119  TTimeStamp((time_t)endTime,0).AsString()));
120 
121  // Preprocessor configuration
122  AliCDBEntry* entry = GetFromOCDB("Config", "Preprocessor");
123  if (entry) fConfEnv = (TEnv*) entry->GetObject();
124 
125  if ( fConfEnv==0 )
126  {
127  Log("AliEMCALPreprocessor: Preprocessor Config OCDB entry missing.\n");
128  fConfigOK = kFALSE;
129  return;
130  }
131 
132  // Temperature sensors
133  TTree *confTree = 0;
134 
135  TString tempConf = fConfEnv->GetValue("Temperature","ON");
136  tempConf.ToUpper();
137  if (tempConf != "OFF" )
138  {
139  entry = GetFromOCDB("Config", "Temperature");
140  if (entry) confTree = (TTree*) entry->GetObject();
141 
142  if ( confTree==0 )
143  {
144  Log("AliEMCALPreprocessor: Temperature Config OCDB entry missing.\n");
145  fConfigOK = kFALSE;
146  return;
147  }
148 
149  fTemp = new AliEMCALSensorTempArray(startTimeLocal, fEndTime, confTree, kAmandaTemp);
152  }
153 
154  return;
155 }
156 
160 //______________________________________________________________________________________________
161 UInt_t AliEMCALPreprocessor::Process(TMap* dcsAliasMap)
162 {
163  if (!fConfigOK) return kReturnCodeNoInfo;
164 
165  UInt_t result = 0;
166 
167  TObjArray *resultArray = new TObjArray();
168 
169  TString errorHandling = fConfEnv->GetValue("ErrorHandling","ON");
170  errorHandling.ToUpper();
171 
172  TObject * status;
173 
174  UInt_t dcsResult=0;
175  if (errorHandling == "OFF" )
176  {
177  if (!dcsAliasMap) dcsResult = kReturnCodeNoEntries;
178  else if (dcsAliasMap->GetEntries() == 0 ) dcsResult = kReturnCodeNoEntries;
179  status = new TParameter<int>("dcsResult",dcsResult);
180  resultArray->Add(status);
181  }
182  else
183  {
184  if (!dcsAliasMap) return kReturnCodeNoInfo;
185  else if (dcsAliasMap->GetEntries() == 0 ) return kReturnCodeNoInfo;
186  }
187 
188 
189  TString runType = GetRunType();
190 
191  // Temperature sensors are processed by AliEMCALCalTemp
192  TString tempConf = fConfEnv->GetValue("Temperature","ON");
193  tempConf.ToUpper();
194  if (tempConf != "OFF" && dcsAliasMap )
195  {
196  UInt_t tempResult = MapTemperature(dcsAliasMap);
197  result=tempResult;
198  status = new TParameter<int>("tempResult",tempResult);
199  resultArray->Add(status);
200  }
201 
202  // Trigger configuration processing: only for Physics runs
203  TString triggerConf = fConfEnv->GetValue("Trigger","ON");
204  triggerConf.ToUpper();
205  if( runType == kPhysicsRunType )
206  {
207  if (triggerConf != "OFF" && dcsAliasMap )
208  {
209  UInt_t triggerResult = MapTriggerConfig(dcsAliasMap);
210  result+=triggerResult;
211  status = new TParameter<int>("triggerResult",triggerResult);
212  resultArray->Add(status);
213  }
214  }
215 
216  // Other calibration information will be retrieved through FXS files
217  // examples:
218  // TList* fileSourcesDAQ = GetFile(AliShuttleInterface::kDAQ, "pedestals");
219  // const char* fileNamePed = GetFile(AliShuttleInterface::kDAQ, "pedestals", "LDC1");
220  //
221  // TList* fileSourcesHLT = GetFile(AliShuttleInterface::kHLT, "calib");
222  // const char* fileNameHLT = GetFile(AliShuttleInterface::kHLT, "calib", "LDC1");
223 
224  // PEDESTAL ENTRIES:
225 
226  if ( runType == kPedestalRunType )
227  {
228  Int_t numSources = 1;
229  Int_t pedestalSource[2] = {AliShuttleInterface::kDAQ, AliShuttleInterface::kHLT} ;
230 
231  TString source = fConfEnv->GetValue("Pedestal","DAQ");
232  source.ToUpper();
233  if (source != "OFF" )
234  {
235  if ( source == "HLT") pedestalSource[0] = AliShuttleInterface::kHLT;
236 
237  if (!GetHLTStatus()) pedestalSource[0] = AliShuttleInterface::kDAQ;
238 
239  if (source == "HLTDAQ" )
240  {
241  numSources=2;
242  pedestalSource[0] = AliShuttleInterface::kHLT;
243  pedestalSource[1] = AliShuttleInterface::kDAQ;
244  }
245 
246  if (source == "DAQHLT" ) numSources=2;
247  UInt_t pedestalResult=0;
248  for (Int_t i=0; i<numSources; i++ )
249  {
250  pedestalResult = ExtractPedestals(pedestalSource[i]);
251  if ( pedestalResult == 0 ) break;
252  }
253 
254  result += pedestalResult;
255  status = new TParameter<int>("pedestalResult",pedestalResult);
256  resultArray->Add(status);
257  }
258  }
259 
260  // SIGNAL/LED ENTRIES:
261  if( runType == kPhysicsRunType )
262  {
263  Int_t numSources = 1;
264  Int_t signalSource[2] = {AliShuttleInterface::kDAQ,AliShuttleInterface::kHLT} ;
265 
266  TString source = fConfEnv->GetValue("Signal","DAQ");
267  source.ToUpper();
268  if ( source != "OFF")
269  {
270  if ( source == "HLT") signalSource[0] = AliShuttleInterface::kHLT;
271 
272  if (!GetHLTStatus()) signalSource[0] = AliShuttleInterface::kDAQ;
273 
274  if (source == "HLTDAQ" )
275  {
276  numSources=2;
277  signalSource[0] = AliShuttleInterface::kHLT;
278  signalSource[1] = AliShuttleInterface::kDAQ;
279  }
280 
281  if (source == "DAQHLT" ) numSources=2;
282 
283  UInt_t signalResult=0;
284  for (Int_t i=0; i<numSources; i++ )
285  {
286  signalResult = ExtractSignal(signalSource[i]);
287  if ( signalResult == 0 ) break;
288  }
289 
290  result += signalResult;
291  status = new TParameter<int>("signalResult",signalResult);
292  resultArray->Add(status);
293  }
294  }
295 
296  // overall status at the end
297  if (errorHandling == "OFF" )
298  {
299  AliCDBMetaData metaData;
300  metaData.SetBeamPeriod(0);
302  metaData.SetComment("Preprocessor AliEMCAL status.");
303  Bool_t storeOK = Store("Calib", "PreprocStatus", resultArray, &metaData, 0, kFALSE);
304  resultArray->Delete();
305  result = 0;
306  if ( !storeOK ) result=1;
307  return result;
308  }
309  else
310  {
311  return result;
312  }
313 }
314 
317 //______________________________________________________________________________________________
318 UInt_t AliEMCALPreprocessor::MapTemperature(TMap* dcsAliasMap)
319 {
320  UInt_t result=0;
321 
322  TMap *map = fTemp->ExtractDCS(dcsAliasMap);
323  if (map)
324  {
325  fTemp->MakeSplineFit(map);
326  Double_t fitFraction = 1.0*fTemp->NumFits()/fTemp->NumSensors();
327  if (fitFraction > kFitFraction )
328  {
329  AliInfo(Form("Temperature values extracted, fits performed.\n"));
330  }
331  else
332  {
333  Log ("Too few temperature maps fitted. \n");
334  result = kReturnCodeNoInfo;
335  }
336  }
337  else
338  {
339  Log("No temperature map extracted. \n");
340  result = kReturnCodeNoInfo;
341  }
342  delete map;
343 
344  // Now store the final CDB file
345 
346  if ( result == 0 )
347  {
348  // some info was found
349  AliCDBMetaData metaData;
350  metaData.SetBeamPeriod(0);
352  metaData.SetComment(kMetaComment);
353 
354  Bool_t storeOK = Store("Calib", "Temperature", fTemp, &metaData, 0, kFALSE);
355  if ( !storeOK ) result=1;
356 
357  AliInfo(Form("Temperature info stored. result %d\n", result));
358  }
359 
360  return result;
361 }
362 
365 //______________________________________________________________________________________________
366 UInt_t AliEMCALPreprocessor::MapTriggerConfig(TMap* dcsAliasMap)
367 {
368  const Int_t kNTRU = 46;
369 
370  AliInfo("Print DCS alias map content");
371  dcsAliasMap->Print();
372 
373  AliInfo(Form("Get TRU info from DCS DPs."));
374 
375  Int_t i, iTRU;
376  const Int_t bufsize = 1000;
377  char buf[bufsize];
378 
379  AliDCSValue *dcsVal;
380 
381  // overall object to hold STU and DCS config info
382  // DS comment: for now only holds TRU info, i.e. only partially filled
383  // (STU info only in raw data header; unfortunately not also picked up via DCS DPs)
385 
386  // allocate space for TRU objects
387  TClonesArray *truArr = new TClonesArray("AliEMCALTriggerTRUDCSConfig", kNTRU);
388  for( iTRU = 0; iTRU < kNTRU; iTRU++)
389  {
390  new((*truArr)[iTRU]) AliEMCALTriggerTRUDCSConfig();
391  }
392  trigConfig->SetTRUArr(truArr);
393 
394  // loop through all TRUs
395  for( iTRU = 0; iTRU < kNTRU; iTRU++)
396  {
397  AliInfo( Form("iTRU %d \n", iTRU) );
398 
399  // fill the objects
400  AliEMCALTriggerTRUDCSConfig* truConfig = trigConfig->GetTRUDCSConfig(iTRU);
401  if( ! truConfig )
402  {
403  AliWarning( Form("EMC TRU%02d config not retrieved!\n", iTRU ));
404  continue;
405  }
406 
407  // get last entries. fill the TRU object
408  snprintf( buf, bufsize, "EMC_TRU%02d_L0ALGSEL", iTRU );
409  if((dcsVal = ReadDCSValue(dcsAliasMap, buf)))
410  {
411  AliInfo(Form("saving value: %d\n", dcsVal->GetUInt()));
412  truConfig->SetL0SEL( dcsVal->GetUInt() );
413  }
414 
415  snprintf( buf, bufsize, "EMC_TRU%02d_PEAKFINDER", iTRU );
416  if((dcsVal = ReadDCSValue(dcsAliasMap, buf)))
417  {
418  AliInfo(Form("saving value: %d\n", dcsVal->GetUInt()));
419  truConfig->SetSELPF( dcsVal->GetUInt() );
420  }
421 
422  snprintf( buf, bufsize, "EMC_TRU%02d_GLOBALTHRESH", iTRU );
423  if((dcsVal = ReadDCSValue(dcsAliasMap, buf)))
424  {
425  AliInfo(Form("saving value: %d\n", dcsVal->GetUInt()));
426  truConfig->SetGTHRL0( dcsVal->GetUInt() );
427  }
428 
429  snprintf( buf, bufsize, "EMC_TRU%02d_COSMTHRESH", iTRU );
430  if((dcsVal = ReadDCSValue(dcsAliasMap, buf)))
431  {
432  AliInfo(Form("saving value: %d\n", dcsVal->GetUInt()));
433  truConfig->SetL0COSM( dcsVal->GetUInt() );
434  }
435 
436  for( i = 0; i < 6; i++ )
437  {
438  snprintf( buf, bufsize, "EMC_TRU%02d_MASK%d", iTRU, i );
439  if((dcsVal = ReadDCSValue(dcsAliasMap, buf)))
440  {
441  AliInfo(Form("saving value: %d\n", dcsVal->GetUInt()));
442  truConfig->SetMaskReg( dcsVal->GetUInt(), i );
443  }
444  }
445 
446  } // TRUs
447 
448  AliInfo(Form("TRU info retrieved.\n"));
449 
450  // STU
451  AliEMCALTriggerSTUDCSConfig * stuConfig(NULL);
452  TObjArray *dcsvalarray(NULL);
453  const char *detectors[2] = {"EMC", "DMC"};
454  Bool_t isEMCAL;
455 
456  for(const char **idet = detectors; idet < detectors + sizeof(detectors)/sizeof(const char *); idet++)
457  {
458  Bool_t isEMCAL = !strcmp(*idet, "EMC");
459  stuConfig = new AliEMCALTriggerSTUDCSConfig;
460  for (i = 0; i < 3; i++)
461  {
462  for (int j = 0; j < 2; j++)
463  {
464  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_G%c%d", *idet, i + 65, j))))
465  {
466  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
467  stuConfig->SetG(i, j, dcsVal->GetInt());
468  }
469 
470  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_J%c%d", *idet, i + 65, j))))
471  {
472  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
473  stuConfig->SetJ(i, j, dcsVal->GetInt());
474  }
475  }
476  }
477 
478  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_GETRAW", *idet))))
479  {
480  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
481  stuConfig->SetRawData(dcsVal->GetInt());
482  }
483 
484  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_REGION", *idet))))
485  {
486  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
487  stuConfig->SetRegion(dcsVal->GetInt());
488  }
489 
490  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_FWVERS", *idet))))
491  {
492  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
493  stuConfig->SetFw(dcsVal->GetInt());
494  }
495 
496  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_PATCHSIZE", *idet)))){
497  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
498  stuConfig->SetPatchSize(dcsVal->GetInt());
499  }
500  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_MEDIAN", *idet)))){
501  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
502  stuConfig->SetMedianMode(dcsVal->GetInt());
503  }
504 
505  AliDCSValue *errorcount(NULL);
506  for(Int_t itru = 0; itru < 68; itru++)
507  {
508  // TODO: Cross check - we might receive multiple data points
509  // Currently a test procedure
510  if(itru > 55 && !isEMCAL) continue;
511 
512  snprintf(buf, bufsize, "%s_STU_ERROR_COUNT_TRU%02d", *idet, itru);
513  AliInfo(Form("Reading %s", buf));
514 
515  TObjArray *dcsvals = (TObjArray *)dcsAliasMap->GetValue(buf);
516  if(dcsvals)
517  {
518  AliInfo(Form("Found %d objects in DCS values", dcsvals->GetEntries()));
519 
520  for(TIter eniter = TIter(dcsvals).Begin(); eniter != TIter::End(); ++eniter)
521  {
522  errorcount = dynamic_cast<AliDCSValue *>(*eniter);
523  stuConfig->SetTRUErrorCounts(itru, errorcount->GetTimeStamp(), errorcount->GetUInt());
524  AliInfo(Form("Saving value %d", errorcount->GetUInt()));
525  }
526  }
527  else
528  {
529  AliWarning(Form("%s not found in the DCS alias map", buf));
530  }
531  }
532 
533  if(!isEMCAL)
534  {
535  for(Int_t iphos = 0; iphos < 4; iphos++)
536  {
537  if((dcsVal = ReadDCSValue(dcsAliasMap, Form("%s_STU_PHOS_scale%d", *idet, iphos))))
538  {
539  AliInfo(Form("saving value: %d\n", dcsVal->GetInt()));
540  stuConfig->SetPHOSScale(iphos, dcsVal->GetInt());
541  }
542  }
543  }
544 
545  trigConfig->SetSTUObj(stuConfig, !isEMCAL);
546  }
547 
548  AliInfo(Form("STU info retrieved."));
549 
550  // save the objects
551  AliCDBMetaData metaData;
552  metaData.SetBeamPeriod(0);
554  metaData.SetComment(kMetaComment);
555 
556  UInt_t result=0;
557  Bool_t storeOK = Store("Calib", "Trigger", trigConfig, &metaData, 0, kFALSE);
558  if ( !storeOK ) result=1;
559 
560  AliInfo(Form("TRU info stored. result %d\n", result));
561 
562  return result;
563 }
564 
568 //______________________________________________________________________________________________
570 {
571  UInt_t result=0;
572 
574  calibPed->Init();
575 
576  TList* list = GetFileSources(sourceFXS,"pedestals");
577  if (list && list->GetEntries()>0)
578  {
579  // loop through all files from LDCs
580 
581  int changes = 0;
582  UInt_t index = 0;
583  while (list->At(index)!=NULL)
584  {
585  TObjString* fileNameEntry = (TObjString*) list->At(index);
586  if (fileNameEntry!=NULL)
587  {
588  TString fileName = GetFile(sourceFXS, "pedestals",
589  fileNameEntry->GetString().Data());
590 
591  TFile *f = TFile::Open(fileName);
592  if (!f)
593  {
594  Log ("Error opening pedestal file.");
595  result = kReturnCodeNoObject;
596  break;
597  }
598 
599  AliCaloCalibPedestal *calPed;
600  f->GetObject("emcCalibPedestal",calPed);
601  if ( !calPed )
602  {
603  Log ("No pedestal calibration object in file.");
604  result = kReturnCodeNoObject;
605  break;
606  }
607 
608  if ( calPed->GetNEvents()>0 && calPed->GetNChanFills()>0 )
609  {
610  // add info for the modules available in the present file
611  Bool_t status = calibPed->AddInfo(calPed);
612  if (status) { changes++; }
613  }
614 
615  delete calPed;
616  f->Close();
617  }
618  index++;
619  } // while(list)
620 
621  //
622  // Store updated pedestal entry to OCDB
623  //
624  if (changes>0)
625  {
626  AliCDBMetaData metaData;
627  metaData.SetBeamPeriod(0);
629  metaData.SetComment(kMetaComment);
630 
631  Bool_t storeOK = StoreReferenceData("Calib", "Pedestals", calibPed, &metaData);
632  if ( !storeOK ) result++;
633  }
634  }
635  else
636  {
637  Log ("Error: no entries in input file list!");
638  result = kReturnCodeNoEntries;
639  }
640 
641  return result;
642 }
643 
647 //______________________________________________________________________________________________
648 UInt_t AliEMCALPreprocessor::ExtractSignal(Int_t sourceFXS)
649 {
650  UInt_t result=0;
652 
653  TList* list = GetFileSources(sourceFXS,"signal");
654  if (list && list->GetEntries()>0)
655  {
656  // loop through all files from LDCs
657 
658  int changes = 0;
659  UInt_t index = 0;
660  while (list->At(index)!=NULL)
661  {
662  TObjString* fileNameEntry = (TObjString*) list->At(index);
663  if (fileNameEntry!=NULL)
664  {
665  TString fileName = GetFile(sourceFXS, "signal",
666  fileNameEntry->GetString().Data());
667 
668  TFile *f = TFile::Open(fileName);
669  if (!f)
670  {
671  Log ("Error opening signal file.");
672  result = kReturnCodeNoObject;
673  break;
674  }
675 
676  AliCaloCalibSignal *calSig;
677  f->GetObject("emcCalibSignal",calSig);
678  if ( !calSig )
679  {
680  Log ("No signal calibration object in file.");
681  result = kReturnCodeNoObject;
682  break;
683  }
684 
685  if ( calSig->GetNEvents()>0 )
686  {
687  // add info for the modules available in the present file
688  Bool_t status = calibSig->AddInfo(calSig);
689  if (status) { changes++; }
690  }
691 
692  delete calSig;
693  f->Close();
694  }
695  index++;
696  } // while(list)
697 
698  //
699  // Store updated signal entry to OCDB
700  //
701  if (changes>0)
702  {
703  AliCDBMetaData metaData;
704  metaData.SetBeamPeriod(0);
706  metaData.SetComment(kMetaComment);
707 
708  Bool_t storeOK = Store("Calib", "LED", calibSig, &metaData, 0, kFALSE);
709  if ( !storeOK ) result++;
710  }
711  }
712  else
713  {
714  Log ("Error: no entries in input file list!");
715  result = kReturnCodeNoEntries;
716  }
717 
718  return result;
719 }
720 
723 //______________________________________________________________________________________________
724 AliDCSValue *AliEMCALPreprocessor::ReadDCSValue(const TMap *values, const char *valname)
725 {
726  AliDCSValue *dcsVal(NULL);
727  TObjArray * dcsvalarray = (TObjArray*)values->GetValue(valname);
728  if (!dcsvalarray)
729  {
730  AliWarning(Form("%s alias value not found!", valname));
731  return NULL;
732  }
733  else
734  {
735  AliInfo(Form("%s has %d entries", valname, dcsvalarray->GetEntries()));
736 
737  if (dcsvalarray->GetEntries() > 0)
738  {
739  return (AliDCSValue*)dcsvalarray->At(dcsvalarray->GetEntries() - 1);
740  }
741  else
742  {
743  AliWarning(Form("%s has no entry!", valname));
744  return NULL;
745  }
746  }
747 }
void SetMaskReg(UInt_t msk, Int_t pos)
Bool_t Store(const char *pathLevel2, const char *pathLevel3, TObject *object, AliCDBMetaData *metaData, Int_t validityStart=0, Bool_t validityInfinite=kFALSE)
TList * GetFileSources(Int_t system, const char *id=0)
TFile * Open(const char *filename, Long64_t &nevents)
void SetPHOSScale(int iscale, int val)
#define TObjArray
UInt_t MapTriggerConfig(TMap *dcsAliasMap)
Extract DCS trigger info.
Int_t NumSensors() const
AliCDBEntry * GetFromOCDB(const char *pathLevel2, const char *pathLevel3)
UInt_t GetUInt() const
void MakeSplineFit(TMap *map, Bool_t keepMap=kFALSE)
TEnv * fConfEnv
Preprocessor configuration map.
Process data in shuttle to feed OCDB.
void SetComment(const char *comment)
UInt_t ExtractSignal(Int_t sourceFXS)
const char * GetFile(Int_t system, const char *id, const char *source)
class for signal monitoring and calibration tools
TMap * ExtractDCS(TMap *dcsMap, Bool_t keepStart=kFALSE)
void SetResponsible(const char *yourName)
virtual UInt_t Process(TMap *dcsAliasMap)
AliEMCALTriggerTRUDCSConfig * GetTRUDCSConfig(Int_t iTRU) const
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
const TString kMetaComment
#define AliWarning(message)
Definition: AliLog.h:541
void SetG(Int_t vzpar, Int_t ithresh, Int_t val)
const TString kAmandaTemp
const Int_t kDiffCutTemp
Calibration class for temperature sensors.
TObject * GetObject()
Definition: AliCDBEntry.h:56
Bool_t StoreReferenceData(const char *pathLevel2, const char *pathLevel3, TObject *object, AliCDBMetaData *metaData)
const int kReturnCodeNoEntries
void AddRunType(const char *runType)
void SetBeamPeriod(UInt_t period)
TTimeStamp startTime(2009, 8, 7, 0, 0, 0)
const int kReturnCodeNoInfo
#define AliInfo(message)
Definition: AliLog.h:484
AliEMCALSensorTempArray * fTemp
CDB class for temperature sensors.
void SetSTUObj(AliEMCALTriggerSTUDCSConfig *so, Bool_t isDCAL=false)
EMCal trigger STU DCS Config.
void Log(const char *message, UInt_t level=3)
const Double_t kFitFraction
const TString kMetaResponsible
AliEMCALPreprocessor & operator=(const AliEMCALPreprocessor &source)
copy ctor
UInt_t MapTemperature(TMap *dcsAliasMap)
Extract DCS temperature maps. Perform fits to save space.
void SetValCut(const Int_t valCut)
Bool_t fConfigOK
Identify succesful reading of OCDB Config.
virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
const char * GetRunType()
pedestal/bad map monitoring and calibration tools
Definition: AliCDBEntry.h:18
void SetTRUErrorCounts(Int_t itru, Int_t itime, ULong64_t errorcounts)
Set TRU error counts.
#define AliFatal(message)
Definition: AliLog.h:640
TF1 * f
Definition: interpolTest.C:21
void SetTRUArr(TClonesArray *const ta)
Bool_t AddInfo(const AliCaloCalibSignal *sig)
const TString kPhysicsRunType
Int_t NumFits() const
virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
dtor
AliDCSValue * ReadDCSValue(const TMap *values, const char *valname)
Read DCS.
void SetDiffCut(const Int_t diffCut)
Int_t GetInt() const
UInt_t GetTimeStamp() const
Definition: AliDCSValue.h:55
const TString kPedestalRunType
UInt_t ExtractPedestals(Int_t sourceFXS)
const Int_t kValCutTemp
const TString kStandAloneRunType
const int kReturnCodeNoObject
void SetJ(Int_t vzpar, Int_t ithresh, Int_t val)
AliEMCALPreprocessor()
Default constructor.
Bool_t AddInfo(AliCaloCalibPedestal *ped)
Picks up new info from supplied argument.
virtual ~AliEMCALPreprocessor()
assignment operator