Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
KM3NETDAQ::JDAQSuperFrameHeader Class Reference

DAQ super frame header. More...

#include <JDAQSuperFrameHeader.hh>

Inheritance diagram for KM3NETDAQ::JDAQSuperFrameHeader:
KM3NETDAQ::JDAQHeader KM3NETDAQ::JDAQModuleIdentifier KM3NETDAQ::JDAQFrameStatus KM3NETDAQ::JDAQChronometer KM3NETDAQ::JDAQSuperFrame

Public Member Functions

 JDAQSuperFrameHeader ()
 Default constructor.
 
 JDAQSuperFrameHeader (const JDAQChronometer &chronometer, const int id)
 Constructor.
 
 JDAQSuperFrameHeader (const JDAQChronometer &chronometer, const int id, const JDAQFrameStatus &status)
 Constructor.
 
const JDAQSuperFrameHeadergetDAQSuperFrameHeader () const
 Get DAQ super frame header.
 
void setDAQSuperFrameHeader (const JDAQSuperFrameHeader &header)
 Set DAQ super frame header.
 
 ClassDef (JDAQSuperFrameHeader, 2)
 
const JDAQHeadergetDAQHeader () const
 Get DAQ header.
 
void setDAQHeader (const JDAQHeader &header)
 Set DAQ header.
 
 ClassDef (JDAQHeader, 2)
 
 ClassDef (JDAQChronometer, 3)
 
const JDAQChronometergetDAQChronometer () const
 Get DAQ chronometer.
 
void setDAQChronometer (const JDAQChronometer &chronometer)
 Set DAQ chronometer.
 
int getDetectorID () const
 Get detector identifier.
 
int getRunNumber () const
 Get run number.
 
int getFrameIndex () const
 Get frame index.
 
JDAQUTCExtended getTimesliceStart () const
 Get start of timeslice.
 
void setRunNumber (const int run)
 Set run number.
 
void setFrameIndex (const int frame_index)
 Set frame index.
 
void setTimesliceStart (const JDAQUTCExtended &timeslice_start)
 Set timeslice start time.
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier.
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier.
 
int getModuleID () const
 Get module identifier.
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 
const JDAQFrameStatusgetDAQFrameStatus () const
 Get DAQ frame status.
 
void setDAQFrameStatus (const JDAQFrameStatus &status)
 Set DAQ frame status.
 
int getDAQStatus () const
 Get DAQ status.
 
int getStatus () const
 Get TDC and White Rabbit status.
 
int getFIFOStatus () const
 Get FIFO status.
 
bool testDAQStatus () const
 Test DAQ status of packets.
 
bool testStatus () const
 Test TDC and White Rabbit status.
 
int getUDPNumberOfReceivedPackets () const
 Get number of received UDP packets.
 
int getUDPMaximalSequenceNumber () const
 Get maximal sequence number of UDP packet.
 
bool testWhiteRabbitStatus () const
 Test White Rabbit status.
 
bool testTDCStatus () const
 Test TDC status.
 
bool testHighRateVeto () const
 Test high-rate veto status.
 
bool testHighRateVeto (const int tdc) const
 Test high-rate veto status.
 
int countHighRateVeto () const
 Count high-rate veto status.
 
bool testFIFOStatus () const
 Test FIFO status.
 
bool testFIFOStatus (const int tdc) const
 Test FIFO status.
 
int countFIFOStatus () const
 Count FIFO status.
 
int countActiveChannels () const
 Count active channels.
 
bool hasUDPTrailer () const
 Get UDP trailer status.
 
void setHighRateVeto (const int tdc, const bool value)
 Set high-rate veto.
 
 ClassDefNV (JDAQFrameStatus, 1)
 

Static Public Member Functions

static const JDAQFrameStatusgetInstance ()
 Get reference to unique instance of this class object.
 

Protected Attributes

int detector_id
 
int run
 
int frame_index
 
JDAQUTCExtended timeslice_start
 
int id
 
int daq
 
int status
 
int fifo
 
int status_3
 
int status_4
 

Friends

size_t getSizeof ()
 Definition of method to get size of data type.
 
JReaderoperator>> (JReader &in, JDAQSuperFrameHeader &header)
 Read DAQ super frame header from input.
 
