// ESAF : Euso Simulation and Analysis Framework // $Id: UnisimFileShowerGenerator.hh,v 1.10 2005/04/21 22:00:48 thea Exp $ // sergio bottai created Jan, 22 2004 #ifndef __UNISIMFILESHOWERGENERATOR_HH_ #define __UNISIMFILESHOWERGENERATOR_HH_ #include "euso.hh" #include "EventGenerator.hh" #include "Config.hh" #include "ShowerTrack.hh" class PhysicsData; class ShowerTrack; class MCTruth; class UnisimFileShowerGenerator : public EventGenerator { public: // ctor UnisimFileShowerGenerator(); // dtor ~UnisimFileShowerGenerator(); // get a new event PhysicsData *Get(); // get pointer to MonteCarlo Truth MCTruth *GetTruth(); virtual void ReplaceInputFile( const char* ); // get ready for next event virtual void Reset() {} //FIXME : to be implemented void Open(); void Close(); EsafConfigClass(Generators, UnisimFileShowerGenerator) private: ShowerTrack *fTrack; ShowerStep fStep; FILE* fFile; MCTruth *fTruth; string fFileName; map fHeader; bool LoadTrack(Int_t) ; bool LoadHeader() ; void LoadTruth(); int fFirstEvent; // this is the first event to read. All previous will be skipped int fCurrentEvent; // this is the current event to read. ClassDef(UnisimFileShowerGenerator,0) }; #endif /* __UNISIMFILESHOWERGENERATOR_HH_ */