00001 // $Header: /cvs/lcd/slic/include/StdHepLoader.hh,v 1.15 2007/04/27 01:54:33 jeremy Exp $ 00002 00003 #ifndef slic_StdhepLoader_hh 00004 #define slic_StdhepLoader_hh 1 00005 00006 // slic 00007 #include "Module.hh" 00008 #include "lStdHep.hh" 00009 00010 // std 00011 #include <string> 00012 #include <fstream> 00013 00014 class G4Event; 00015 class G4PrimaryVertex; 00016 class G4PrimaryParticle; 00017 00018 namespace slic 00019 { 00020 enum EErrorCode { eEOF = 106 }; 00021 00026 class StdHepLoader : public Module 00027 { 00028 00029 public: 00030 virtual ~StdHepLoader(); 00031 StdHepLoader(); 00032 00033 public: 00034 00035 const std::string& getFilename() const 00036 { 00037 return m_filename; 00038 } 00039 00040 lStdHep* getStdHepReader() 00041 { 00042 return m_reader; 00043 } 00044 00045 bool isEndOfInput() 00046 { 00047 return m_isEndOfInput; 00048 } 00049 00050 public: 00051 00052 void openStdHepFile(const std::string&); 00053 void openStdHepFile(const char*); 00054 00055 void closeStdHepFile(); 00056 00057 void readNextEvent(); 00058 void dumpCurrentEvent(); 00059 00060 private: 00061 00062 std::string m_filename; 00063 lStdHep* m_reader; 00064 bool m_isEndOfInput; 00065 }; 00066 } 00067 00068 #endif
1.5.4