JWriteroperator<< (JWriter &out, const JDAQSuperFrameHeader &header)
 Write DAQ super frame header to output.
 

Detailed Description

DAQ super frame header.

Definition at line 19 of file JDAQSuperFrameHeader.hh.

Constructor & Destructor Documentation

◆ JDAQSuperFrameHeader() [1/3]

KM3NETDAQ::JDAQSuperFrameHeader::JDAQSuperFrameHeader ( )
inline

Default constructor.

Definition at line 33 of file JDAQSuperFrameHeader.hh.

33 :
34 JDAQHeader (),
37 {}
JDAQFrameStatus()
Default constructor.
JDAQHeader()
Default constructor.
Definition JDAQHeader.hh:29
JDAQModuleIdentifier()
Default constructor.

◆ JDAQSuperFrameHeader() [2/3]

KM3NETDAQ::JDAQSuperFrameHeader::JDAQSuperFrameHeader ( const JDAQChronometer & chronometer,
const int id )
inline

Constructor.

Parameters
chronometerchronometer
idmodule identifier

Definition at line 46 of file JDAQSuperFrameHeader.hh.

47 :
48 JDAQHeader (chronometer),
51 {}
static const JDAQFrameStatus & getInstance()
Get reference to unique instance of this class object.

◆ JDAQSuperFrameHeader() [3/3]

KM3NETDAQ::JDAQSuperFrameHeader::JDAQSuperFrameHeader ( const JDAQChronometer & chronometer,
const int id,
const JDAQFrameStatus & status )
inline

Constructor.

Parameters
chronometerchronometer
idmodule identifier
statusframe status

Definition at line 61 of file JDAQSuperFrameHeader.hh.

Member Function Documentation

◆ getDAQSuperFrameHeader()

const JDAQSuperFrameHeader & KM3NETDAQ::JDAQSuperFrameHeader::getDAQSuperFrameHeader ( ) const
inline

Get DAQ super frame header.

Returns
DAQ super frame header

Definition at line 75 of file JDAQSuperFrameHeader.hh.

76 {
77 return static_cast<const JDAQSuperFrameHeader&>(*this);
78 }

◆ setDAQSuperFrameHeader()

void KM3NETDAQ::JDAQSuperFrameHeader::setDAQSuperFrameHeader ( const JDAQSuperFrameHeader & header)
inline

Set DAQ super frame header.

Parameters
headerDAQ super frame header

Definition at line 86 of file JDAQSuperFrameHeader.hh.

87 {
88 static_cast<JDAQSuperFrameHeader&>(*this) = header;
89 }

◆ ClassDef() [1/3]

KM3NETDAQ::JDAQSuperFrameHeader::ClassDef ( JDAQSuperFrameHeader ,
2  )

◆ getDAQHeader()

const JDAQHeader & KM3NETDAQ::JDAQHeader::getDAQHeader ( ) const
inlineinherited

Get DAQ header.

Returns
DAQ header

Definition at line 49 of file JDAQHeader.hh.

50 {
51 return static_cast<const JDAQHeader&>(*this);
52 }

◆ setDAQHeader()

void KM3NETDAQ::JDAQHeader::setDAQHeader ( const JDAQHeader & header)
inlineinherited

Set DAQ header.

Parameters
headerDAQ header

Definition at line 60 of file JDAQHeader.hh.

61 {
62 static_cast<JDAQHeader&>(*this) = header;
63 }

◆ ClassDef() [2/3]

KM3NETDAQ::JDAQHeader::ClassDef ( JDAQHeader ,
2  )
inherited

◆ ClassDef() [3/3]

KM3NETDAQ::JDAQChronometer::ClassDef ( JDAQChronometer ,
3  )
inherited

◆ getDAQChronometer()

const JDAQChronometer & KM3NETDAQ::JDAQChronometer::getDAQChronometer ( ) const
inlineinherited

Get DAQ chronometer.

Returns
DAQ chronometer

Definition at line 88 of file JDAQChronometer.hh.

89 {
90 return static_cast<const JDAQChronometer&>(*this);
91 }

◆ setDAQChronometer()

void KM3NETDAQ::JDAQChronometer::setDAQChronometer ( const JDAQChronometer & chronometer)
inlineinherited

