// ------------------------------------------------------------------------- // ----- PndBinaryGenerator header file ----- // ----- Created 30/10/08 by Oscar Reinecke ----- // ------------------------------------------------------------------------- /** PndBinaryGenerator.h This generator reads binary event files as described in the source file. These are usually way smaller then ASCII files generated by EvtGen but on the other hand there is no way this could work reliably on every computer. **/ #ifndef PND_BINARYGENERATOR_H #define PND_BINARYGENERATOR_H #include "CbmGenerator.h" #include class TDatabasePDG; class CbmPrimaryGenerator; class PndBinaryGenerator : public CbmGenerator { public: /** Default constructor without arguments should not be used. **/ PndBinaryGenerator(); /** Standard constructor. ** @param fileName The input file name **/ PndBinaryGenerator(const char* fileName, unsigned int firstEntry=0); /** Destructor. **/ virtual ~PndBinaryGenerator(); /** Reads on event from the input file and pushes the tracks onto ** the stack. Abstract method in base class. ** @param primGen pointer to the CbmrimaryGenerator **/ virtual Bool_t ReadEvent(CbmPrimaryGenerator* primGen); private: //ifstream* fInputFile; //! Input file stream const Char_t * fFileName; //! Input file Name FILE *fInputFile; /** Private method CloseInput. Just for convenience. Closes the ** input file properly. Called from destructor and from ReadEvent. **/ void CloseInput(); struct {unsigned char nparticles;} HEAD; struct {int pdgId; float px; float py; float pz; float rx; float ry; float rz;} ENTRY; /** PDG data base */ // TDatabasePDG *fPDG; //! ClassDef(PndBinaryGenerator,1); }; #endif