#include using namespace std; #include "hgeantinit.h" #include "hgeantinput.h" // Global class to store the input read from the initialization-file HGeantInput geantInput; #define NMAXCHAR 200 #define EVMAXFILES 10 struct FILENAM_DEF { int nevfiles; char evfilename[EVMAXFILES][NMAXCHAR]; int ipair[EVMAXFILES]; }; #define GEAEVENT COMMON_BLOCK(GEAEVENT,geaevent) COMMON_BLOCK_DEF(FILENAM_DEF,GEAEVENT); void hgeantinit(char * iniFile, char * mapFile) { TString hIniFile = iniFile; geantInput.iniSourceFile(hIniFile); if (geantInput.readFileNames()) { geantInput.showFileNames(); GEAEVENT.nevfiles=geantInput.getEvNoFiles(); for(int i=0;i 0) { strcpy(mapFile,geantInput.getFieldFileName(0).Data()); // return field-map file name to calling routine } } #ifdef WITHGEANT // wrapping of the c++ routine as Fortran subroutine using cfortran.h // of Cern-library FCALLSCSUB2(hgeantinit,HGEANTINIT,hgeantinit,PSTRING,PSTRING) #endif