Data storage class for rate measurements of all PMTs in one module.
More...
#include <JDAQSummaryFrame.hh>
Data storage class for rate measurements of all PMTs in one module.
Definition at line 320 of file JDAQSummaryFrame.hh.
◆ JRate_t
◆ JDAQSummaryFrame() [1/3]
KM3NETDAQ::JDAQSummaryFrame::JDAQSummaryFrame |
( |
| ) |
|
|
inline |
◆ JDAQSummaryFrame() [2/3]
◆ JDAQSummaryFrame() [3/3]
KM3NETDAQ::JDAQSummaryFrame::JDAQSummaryFrame |
( |
const JDAQSuperFrame & |
input | ) |
|
|
inline |
Constructor.
Note that normally the rate is set to the number of hits per unit frame time but if either the high-rate veto or FIFO (almost) full bit is on, the rate is set to the number of hits divided by the time of the last hit.
- Parameters
-
Definition at line 358 of file JDAQSummaryFrame.hh.
367 vector<int> counter(numeric_limits<JPMT_t>::max(), 0);
369 int n = input.size();
372 ++counter[i->getPMT()];
379 if (input.testHighRateVeto() || input.testFIFOStatus()) {
385 int n = input.size();
388 if (i->getT() > limit[i->getPMT()]) {
389 limit[i->getPMT()] = i->getT();
394 if (input.testHighRateVeto(i) || input.testFIFOStatus(i)) {
396 data[i].
setValue((
double) counter[i] * 1.0e9 / (
double) limit[i]);
◆ operator[]() [1/2]
const JDAQRate& KM3NETDAQ::JDAQSummaryFrame::operator[] |
( |
const int |
tdc | ) |
const |
|
inline |
Get DAQ rate of given PMT.
- Parameters
-
- Returns
- JDAQRate
Definition at line 410 of file JDAQSummaryFrame.hh.
415 throw JDAQException(
"TDC out of range.");
◆ operator[]() [2/2]
JDAQRate& KM3NETDAQ::JDAQSummaryFrame::operator[] |
( |
const int |
tdc | ) |
|
|
inline |
Get DAQ rate of given PMT.
- Parameters
-
- Returns
- JDAQRate
Definition at line 425 of file JDAQSummaryFrame.hh.
430 throw JDAQException(
"TDC out of range.");
◆ getValue()
double KM3NETDAQ::JDAQSummaryFrame::getValue |
( |
const int |
tdc | ) |
const |
|
inline |
◆ getRate()
double KM3NETDAQ::JDAQSummaryFrame::getRate |
( |
const int |
tdc, |
|
|
const double |
factor = 1.0 |
|
) |
| const |
|
inline |
Get count rate.
- Parameters
-
tdc | TDC |
factor | scaling factor |
- Returns
- rate x scaling factor [Hz]
Definition at line 453 of file JDAQSummaryFrame.hh.
◆ getWeight()
double KM3NETDAQ::JDAQSummaryFrame::getWeight |
( |
const int |
tdc, |
|
|
const double |
factor = 1.0 |
|
) |
| const |
|
inline |
Get weight.
- Parameters
-
tdc | TDC |
factor | scaling factor |
- Returns
- weight / scaling factor [Hz^-1]
Definition at line 466 of file JDAQSummaryFrame.hh.
◆ setRate()
void KM3NETDAQ::JDAQSummaryFrame::setRate |
( |
const int |
tdc, |
|
|
const double |
rate_Hz |
|
) |
| |
|
inline |
◆ sizeOf()
static int KM3NETDAQ::JDAQSummaryFrame::sizeOf |
( |
| ) |
|
|
inlinestatic |
◆ ClassDefNV() [1/3]
◆ getModuleIdentifier()
◆ setModuleIdentifier()
◆ getModuleID()
int KM3NETDAQ::JDAQModuleIdentifier::getModuleID |
( |
| ) |
const |
|
inlineinherited |
◆ ClassDefNV() [2/3]
◆ getInstance()
Get reference to unique instance of this class object.
This instance has default values which correspond to a valid DAQ frame status.
- Returns
- reference to this class object
Definition at line 66 of file JDAQFrameStatus.hh.
◆ getDAQFrameStatus()
const JDAQFrameStatus& KM3NETDAQ::JDAQFrameStatus::getDAQFrameStatus |
( |
| ) |
const |
|
inlineinherited |
Get DAQ frame status.
- Returns
- DAQ frame status
Definition at line 81 of file JDAQFrameStatus.hh.
83 return static_cast<const JDAQFrameStatus&>(*
this);
◆ setDAQFrameStatus()
void KM3NETDAQ::JDAQFrameStatus::setDAQFrameStatus |
( |
const JDAQFrameStatus & |
status | ) |
|
|
inlineinherited |
Set DAQ frame status.
- Parameters
-
Definition at line 92 of file JDAQFrameStatus.hh.
94 static_cast<JDAQFrameStatus&>(*
this) =
status;
◆ getDAQStatus()
int KM3NETDAQ::JDAQFrameStatus::getDAQStatus |
( |
| ) |
const |
|
inlineinherited |
◆ getStatus()
int KM3NETDAQ::JDAQFrameStatus::getStatus |
( |
| ) |
const |
|
inlineinherited |
◆ getFIFOStatus()
int KM3NETDAQ::JDAQFrameStatus::getFIFOStatus |
( |
| ) |
const |
|
inlineinherited |
◆ testDAQStatus()
bool KM3NETDAQ::JDAQFrameStatus::testDAQStatus |
( |
| ) |
const |
|
inlineinherited |
Test DAQ status of packets.
- Returns
- true if okay; else false
Definition at line 136 of file JDAQFrameStatus.hh.
◆ testStatus()
bool KM3NETDAQ::JDAQFrameStatus::testStatus |
( |
| ) |
const |
|
inlineinherited |
Test TDC and White Rabbit status.
- Returns
- true if okay; else false
Definition at line 147 of file JDAQFrameStatus.hh.
◆ getUDPNumberOfReceivedPackets()
int KM3NETDAQ::JDAQFrameStatus::getUDPNumberOfReceivedPackets |
( |
| ) |
const |
|
inlineinherited |
Get number of received UDP packets.
- Returns
- UDP received packets
Definition at line 158 of file JDAQFrameStatus.hh.
◆ getUDPMaximalSequenceNumber()
int KM3NETDAQ::JDAQFrameStatus::getUDPMaximalSequenceNumber |
( |
| ) |
const |
|
inlineinherited |
Get maximal sequence number of UDP packet.
- Returns
- UDP sequence number
Definition at line 169 of file JDAQFrameStatus.hh.
◆ testWhiteRabbitStatus()
bool KM3NETDAQ::JDAQFrameStatus::testWhiteRabbitStatus |
( |
| ) |
const |
|
inlineinherited |
Test White Rabbit status.
- Returns
- true if okay; else false
Definition at line 180 of file JDAQFrameStatus.hh.
◆ testTDCStatus()
bool KM3NETDAQ::JDAQFrameStatus::testTDCStatus |
( |
| ) |
const |
|
inlineinherited |
◆ testHighRateVeto() [1/2]
bool KM3NETDAQ::JDAQFrameStatus::testHighRateVeto |
( |
| ) |
const |
|
inlineinherited |
Test high-rate veto status.
- Returns
- true if one of the TDCs is high-rate vetoed; else false
Definition at line 202 of file JDAQFrameStatus.hh.
◆ testHighRateVeto() [2/2]
bool KM3NETDAQ::JDAQFrameStatus::testHighRateVeto |
( |
const int |
tdc | ) |
const |
|
inlineinherited |
Test high-rate veto status.
- Parameters
-
- Returns
- true if TDC is high-rate vetoed; else false
Definition at line 214 of file JDAQFrameStatus.hh.
216 return JBit(tdc).has(this->
status);
◆ countHighRateVeto()
int KM3NETDAQ::JDAQFrameStatus::countHighRateVeto |
( |
| ) |
const |
|
inlineinherited |
Count high-rate veto status.
- Returns
- number of the TDCs with high-rate veto
Definition at line 225 of file JDAQFrameStatus.hh.
231 if (JBit(pmt).has(this->
status)) {
◆ testFIFOStatus() [1/2]
bool KM3NETDAQ::JDAQFrameStatus::testFIFOStatus |
( |
| ) |
const |
|
inlineinherited |
Test FIFO status.
- Returns
- true if one of the TDCs has FIFO almost full; else false
Definition at line 246 of file JDAQFrameStatus.hh.
◆ testFIFOStatus() [2/2]
bool KM3NETDAQ::JDAQFrameStatus::testFIFOStatus |
( |
const int |
tdc | ) |
const |
|
inlineinherited |
Test FIFO status.
- Parameters
-
- Returns
- true if FIFO is almost full; else false
Definition at line 258 of file JDAQFrameStatus.hh.
260 return JBit(tdc).has(this->
fifo);
◆ countFIFOStatus()
int KM3NETDAQ::JDAQFrameStatus::countFIFOStatus |
( |
| ) |
const |
|
inlineinherited |
Count FIFO status.
- Returns
- number of the TDCs with FIFO almost full
Definition at line 269 of file JDAQFrameStatus.hh.
275 if (JBit(pmt).has(this->
fifo)) {
◆ countActiveChannels()
int KM3NETDAQ::JDAQFrameStatus::countActiveChannels |
( |
| ) |
const |
|
inlineinherited |
Count active channels.
- Returns
- number of TDCs without high rate veto or FIFO almost full
Definition at line 288 of file JDAQFrameStatus.hh.
294 if ( JBit(pmt).has(this->
status) || JBit(pmt).has(this->
fifo) ) {
◆ hasUDPTrailer()
bool KM3NETDAQ::JDAQFrameStatus::hasUDPTrailer |
( |
| ) |
const |
|
inlineinherited |
Get UDP trailer status.
- Returns
- true if UDP trailer present; else false
Definition at line 310 of file JDAQFrameStatus.hh.
◆ setHighRateVeto()
void KM3NETDAQ::JDAQFrameStatus::setHighRateVeto |
( |
const int |
tdc, |
|
|
const bool |
value |
|
) |
| |
|
inlineinherited |
◆ ClassDefNV() [3/3]
◆ operator>>
Read DAQ summary frame from input.
- Parameters
-
- Returns
- JReader
Definition at line 491 of file JDAQSummaryFrame.hh.
493 in >> static_cast<JDAQModuleIdentifier&>(summary);
494 in >> static_cast<JDAQFrameStatus&> (summary);
◆ operator<<
Write DAQ summary frame to output.
- Parameters
-
out | JWriter |
summary | DAQSummaryFrame |
- Returns
- JWriter
Definition at line 509 of file JDAQSummaryFrame.hh.
511 out << static_cast<const JDAQModuleIdentifier&>(summary);
512 out << static_cast<const JDAQFrameStatus&> (summary);
◆ ROOT_IO_VERSION
int KM3NETDAQ::JDAQSummaryFrame::ROOT_IO_VERSION |
|
static |
◆ data
◆ id
int KM3NETDAQ::JDAQModuleIdentifier::id |
|
protectedinherited |
◆ daq
int KM3NETDAQ::JDAQFrameStatus::daq |
|
protectedinherited |
◆ status
int KM3NETDAQ::JDAQFrameStatus::status |
|
protectedinherited |
◆ fifo
int KM3NETDAQ::JDAQFrameStatus::fifo |
|
protectedinherited |
◆ status_3
int KM3NETDAQ::JDAQFrameStatus::status_3 |
|
protectedinherited |
◆ status_4
int KM3NETDAQ::JDAQFrameStatus::status_4 |
|
protectedinherited |
The documentation for this class was generated from the following file:
bool testHighRateVeto() const
Test high-rate veto status.
static const JBits DAQ_UDP_RECEIVED_PACKETS(0, 15)
Mask of UDP received packets.
static int sizeOf()
Get size of object.
bool has(const int mask) const
Test bit.
JDAQRate data[NUMBER_OF_PMTS]
static double getWeight(const JRate_t value)
Get weight.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
static const JBit DAQ_UDP_TRAILER(31)
UDP trailer.
int getUDPMaximalSequenceNumber() const
Get maximal sequence number of UDP packet.
double getFrameTime()
Get frame time duration.
JDAQFrameStatus()
Default constructor.
JDAQFrame::const_iterator const_iterator
bool hasUDPTrailer() const
Get UDP trailer status.
static double getRate(const JRate_t value)
Get count rate.
int getUDPNumberOfReceivedPackets() const
Get number of received UDP packets.
unsigned char JPMT_t
PMT channel in FPGA.
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.
int write(const int value) const
Write given value as bit mask.
static JRate_t getValue(const int numberOfHits, const double frameTime_ns)
Get value.
JDAQModuleIdentifier()
Default constructor.
int write(const int value) const
Write given value as bit mask.
static const JBit DAQ_WHITE_RABBIT(31)
White Rabbit status.
static const JBits DAQ_UDP_SEQUENCE_NUMBER(16, 31)
Mask of UDP sequence number.
unsigned int JTDC_t
leading edge [ns]
bool testTDCStatus() const
Test TDC status.
int read(const int mask) const
Read given bit mask as value.
static int sizeOf()
Get size of object.
bool has(const int mask) const
Test bit mask.
static const JBits DAQ_FIFO(0, 30)
FIFO almost full bits.
bool testWhiteRabbitStatus() const
Test White Rabbit status.
static const JBits DAQ_TDC(0, 30)
TDC high-rate veto status.
JDAQRate::JRate_t JRate_t