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 361 of file JDAQSummaryFrame.hh.
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]);
◆ operator[]() [1/2]
const JDAQRate& KM3NETDAQ::JDAQSummaryFrame::operator[] |
( |
const int |
tdc | ) |
const |
|
inline |
◆ operator[]() [2/2]
JDAQRate& KM3NETDAQ::JDAQSummaryFrame::operator[] |
( |
const int |
tdc | ) |
|
|
inline |
◆ 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 456 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 469 of file JDAQSummaryFrame.hh.
◆ setRate()
void KM3NETDAQ::JDAQSummaryFrame::setRate |
( |
const int |
tdc, |
|
|
const double |
rate_Hz |
|
) |
| |
|
inline |
◆ 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 65 of file JDAQFrameStatus.hh.
◆ getDAQFrameStatus()
const JDAQFrameStatus& KM3NETDAQ::JDAQFrameStatus::getDAQFrameStatus |
( |
| ) |
const |
|
inlineinherited |
Get DAQ frame status.
- Returns
- DAQ frame status
Definition at line 80 of file JDAQFrameStatus.hh.
82 return static_cast<const JDAQFrameStatus&>(*
this);
◆ setDAQFrameStatus()
void KM3NETDAQ::JDAQFrameStatus::setDAQFrameStatus |
( |
const JDAQFrameStatus & |
status | ) |
|
|
inlineinherited |
Set DAQ frame status.
- Parameters
-
Definition at line 91 of file JDAQFrameStatus.hh.
93 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 135 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 146 of file JDAQFrameStatus.hh.
◆ getUDPNumberOfReceivedPackets()
int KM3NETDAQ::JDAQFrameStatus::getUDPNumberOfReceivedPackets |
( |
| ) |
const |
|
inlineinherited |
Get number of received UDP packets.
- Returns
- UDP received packets
Definition at line 157 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 168 of file JDAQFrameStatus.hh.
◆ testWhiteRabbitStatus()
bool KM3NETDAQ::JDAQFrameStatus::testWhiteRabbitStatus |
( |
| ) |
const |
|
inlineinherited |
Test White Rabbit status.
- Returns
- true if okay; else false
Definition at line 179 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 201 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 213 of file JDAQFrameStatus.hh.
◆ countHighRateVeto()
int KM3NETDAQ::JDAQFrameStatus::countHighRateVeto |
( |
| ) |
const |
|
inlineinherited |
Count high-rate veto status.
- Returns
- number of the TDCs with high-rate veto
Definition at line 224 of file JDAQFrameStatus.hh.
◆ 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 245 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 257 of file JDAQFrameStatus.hh.
◆ countFIFOStatus()
int KM3NETDAQ::JDAQFrameStatus::countFIFOStatus |
( |
| ) |
const |
|
inlineinherited |
Count FIFO status.
- Returns
- number of the TDCs with FIFO almost full
Definition at line 268 of file JDAQFrameStatus.hh.
◆ 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 287 of file JDAQFrameStatus.hh.
◆ hasUDPTrailer()
bool KM3NETDAQ::JDAQFrameStatus::hasUDPTrailer |
( |
| ) |
const |
|
inlineinherited |
Get UDP trailer status.
- Returns
- true if UDP trailer present; else false
Definition at line 309 of file JDAQFrameStatus.hh.
◆ setHighRateVeto()
void KM3NETDAQ::JDAQFrameStatus::setHighRateVeto |
( |
const int |
tdc, |
|
|
const bool |
value |
|
) |
| |
|
inlineinherited |
◆ ClassDefNV() [3/3]
◆ getSizeof
Definition of method to get size of data type.
This method should be specialised for each desired data type with fixed length.
- Returns
- number of bytes
◆ operator>>
Read DAQ summary frame from input.
- Parameters
-
in | reader |
summary | DAQ summary frame |
- Returns
- reader
Definition at line 37 of file JDAQSummaryFrameIO.hh.
39 in >> static_cast<JDAQModuleIdentifier&>(summary);
40 in >> static_cast<JDAQFrameStatus&> (summary);
◆ operator<<
Write DAQ summary frame to output.
- Parameters
-
out | writer |
summary | DAQ summary frame |
- Returns
- writer
Definition at line 55 of file JDAQSummaryFrameIO.hh.
57 out << static_cast<const JDAQModuleIdentifier&>(summary);
58 out << static_cast<const JDAQFrameStatus&> (summary);
◆ ROOT_IO_VERSION
int KM3NETDAQ::JDAQSummaryFrame::ROOT_IO_VERSION = -1 |
|
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 files:
bool testHighRateVeto() const
Test high-rate veto status.
static const JBits DAQ_UDP_RECEIVED_PACKETS(0, 15)
Mask of UDP received packets.
bool has(const int mask) const
Test bit.
JDAQRate data[NUMBER_OF_PMTS]
static double getWeight(const JRate_t value)
Get weight.
void set(int &mask) const
Set bit in given bit mask.
Auxiliary data structure for single bit.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
int getModuleID() const
Get module identifier.
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.
virtual int write(const char *buffer, const int length)=0
Write byte array.
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.
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.
const_iterator begin() const
const JDAQFrameStatus & getDAQFrameStatus() const
Get DAQ frame status.
static const JBits DAQ_TDC(0, 30)
TDC high-rate veto status.