File indexing completed on 2026-04-09 07:49:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "OPTICKS_LOG.hh"
0013 #include "G4CXOpticks.hh"
0014 #include "SEvt.hh"
0015 #include "sstr.h"
0016 #include "ssys.h"
0017
0018 int main(int argc, char** argv)
0019 {
0020 OPTICKS_LOG(argc, argv);
0021
0022 G4CXOpticks::SetGeometry();
0023
0024 LOG(info) << SEvt::Brief() ;
0025
0026 NP* ip = SEvt::GetInputPhoton(0) ;
0027
0028 LOG_IF(error, ip == nullptr) << "SEvt::GetInputPhoton GIVES nullptr : SET OPTICKS_INPUT_PHOTON TO CONFIGURE " ;
0029
0030 const char* id = SEvt::GetFrameId(0) ;
0031 const NP* fr = SEvt::GetFrameArray(0) ;
0032
0033 std::string ip_name = sstr::Format_("ip_%s.npy", ( id ? id : "noid" ) );
0034 std::string fr_name = sstr::Format_("fr_%s.npy", ( id ? id : "noid" ) );
0035
0036 LOG(info)
0037 << " id " << id
0038 << " ip_name " << ip_name
0039 << " fr_name " << fr_name
0040 ;
0041
0042 if(fr) fr->save("$FOLD", fr_name.c_str()) ;
0043 if(ip) ip->save("$FOLD", ip_name.c_str()) ;
0044
0045 return 0 ;
0046 }