Go to the documentation of this file. 1 #ifndef __JDAQSUMMARYFRAME__
2 #define __JDAQSUMMARYFRAME__
76 return getValue(numberOfHits * 1.0e9 / frameTime_ns);
91 return std::numeric_limits<JRate_t>::max();
124 else if (
value == std::numeric_limits<JRate_t>::max())
140 return (
int) std::numeric_limits<JRate_t>::max() + 1;
150 static const double*
getData(
const double factor = 1.0)
159 buffer.push_back(
get_rate(i - 0.5) * factor);
164 return buffer.data();
193 void setValue(
const int numberOfHits,
const double frameTime_ns)
370 vector<int> counter(numeric_limits<JPMT_t>::max(), 0);
372 int n = input.
size();
375 ++counter[i->getPMT()];
388 int n = input.
size();
391 if (i->getT() > limit[i->getPMT()]) {
392 limit[i->getPMT()] = i->getT();
399 data[i].
setValue((
double) counter[i] * 1.0e9 / (
double) limit[i]);
456 double getRate(
const int tdc,
const double factor = 1.0)
const
469 double getWeight(
const int tdc,
const double factor = 1.0)
const
481 void setRate(
const int tdc,
const double rate_Hz)
513 if (first[i] != second[i]) {
537 return !(first == second);
Interface for binary input.
bool testHighRateVeto() const
Test high-rate veto status.
JDAQRate & operator[](const int tdc)
Get DAQ rate of given PMT.
static int getN()
Get number of bins.
JDAQSummaryFrame()
Default constructor.
static double getMinimalRate()
Get minimal rate (below this, value is set to zero)
static JRate_t getValue(const double rate_Hz)
Get value.
JDAQSummaryFrame(const JDAQModuleIdentifier &id)
Constructor.
JDAQRate data[NUMBER_OF_PMTS]
static double getWeight(const JRate_t value)
Get weight.
JDAQRate & div(const double factor)
Scale rate.
double getWeight(const int tdc, const double factor=1.0) const
Get weight.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
int getModuleID() const
Get module identifier.
static int ROOT_IO_VERSION
Streamer version of JDAQSummaryslice as obtained from ROOT file.
double getWeight() const
Get weight.
double getFrameTime()
Get frame time duration.
double getRate(const int tdc, const double factor=1.0) const
Get count rate.
static const double * getData(const double factor=1.0)
Get abscissa values.
ClassDefNV(JDAQSummaryFrame, 2)
JDAQFrame::const_iterator const_iterator
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
double getValue(const int tdc) const
Get value.
Data storage class for rate measurements of all PMTs in one module.
static const double getFactor()
Get conversion factor.
static double getRate(const JRate_t value)
Get count rate.
JRate_t getValue() const
Get value.
bool operator!=(const JDAQChronometer &first, const JDAQChronometer &second)
Not-equal operator for DAQ chronometers.
friend JReader & operator>>(JReader &, JDAQSummaryFrame &)
Read DAQ summary frame from input.
JDAQSummaryFrame(const JDAQSuperFrame &input)
Constructor.
Interface for binary output.
unsigned char JPMT_t
PMT channel in FPGA.
JDAQRate()
Default constructor.
Data storage class for rate measurement of one PMT.
bool testFIFOStatus() const
Test FIFO status.
void setValue(const int numberOfHits, const double frameTime_ns)
Set value.
static const JDAQFrameStatus & getInstance()
Get reference to unique instance of this class object.
bool operator==(const JDAQChronometer &first, const JDAQChronometer &second)
Equal operator for DAQ chronometers.
static JRate_t getValue(const int numberOfHits, const double frameTime_ns)
Get value.
friend JWriter & operator<<(JWriter &, const JDAQSummaryFrame &)
Write DAQ summary frame to output.
size_t getSizeof< JDAQSummaryFrame >()
Get size of type.
unsigned int JTDC_t
leading edge [ns]
KM3NeT DAQ data structures and auxiliaries.
Data frame of one optical module.
static double get_rate(const double value)
Get count rate.
void setValue(const double rate_Hz)
Set value.
double getRate() const
Get count rate.
const_iterator begin() const
static double getMaximalRate()
Get maximal rate (above this, value is set to maximum)
const JDAQFrameStatus & getDAQFrameStatus() const
Get DAQ frame status.
const JDAQRate & operator[](const int tdc) const
Get DAQ rate of given PMT.
void setRate(const int tdc, const double rate_Hz)
Set count rate.
JDAQRate::JRate_t JRate_t
JDAQRate & mul(const double factor)
Scale rate.