Set DAQ chronometer.

Parameters
chronometerDAQ chronometer

Definition at line 99 of file JDAQChronometer.hh.

100 {
101 static_cast<JDAQChronometer&>(*this) = chronometer;
102 }

◆ getDetectorID()

int KM3NETDAQ::JDAQChronometer::getDetectorID ( ) const
inlineinherited

Get detector identifier.

Returns
detector identifier

Definition at line 110 of file JDAQChronometer.hh.

111 {
112 return detector_id;
113 }

◆ getRunNumber()

int KM3NETDAQ::JDAQChronometer::getRunNumber ( ) const
inlineinherited

Get run number.

Returns
run number

Definition at line 121 of file JDAQChronometer.hh.

122 {
123 return run;
124 }

◆ getFrameIndex()

int KM3NETDAQ::JDAQChronometer::getFrameIndex ( ) const
inlineinherited

Get frame index.

Returns
frame index

Definition at line 132 of file JDAQChronometer.hh.

133 {
134 return frame_index;
135 }

◆ getTimesliceStart()

JDAQUTCExtended KM3NETDAQ::JDAQChronometer::getTimesliceStart ( ) const
inlineinherited

Get start of timeslice.

Returns
timeslice start

Definition at line 144 of file JDAQChronometer.hh.

145 {
146 return timeslice_start;
147 }

◆ setRunNumber()

void KM3NETDAQ::JDAQChronometer::setRunNumber ( const int run)
inlineinherited

Set run number.

Parameters
runrun number

Definition at line 155 of file JDAQChronometer.hh.

156 {
157 this->run = run;
158 }

◆ setFrameIndex()

void KM3NETDAQ::JDAQChronometer::setFrameIndex ( const int frame_index)
inlineinherited

Set frame index.

Parameters
frame_indexframe index

Definition at line 166 of file JDAQChronometer.hh.

167 {
168 this->frame_index = frame_index;
169 }

◆ setTimesliceStart()

void KM3NETDAQ::JDAQChronometer::setTimesliceStart ( const JDAQUTCExtended & timeslice_start)
inlineinherited

Set timeslice start time.

Parameters
timeslice_starttimeslice start time

Definition at line 177 of file JDAQChronometer.hh.

178 {
179 this->timeslice_start = timeslice_start;
180 }

◆ getModuleIdentifier()

const JDAQModuleIdentifier & KM3NETDAQ::JDAQModuleIdentifier::getModuleIdentifier ( ) const
inlineinherited

Get Module identifier.

Returns
Module identifier

Definition at line 50 of file JDAQModuleIdentifier.hh.

51 {
52 return *this;
53 }

◆ setModuleIdentifier()

void KM3NETDAQ::JDAQModuleIdentifier::setModuleIdentifier ( const JDAQModuleIdentifier & module)
inlineinherited

Set Module identifier.

Parameters
moduleModule identifier

Definition at line 61 of file JDAQModuleIdentifier.hh.

62 {
63 *this = module;
64 }

◆ getModuleID()

int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

◆ ClassDefNV() [1/2]

KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier ,
1  )
inherited

◆ getInstance()

static const JDAQFrameStatus & KM3NETDAQ::JDAQFrameStatus::getInstance ( )
inlinestaticinherited

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.

66 {
70
71 return status;
72 }
static const JBits DAQ_UDP_RECEIVED_PACKETS(0, 15)
Mask of UDP received packets.
static const JBits DAQ_UDP_SEQUENCE_NUMBER(16, 31)
Mask of UDP sequence number.
static const JBits DAQ_FIFO(0, 30)
FIFO almost full bits.
static const JBit DAQ_WHITE_RABBIT(31)
White Rabbit status.
static const JBit DAQ_UDP_TRAILER(31)
UDP trailer.
int write(const int value) const
Write given value as bit mask.
Definition JDAQ.hh:115
int write(const int value) const
Write given value as bit mask.
Definition JDAQ.hh:238

◆ getDAQFrameStatus()

const JDAQFrameStatus & KM3NETDAQ::JDAQFrameStatus::getDAQFrameStatus ( ) const
inlineinherited

Get DAQ frame status.

