fData(0)
{
- // constructor
+ // constructor
+
+ AddRunType("STANDALONE");
+ AddRunType("PHYSICS");
+
}
//______________________________________________________________________________________________
AliVZEROPreprocessor::~AliVZEROPreprocessor()
{
// destructor
+
+ delete fData;
}
//______________________________________________________________________________________________
{
// Creates AliZDCDataDCS object
- AliPreprocessor::Initialize(run, startTime, endTime);
-
- Log(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
+ AliPreprocessor::Initialize(run, startTime, endTime);
+
+ Log(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
TTimeStamp(startTime).AsString(),
TTimeStamp(endTime).AsString()));
- fRun = run;
- fStartTime = startTime;
- fEndTime = endTime;
+ fRun = run;
+ // fStartTime = startTime;
+ // fEndTime = endTime;
+ fStartTime = GetStartTimeDCSQuery ();
+ fEndTime = GetEndTimeDCSQuery ();
- fData = new AliVZERODataDCS(fRun, fStartTime, fEndTime);
+ fData = new AliVZERODataDCS(fRun, fStartTime, fEndTime);
+
}
//______________________________________________________________________________________________
// *************** From DAQ ******************
- TString SourcesId = "CALIB";
+ TString SourcesId = "V00da_results";
TList* sourceList = GetFileSources(kDAQ, SourcesId.Data());
if (!sourceList) {
- AliError(Form("No sources found for id %s", SourcesId.Data()));
+ Log(Form("No sources found for id %s", SourcesId.Data()));
return 1; }
- AliInfo(Form("The following sources produced files with the id %s",SourcesId.Data()));
+ Log(Form("The following sources produced files with the id %s",SourcesId.Data()));
sourceList->Print();
TIter iter(sourceList);
while((source=dynamic_cast<TObjString*> (iter.Next()))){
fileName = GetFile(kDAQ, SourcesId.Data(), source->GetName());
if (fileName.Length() > 0)
- AliInfo(Form("Got the file %s, now we can extract some values.", fileName.Data()));
+ Log(Form("Got the file %s, now we can extract some values.", fileName.Data()));
FILE *file;
if((file = fopen(fileName.Data(),"r")) == NULL){
- AliError(Form("Cannot open file %s",fileName.Data()));
+ Log(Form("Cannot open file %s",fileName.Data()));
return 1;}
- Float_t Pedestals[128], Sigmas[128], Gains[128];
- for(Int_t j=0; j<128; j++)fscanf(file,"%f %f %f ",
- &Pedestals[j], &Sigmas[j], &Gains[j]);
+ Float_t PEDmean[128], PEDsigma[128], ADCmean[128], ADCsigma[128] ;
+ for(Int_t j=0; j<128; j++)fscanf(file,"%f %f %f %f",
+ &PEDmean[j], &PEDsigma[j], &ADCmean[j], &ADCsigma[j]);
fclose(file);
- calibData->SetPedestal(Pedestals);
- calibData->SetSigma(Sigmas);
- calibData->SetGain(Gains); }
-
- delete sourceList;
+ calibData->SetPedestal(PEDmean);
+ calibData->SetSigma(PEDsigma);
+ calibData->SetGain(ADCmean);
+ calibData->SetADCsigma(ADCsigma);
+ }
+
delete source;
// Check that everything was properly transmitted
-// for(Int_t j=0; j<128; j++){printf("ADCPedestal[%d] -> %f \n",j,calibData->GetPedestal(j));}
-// for(Int_t j=0; j<128; j++){printf("ADCGain[%d] -> %f \n",j,calibData->GetGain(j));}
-// for(Int_t j=0; j<128; j++){printf("ADCSigma[%d] -> %f \n",j,calibData->GetSigma(j));}
+// for(Int_t j=0; j<128; j++){printf("Pedestal[%d] -> %f \n",j,calibData->GetPedestal(j));}
+// for(Int_t j=0; j<128; j++){printf("PedSigma[%d] -> %f \n",j,calibData->GetSigma(j));}
+// for(Int_t j=0; j<128; j++){printf("Gain[%d] -> %f \n",j,calibData->GetGain(j));}
+// for(Int_t j=0; j<128; j++){printf("ADCsigma[%d] -> %f \n",j,calibData->GetADCsigma(j));}
// for(Int_t j=0; j<64; j++){printf("MeanHV[%d] -> %f \n",j,calibData->GetMeanHV(j));}
// for(Int_t j=0; j<64; j++){printf("WidthHV[%d] -> %f \n",j,calibData->GetWidthHV(j));}
- // Now we store the VZERO Calibration Object into CalibrationDB
+ // Now we store the VZERO Calibration Object into CalibrationDB
+
+ Bool_t resECal=kTRUE;
+ Bool_t result = 0;
+// if(sourceList && sourceList->GetEntries()>0)
+// {
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
metaData.SetResponsible("Brigitte Cheynis");
metaData.SetComment("This preprocessor fills an AliVZEROCalibData object");
- Bool_t result = Store("Calib", "Data", calibData, &metaData, 0, kTRUE);
+ resECal = Store("Calib", "Data", calibData, &metaData, 0, kTRUE);
+// }
+ if(resECal==kFALSE ) result = 1;
+
delete calibData;
+ delete sourceList;
- if (!result) return 1;
- return 0;
+ return result;
}