move TVirtualDecayer->Init() to class initializer
authorrbertens <rbertens@cern.ch>
Fri, 26 Sep 2014 12:40:54 +0000 (14:40 +0200)
committerrbertens <rbertens@cern.ch>
Fri, 26 Sep 2014 12:41:30 +0000 (14:41 +0200)
PWG/FLOW/Base/AliFlowOnTheFlyEventGenerator.cxx

index e06ff5a..f0e1402 100644 (file)
@@ -66,6 +66,7 @@ AliFlowOnTheFlyEventGenerator::AliFlowOnTheFlyEventGenerator(Bool_t qa, Int_t ff
         InitGenerators();
     }
     fDecayer = decayer;         // decayer: user has ownership of decayer (see dtor)
+    if(fDecayer) fDecayer->Init();
     fAddV2Mothers = a;
     fAddV3Mothers = b;
     fAddV2Daughters = c; 
@@ -290,7 +291,6 @@ void AliFlowOnTheFlyEventGenerator::DecayOnTheFlyTracks(TClonesArray *event)
 {
     // decay the tracks using a decayer that is set in the GenerateEventsOnTheFly.C macro
     if(!fDecayer) return;       // shouldn't happen ...
-    fDecayer->Init();
     Int_t kf;
     TClonesArray*  arr = new TClonesArray("TParticle",10);
     Int_t secondaries=0;