#include #include #include #include "JDetector/JPMT.hh" #include "Jeep/JStreamToolkit.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to test PMT status bits. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; int debug; try { JParser<> zap("Example program to test PMT status bits."); zap['d'] = make_field(debug) = 3; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } if (debug >= debug_t) { cout << "PMT status bits: "; writeObject(cout, getPMTStatusBits()) << endl; } JPMT pmt; vector buffer = getPMTStatusBits(); for (vector::const_iterator i = buffer.begin(); i != buffer.end(); ++i) { ASSERT(pmt.has(*i) == false); DEBUG("Set PMT status " << putPMTStatusBit(*i) << endl); pmt.set(*i); ASSERT(pmt.has(*i) == true); } return 0; }