File indexing completed on 2026-04-10 07:50:28
0001
0002 #include "OPTICKS_LOG.hh"
0003 #include "sdirect.h"
0004
0005 #ifdef WITH_PMTFASTSIM
0006 #include "DetectorConstruction.hh"
0007 #include "JPMT.h"
0008 #include "PMTAccessor.h"
0009 #endif
0010
0011 int main(int argc, char** argv)
0012 {
0013 OPTICKS_LOG(argc, argv);
0014
0015 #ifdef WITH_PMTFASTSIM
0016
0017 DetectorConstruction* dc = nullptr ;
0018
0019 std::stringstream coutbuf;
0020 std::stringstream cerrbuf;
0021 {
0022 sdirect::cout_ out_(coutbuf.rdbuf());
0023 sdirect::cerr_ err_(cerrbuf.rdbuf());
0024
0025 dc = new DetectorConstruction ;
0026
0027 }
0028 std::string out = coutbuf.str();
0029 std::string err = cerrbuf.str();
0030 bool VERBOSE = getenv("VERBOSE") != nullptr ;
0031 std::cout << sdirect::OutputMessage("DetectorConstruction" , out, err, VERBOSE );
0032
0033
0034 const PMTAccessor* acc = PMTAccessor::Create() ;
0035 LOG(info) << " acc " << acc->desc() ;
0036
0037
0038 #else
0039 LOG(fatal) << "not WITH_PMTFASTSIM : nothing to do " ;
0040 #endif
0041 return 0 ;
0042 }
0043