Updated AliGenReader and AliGenExtFile to allow for the reader to seed an AliGenEvent...
authorbthorsbr <brian.peter.thorsbro@cern.ch>
Mon, 14 Jul 2014 12:30:37 +0000 (14:30 +0200)
committerhristov <Peter.Hristov@cern.ch>
Fri, 8 Aug 2014 14:37:53 +0000 (16:37 +0200)
EVGEN/AliGenExtFile.cxx
EVGEN/AliGenReader.h

index 17436d5..a32f120 100644 (file)
@@ -199,8 +199,8 @@ void AliGenExtFile::Generate()
     } // track loop
 
     // Generated event header
-    
-    AliGenEventHeader * header = new AliGenEventHeader();
+    AliGenEventHeader * header = fReader->GetGenEventHeader();
+    if (!header) header = new AliGenEventHeader();
     header->SetNProduced(fNprimaries);
     header->SetPrimaryVertex(fVertex);
     header->SetInteractionTime(fTime);
index 1a1bd79..8551dd1 100644 (file)
@@ -10,6 +10,7 @@
 // Author: andreas.morsch@cern.ch
 
 #include "TObject.h"
+#include "AliGenEventHeader.h"
 
 class TParticle;
 class AliRunLoader;
@@ -23,6 +24,7 @@ class AliGenReader : public TObject
     virtual ~AliGenReader(){;}
     virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
     virtual AliRunLoader * GetRunLoader() const {return 0x0;}
+    virtual AliGenEventHeader * GetGenEventHeader() const {return 0x0;}
     virtual void Init()                                                    = 0;
     virtual Int_t NextEvent()                                              = 0;
     virtual TParticle* NextParticle()                                      = 0;