36 using namespace KM3NETDAQ;
46 JParser<> zap(
"Example program to histogram string and floor rates.");
51 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
56 catch(
const exception& error) {
57 FATAL(error.what() << endl);
83 TProfile2D h2(
"h2", NULL,
84 string.size(), -0.5,
string.size() - 0.5,
85 floor .size(), -0.5, floor .size() - 0.5);
87 for (Int_t i = 1; i <= h2.GetXaxis()->GetNbins(); ++i) {
88 h2.GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
90 for (Int_t i = 1; i <= h2.GetYaxis()->GetNbins(); ++i) {
91 h2.GetYaxis()->SetBinLabel(i,
MAKE_CSTRING(floor .at(i-1)));
94 while (inputFile.hasNext()) {
96 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
100 for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
102 if (router.hasModule(frame->getModuleID())) {
104 const JModule& module = router.getModule(frame->getModuleID());
107 if (!frame->testHighRateVeto(pmt) && !frame->testFIFOStatus(pmt)) {
109 (
double) floor .getIndex(module.
getFloor()),
110 frame->getRate(pmt) * 1.0e-3);
114 FATAL(
"JModuleRouter trying to access non existing identifier: " << frame->getModuleID());
Utility class to parse command line options.
int getFloor() const
Get floor number.
Data structure for a composite optical module.
Router for direct addressing of module data in detector data structure.
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
int getIndex()
Get index for user I/O manipulation.
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
static const int NUMBER_OF_PMTS
Total number of PMTs in module.