fData(0)
{
- // constructor
+ // constructor
+
+ 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;
- fData = new AliVZERODataDCS(fRun, fStartTime, fEndTime);
+ fData = new AliVZERODataDCS(fRun, fStartTime, fEndTime);
+
}
//______________________________________________________________________________________________
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 ",
calibData->SetPedestal(Pedestals);
calibData->SetSigma(Sigmas);
calibData->SetGain(Gains); }
-
- delete sourceList;
+
delete source;
// Check that everything was properly transmitted
// 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
- AliCDBMetaData metaData;
- metaData.SetBeamPeriod(0);
- metaData.SetResponsible("Brigitte Cheynis");
- metaData.SetComment("This preprocessor fills an AliVZEROCalibData object");
+ Bool_t result = kFALSE;
+ 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);
+ result = Store("Calib", "Data", calibData, &metaData, 0, kTRUE);
+ }
delete calibData;
+ delete sourceList;
if (!result) return 1;
return 0;