]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
o mods
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Oct 2013 08:44:34 +0000 (08:44 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Oct 2013 08:44:34 +0000 (08:44 +0000)
TPC/Upgrade/AliToyMCEventGenerator.cxx
TPC/Upgrade/AliToyMCEventGenerator.h

index c2acbcd0f268c0c9acf346c6bbfb371c78295a3a..c0f8bc968e3991a4a386e7c00abc6b9d7ba23573 100644 (file)
@@ -785,7 +785,7 @@ void AliToyMCEventGenerator::SetSCScalingFactor()
 }
 
 //________________________________________________________________
-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
@@ -796,9 +796,9 @@ void AliToyMCEventGenerator::SetCorrectionFromFile(const TString& file, AliTPCCo
   
   // 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;
@@ -806,7 +806,7 @@ void AliToyMCEventGenerator::SetCorrectionFromFile(const TString& file, AliTPCCo
   
   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;
   }
   
index 67d2288ea35f170ace7c8fe6dab16d482c3f357b..4cc296caef3734cac599543e71c9f35cd376ea30 100644 (file)
@@ -83,6 +83,7 @@ class AliToyMCEventGenerator : public TObject {
   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
@@ -114,7 +115,6 @@ class AliToyMCEventGenerator : public TObject {
   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();