File indexing completed on 2025-01-18 09:14:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "JSON/Elements.h"
0016 #include "JSON/DocumentHandler.h"
0017 #include "DD4hep/Printout.h"
0018 #include "DD4hep/Factories.h"
0019
0020 using namespace dd4hep;
0021
0022 static long json_dump(Detector& , int argc, char** argv) {
0023 if ( argc < 1 ) {
0024 ::printf("DD4hep_JsonDumper <file> \n");
0025 exit(EINVAL);
0026 }
0027 std::string fname = argv[0];
0028 json::DocumentHolder doc(json::DocumentHandler().load(fname));
0029 dumpTree(doc.root());
0030 printout(INFO,"JsonDumper","+++ Successfully dumped json input: %s.",fname.c_str());
0031 return 1;
0032 }
0033 DECLARE_APPLY(DD4hep_JsonDumper,json_dump)