#include #include #include #include "km3net-dataformat/offline/Head.hh" #include "km3net-dataformat/offline/MultiHead.hh" #include "km3net-dataformat/offline/Evt.hh" #include "JAAnet/JHead.hh" #include "JDAQ/JDAQTimesliceIO.hh" #include "JDAQ/JDAQEventIO.hh" #include "JDAQ/JDAQSummarysliceIO.hh" #include "JTrigger/JTriggerParameters.hh" #include "antares-dataformat/TimeSlice.hh" #include "antares-dataformat/PhysicsEvent.hh" #include "JAcoustics/JToA.hh" #include "JAcoustics/JEvent.hh" #include "JAcoustics/JEvt.hh" #include "JAcoustics/JSuperEvt.hh" #include "JAcoustics/JTriggerParameters.hh" #include "JAcoustics/JFitParameters.hh" #include "JAcoustics/JSupport.hh" #include "JCompass/JEvt.hh" #include "JCompass/JSupport.hh" #include "JSupport/JSupport.hh" #include "JROOT/JRootClass.hh" #include "JROOT/JROOTClassSelector.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" namespace { using namespace JPP; /** * Auxiliary class for printing class information. */ struct JPrinter_t : public JROOTClassSelection { /** * Constructor. * * \param out output stream * \param selection selection */ JPrinter_t(std::ostream& out, const JROOTClassSelection& selection) : JROOTClassSelection(selection), out(out) {} /** * Print class infomration. * * \param type data type * \return this printer */ template void operator()(const JType& type) const { using namespace std; using namespace JPP; if (static_cast(*this)(type)) { JRootClass(type).print(out); } } protected: std::ostream& out; }; } /** * \file * Auxiliary program to print ROOT class information. * * The name of the data structure following option -C should be preceded by a '+' or '-' * to add or remove data types in the output, respectively.\n * In this, ROOT wildcards are accepted (e.g. -C -\\\.\\* will remove all data types). * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; typedef JTYPELIST::typelist typelist; JPrinter_t printer(cout, getROOTClassSelection(true)); int debug; try { JParser<> zap("Auxiliary program to print ROOT class information."); zap['C'] = make_field(printer, "Precede name of data structure by a '+' or '-' " "to add or remove data types in the output, respectively." "\nROOT wildcards are accepted.") = JPARSER::initialised(); zap['d'] = make_field(debug) = 1; zap(argc, argv); } catch(const exception& error) { FATAL(error.what() << endl); } for_each(printer, JType()); }