}
//________________________________________________________________
-void AliToyMCEventGenerator::SetCorrectionFromFile(const TString& file, AliTPCCorrection* &corr)
+void AliToyMCEventGenerator::SetCorrectionFromFile(TString file, AliTPCCorrection* &corr)
{
//
// read the correction from file and set it to corr
// allow for specifying an object name for the AliTPCCorrection in the file name
// separated by a ':'
- TObjArray *arr=fCorrectionFile.Tokenize(":");
+ TObjArray *arr=file.Tokenize(":");
if (arr->GetEntriesFast()>1) {
- fCorrectionFile=arr->At(0)->GetName();
+ file=arr->At(0)->GetName();
corrName=arr->At(1)->GetName();
}
delete arr;
TFile f(file.Data());
if (!f.IsOpen()||f.IsZombie()) {
- AliError(Form("Could not open SC file '%s'",file.Data()));
+ printf("E-AliToyMCEventGenerator::Could not open SC file '%s'",file.Data());
return;
}
Bool_t HasSCList() const { return !fSCListFile.IsNull(); }
static Float_t GetSCScalingFactor(AliTPCCorrection *corr, AliTPCCorrection *averageCorr, Float_t &chi2);
+ static void SetCorrectionFromFile(TString file, AliTPCCorrection* &corr);
protected:
AliTPCParam *fTPCParam; //! TPC params
Bool_t fIsLaser; // is a laser event?
Bool_t fPrereadSCList; // preread all SC files from the SC list
- void SetCorrectionFromFile(const TString& file, AliTPCCorrection* &corr);
void InitSpaceChargeList();
void SetSCScalingFactor();