00001 // 00002 // ******************************************************************** 00003 // * DISCLAIMER * 00004 // * * 00005 // * Neither the authors of this software system, nor their employing * 00006 // * institutes,nor the agencies providing financial support for this * 00007 // * work make any representation or warranty, express or implied, * 00008 // * regarding this software system or assume any liability for its * 00009 // * use. * 00010 // * * 00011 // ******************************************************************** 00012 // 00013 // Implementation of the Decay0 primary generator 00014 // 00015 // History: 00016 // -------- 00017 // 25 Oct 2004 L.Pandola First implementation 00018 // 04 Nov 2004 L.Pandola Accomodated in the MJ structure 00019 00020 #ifndef MaGeDecay0Interface_h 00021 #define MaGeDecay0Interface_h 1 00022 00023 #include <fstream> 00024 #include "globals.hh" 00025 #include "G4VPrimaryGenerator.hh" 00026 00027 class G4PrimaryVertex; 00028 class G4Event; 00029 class MaGeDecay0InterfaceMessenger; 00030 00031 class MaGeDecay0Interface : public G4VPrimaryGenerator 00032 { 00033 public: 00034 MaGeDecay0Interface(G4String fileName); 00035 ~MaGeDecay0Interface(); 00036 //Constructor, fileName is the name of the file with path 00037 00038 void GeneratePrimaryVertex(G4Event* evt); 00039 void OpenFile(); 00040 void ChangeFileName(G4String newFile); 00041 00042 private: 00043 G4String ConvertCodeToName(G4int code); 00044 G4String fFileName; 00045 std::ifstream fInputFile; 00046 MaGeDecay0InterfaceMessenger* fTheMessenger; 00047 00048 }; 00049 #endif