#include #include #include #include "km3net-dataformat/online/JDAQ.hh" #include "JDetector/JDetectorAddressMapToolkit.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to print PMT logical addressing. * \author mdejong */ int main(int argc, char **argv) { using namespace std; int detectorID; int moduleID; int debug; try { JParser<> zap("Example program to print PMT logical addressing."); zap['D'] = make_field(detectorID); zap['M'] = make_field(moduleID) = -1; zap['d'] = make_field(debug) = 0; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } using namespace JPP; if (!hasDetectorAddressMap(detectorID)) { FATAL("No detector address map for detector identifier " << detectorID << endl); } const JDetectorAddressMap& demo = getDetectorAddressMap(detectorID); const JModuleAddressMap& memo = demo.get(moduleID); for (JModuleAddressMap::const_iterator i = memo.begin(); i != memo.end(); ++i) { cout << i->toString("TDC[%] = %%") << endl; } }