Returns
DAQ frame status

Definition at line 80 of file JDAQFrameStatus.hh.

81 {
82 return static_cast<const JDAQFrameStatus&>(*this);
83 }

◆ setDAQFrameStatus()

void KM3NETDAQ::JDAQFrameStatus::setDAQFrameStatus ( const JDAQFrameStatus & status)
inlineinherited

Set DAQ frame status.

Parameters
statusDAQ frame status

Definition at line 91 of file JDAQFrameStatus.hh.

92 {
93 static_cast<JDAQFrameStatus&>(*this) = status;
94 }

◆ getDAQStatus()

int KM3NETDAQ::JDAQFrameStatus::getDAQStatus ( ) const
inlineinherited

Get DAQ status.

Returns
DAQ status

Definition at line 102 of file JDAQFrameStatus.hh.

103 {
104 return this->daq;
105 }

◆ getStatus()

int KM3NETDAQ::JDAQFrameStatus::getStatus ( ) const
inlineinherited

Get TDC and White Rabbit status.

Returns
status

Definition at line 113 of file JDAQFrameStatus.hh.

114 {
115 return this->status;
116 }

◆ getFIFOStatus()

int KM3NETDAQ::JDAQFrameStatus::getFIFOStatus ( ) const
inlineinherited

Get FIFO status.

Returns
FIFO status

Definition at line 124 of file JDAQFrameStatus.hh.

125 {
126 return this->fifo;
127 }

◆ 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.

136 {
138 }
int getUDPNumberOfReceivedPackets() const
Get number of received UDP packets.
bool hasUDPTrailer() const
Get UDP trailer status.
int getUDPMaximalSequenceNumber() const
Get maximal sequence number of UDP packet.

◆ 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.

147 {
149 }
bool testTDCStatus() const
Test TDC status.
bool testWhiteRabbitStatus() const
Test White Rabbit status.

◆ 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.

158 {
159 return DAQ_UDP_RECEIVED_PACKETS.read(this->daq);
160 }
int read(const int mask) const
Read given bit mask as value.
Definition JDAQ.hh:250

◆ 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.

169 {
170 return DAQ_UDP_SEQUENCE_NUMBER.read(this->daq);
171 }

◆ 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.

180 {
181 return DAQ_WHITE_RABBIT.has(this->status);
182 }
bool has(const int mask) const
Test bit.
Definition JDAQ.hh:139

◆ testTDCStatus()

bool KM3NETDAQ::JDAQFrameStatus::testTDCStatus ( ) const
inlineinherited

Test TDC status.

Returns
true if okay; else false

Definition at line 190 of file JDAQFrameStatus.hh.

191 {
192 return !testHighRateVeto();
193 }
bool testHighRateVeto() const
Test high-rate veto status.

◆ 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.

202 {
203 return DAQ_TDC.has(this->status);
204 }
static const JBits DAQ_TDC(0, 30)
TDC high-rate veto status.
bool has(const int mask) const
Test bit mask.
Definition JDAQ.hh:262

◆ testHighRateVeto() [2/2]

bool KM3NETDAQ::JDAQFrameStatus::testHighRateVeto ( const int tdc) const
inlineinherited

Test high-rate veto status.

Parameters
tdcTDC
Returns
true if TDC is high-rate vetoed; else false

Definition at line 213 of file JDAQFrameStatus.hh.

214 {
215 return JBit(tdc).has(this->status);
216 }
Auxiliary data structure for single bit.
Definition JDAQ.hh:36

◆ 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.

225 {
226 int n = 0;
227
228 if (testHighRateVeto()) {
229 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
230 if (JBit(pmt).has(this->status)) {
231 ++n;
232 }
233 }
234 }
235
236 return n;
237 }
const int n
Definition JPolint.hh:791
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition JDAQ.hh:26

◆ 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.

246 {
247 return DAQ_FIFO.has(this->fifo);
248 }

◆ testFIFOStatus() [2/2]

bool KM3NETDAQ::JDAQFrameStatus::testFIFOStatus ( const int tdc) const
inlineinherited

Test FIFO status.

Parameters
tdcTDC
Returns
true if FIFO is almost full; else false

Definition at line 257 of file JDAQFrameStatus.hh.

