43 if (
PMT.find(JDAQPMTIdentifier(hit->getModuleID(), hit->getPMT())) ==
PMT.end() &&
44 PMT.find(JDAQPMTIdentifier(-1, hit->getPMT())) ==
PMT.end()) {
45 buffer.push_back(*hit);
60 int main(
int argc,
char **argv)
64 using namespace KM3NETDAQ;
66 JMultipleFileScanner<JDAQTimesliceTypes_t> inputFile;
74 JParser<> zap(
"Example program to remove PMT(s) from data (and set corresponding rate to 0).");
78 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
84 catch(
const exception& error) {
85 FATAL(error.what() << endl);
94 JObjectMultiplexer<JDAQTimesliceTypes_t, JDAQTimeslice> in(inputFile);
100 JObjectDemultiplexer<JDAQTimeslice, daq_timeslicetypes_t> out(
outputFile);
102 for (
counter_type counter = 0; in.hasNext() && counter != inputFile.getLimit(); ++counter) {
104 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
108 for (JDAQTimeslice::iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
114 if (
PMT.find(JDAQPMTIdentifier(frame->getModuleID(), pmt)) !=
PMT.end() ||
115 PMT.find(JDAQPMTIdentifier(-1, pmt)) !=
PMT.end()) {
125 buffer[hit->getPMT()].push_back(*hit);
132 if (
PMT.find(JDAQPMTIdentifier(frame->getModuleID(), pmt)) ==
PMT.end() &&
133 PMT.find(JDAQPMTIdentifier(-1, pmt)) ==
PMT.end()) {
134 copy(buffer[pmt].begin(), buffer[pmt].end(), back_inserter(data));
138 sort(data.begin(), data.end());
141 frame->add(data.size(), data.data());
150 JMultipleFileScanner<JDAQEvent> in(inputFile);
152 while (in.hasNext()) {
154 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
166 JMultipleFileScanner<JDAQSummaryslice> in(inputFile);
168 while (in.hasNext()) {
170 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
174 for (JDAQSummaryslice::iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
178 if (
PMT.find(JDAQPMTIdentifier(frame->getModuleID(), pmt)) !=
PMT.end() ||
179 PMT.find(JDAQPMTIdentifier(-1, pmt)) !=
PMT.end()) {
180 (*frame)[pmt].setValue(0.0);
190 JMultipleFileScanner<JTriggerParameters> io(inputFile);
Utility class to parse command line options.
Recording of objects on file according a format that follows from the file name extension.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
Empty structure for specification of parser element that is initialised (i.e.
Long64_t counter_type
Type definition for counter.
JLimit JLimit_t
Type definition of limit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
JDAQPMTIdentifier PMT
Command line options.
ROOT TTree parameter settings.
void copy(const Head &from, JHead &to)
Copy header from from to to.
const JLimit & getLimit() const
Get limit.
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])