258 {
259 return JBit(tdc).has(this->fifo);
260 }

◆ 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.

269 {
270 int n = 0;
271
272 if (testFIFOStatus()) {
273 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
274 if (JBit(pmt).has(this->fifo)) {
275 ++n;
276 }
277 }
278 }
279
280 return n;
281 }
bool testFIFOStatus() const
Test FIFO status.

◆ 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.

288 {
289 int n = NUMBER_OF_PMTS;
290
291 if (testHighRateVeto() || testFIFOStatus()) {
292 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
293 if ( JBit(pmt).has(this->status) || JBit(pmt).has(this->fifo) ) {
294 --n;
295 }
296 }
297 }
298
299 return n;
300
301 }

◆ 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.

310 {
311 return DAQ_UDP_TRAILER.has(this->fifo);
312 }

◆ setHighRateVeto()

void KM3NETDAQ::JDAQFrameStatus::setHighRateVeto ( const int tdc,
const bool value )
inlineinherited

Set high-rate veto.

Parameters
tdcTDC
valuevalue

Definition at line 321 of file JDAQFrameStatus.hh.

322 {
323 JBit(tdc).set(this->status, value);
324 }
void set(int &mask) const
Set bit in given bit mask.
Definition JDAQ.hh:77

◆ ClassDefNV() [2/2]

KM3NETDAQ::JDAQFrameStatus::ClassDefNV ( JDAQFrameStatus ,
1  )
inherited

Friends And Related Symbol Documentation

◆ getSizeof

size_t getSizeof ( )
friend

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>>

JReader & operator>> ( JReader & in,
JDAQSuperFrameHeader & header )
friend

Read DAQ super frame header from input.

Parameters
inreader
headerDAQ super frame header
Returns
reader

Definition at line 39 of file JDAQSuperFrameHeaderIO.hh.

40 {
41 in >> static_cast<JDAQHeader&> (header);
42 in >> static_cast<JDAQModuleIdentifier&>(header);
43 in >> static_cast<JDAQFrameStatus&> (header);
44
45 return in;
46 }

◆ operator<<

JWriter & operator<< ( JWriter & out,
const JDAQSuperFrameHeader & header )
friend

Write DAQ super frame header to output.

Parameters
outwriter
headerDAQ supe frame header
Returns
writer

Definition at line 56 of file JDAQSuperFrameHeaderIO.hh.

57 {
58 out << static_cast<const JDAQHeader&> (header);
59 out << static_cast<const JDAQModuleIdentifier&>(header);
60 out << static_cast<const JDAQFrameStatus&> (header);
61
62 return out;
63 }

Member Data Documentation

◆ detector_id

int KM3NETDAQ::JDAQChronometer::detector_id
protectedinherited

Definition at line 187 of file JDAQChronometer.hh.

◆ run

int KM3NETDAQ::JDAQChronometer::run
protectedinherited

Definition at line 188 of file JDAQChronometer.hh.

◆ frame_index

int KM3NETDAQ::JDAQChronometer::frame_index
protectedinherited

Definition at line 189 of file JDAQChronometer.hh.

◆ timeslice_start

JDAQUTCExtended KM3NETDAQ::JDAQChronometer::timeslice_start
protectedinherited

Definition at line 190 of file JDAQChronometer.hh.

◆ id

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 112 of file JDAQModuleIdentifier.hh.

◆ daq

int KM3NETDAQ::JDAQFrameStatus::daq
protectedinherited

Definition at line 330 of file JDAQFrameStatus.hh.

◆ status

int KM3NETDAQ::JDAQFrameStatus::status
protectedinherited

Definition at line 331 of file JDAQFrameStatus.hh.

◆ fifo

int KM3NETDAQ::JDAQFrameStatus::fifo
protectedinherited

Definition at line 332 of file JDAQFrameStatus.hh.

◆ status_3

int KM3NETDAQ::JDAQFrameStatus::status_3
protectedinherited

Definition at line 333 of file JDAQFrameStatus.hh.

◆ status_4

int KM3NETDAQ::JDAQFrameStatus::status_4
protectedinherited

Definition at line 334 of file JDAQFrameStatus.hh.


The documentation for this class was generated from the following file: