Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions | Variables
KM3NETDAQ Namespace Reference

KM3NeT DAQ data structures and auxiliaries. More...

Classes

class  DataQueue
 
struct  JBit
 Auxiliary data structure for single bit. More...
 
struct  JBits
 Auxiliary data structure for range of bits. More...
 
class  JDAQAbstractPreamble
 Simple datastructure for the DAQ preamble without ROOT functionality. More...
 
class  JDAQChronometer
 DAQ chronometer. More...
 
class  JDAQClock
 Auxiliary class to set DAQ system clock parameters. More...
 
struct  JDAQType
 Auxiliary class for a DAQ type holder. More...
 
struct  JDAQEvaluator
 Auxiliary class to determine value of DAQ objects. More...
 
class  JDAQEvent
 DAQ Event. More...
 
class  JDAQEventHeader
 JDAQ event header. More...
 
class  JDAQException
 General exception. More...
 
class  JDAQFrameSubset
 Subset of data frame. More...
 
class  JDAQFrame
 Data frame. More...
 
class  JDAQFrameStatus
 DAQ frame status. More...
 
class  JDAQHeader
 DAQ header. More...
 
class  JDAQHit
 Hit data structure. More...
 
class  JDAQKeyHit
 DAQ key hit. More...
 
class  JDAQModuleIdentifier
 Module identifier. More...
 
struct  JDAQModuleComparator
 Auxiliary class to compare modules. More...
 
class  JDAQPMTIdentifier
 PMT identifier. More...
 
class  JDAQPreamble
 DAQ preamble. More...
 
class  JDAQRate
 Data storage class for rate measurement of one PMT. More...
 
class  JDAQSummaryFrame
 Data storage class for rate measurements of all PMTs in one module. More...
 
class  JDAQSummaryslice
 Data summary slice. More...
 
class  JDAQSummarysliceHeader
 JDAQ summaryslice header. More...
 
class  JDAQSuperFrame
 Data frame of one optical module. More...
 
class  JDAQSuperFrameHeader
 DAQ super frame header. More...
 
class  JDAQTimeslice
 Data time slice. More...
 
struct  JDAQTimesliceL0
 Timeslice data structure for L0 data. More...
 
struct  JDAQTimesliceL1
 Timeslice data structure for L1 data. More...
 
struct  JDAQTimesliceL2
 Timeslice data structure for L2 data. More...
 
struct  JDAQTimesliceSN
 Timeslice data structure for SN data. More...
 
class  JDAQTimesliceHeader
 JDAQ timeslice header. More...
 
class  JDAQTriggerCounter
 Auxiliary class to count triggers. More...
 
class  JDAQTriggeredHit
 DAQ triggered hit. More...
 
class  JDAQTriggerMask
 Auxiliary class for trigger mask. More...
 
class  JDAQUTCExtended
 Data structure for UTC time. More...
 
class  JSource
 Data structure for configuration of JDOMSimulator. More...
 
class  JTarget
 Data structure for configuration of JDataFilter. More...
 
class  JDOMSimulator
 Runcontrol client to simulate DOM. More...
 
class  JDataWriter
 Runcontrol client to write data to disk. More...
 
class  JEventGenerator
 Runcontrol client to simulate data filter(s). More...
 
class  JClient
 Client data structure. More...
 
class  JClientList
 List of clients. More...
 
class  JDAQClient
 Run control client base class. More...
 
class  JDAQDriver
 Simple driver for run control clients. More...
 
class  JEventTable
 Event table. More...
 
struct  JEvent_t
 Auxiliary class for handling event name and optional number. More...
 
struct  JDAQRun
 Simple data structure for DAQ run. More...
 
class  JDAQProcess
 Auxiliary class for itemization of process list. More...
 
class  JEventTimeslice
 Timeslice with Monte Carlo event. More...
 
class  JRandomTimeslice
 Timeslice with random data. More...
 
class  MonitorRouter
 

Typedefs

typedef JDAQKeyHit JDAQSnapshotHit
 
typedef unsigned long long int JTriggerCounter_t
 Type definition of trigger counter. More...
 
typedef unsigned long long int JTriggerMask_t
 Type definition of trigger mask. More...
 
typedef
JDAQStateMachine::ev_daq_event 
JDAQEvent_t
 Type definition of a DAQ event. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const JDAQChronometer &chronometer)
 Print DAQ chronometer. More...
 
double getTimeOfRTS (const JDAQChronometer &chronometer)
 Get time of last RTS in ns since start of run for a given chronometer. More...
 
bool operator== (const JDAQChronometer &first, const JDAQChronometer &second)
 Equal operator for DAQ chronometers. More...
 
bool operator!= (const JDAQChronometer &first, const JDAQChronometer &second)
 Not-equal operator for DAQ chronometers. More...
 
bool operator== (const JDAQClock &first, const JDAQClock &second)
 Equal operator for JDAQClock. More...
 
double getFrameTime ()
 Get frame time duration. More...
 
double getRTS ()
 Get TDC dynamic range. More...
 
double getTimeOfFrame (const int frame_index)
 Get start time of frame in ns since start of run for a given frame index. More...
 
double getTimeOfFrame (const unsigned int frame_index)
 Get start time of frame in ns since start of run for a given frame index. More...
 
double getTimeOfRTS (const double t_ns)
 Get time of last RTS in ns since start of run for a given time. More...
 
double getTimeOfRTS (const int frame_index)
 Get time of last RTS in ns since start of run for a given frame index. More...
 
double getTimeOfRTS (const unsigned int frame_index)
 Get time of last RTS in ns since start of run for a given frame index. More...
 
int getFrameIndex (const double t_ns)
 Get frame index for a given time in ns. More...
 
double getTimeSinceRTS (const int frame_index)
 Get time in ns since last RTS for a given frame index. More...
 
double getTimeSinceRTS (const unsigned int frame_index)
 Get time in ns since last RTS for a given frame index. More...
 
double getTimeSinceRTS (const double &t_ns)
 Get time in ns since last RTS for a given time in ns. More...
 
template<class T >
int getDataType ()
 Template definition for method returning data type. More...
 
template<class T >
int getDataType (JDAQType< T >)
 Argument definition for method returning data type The method argument refers to the data type for future I/O operations. More...
 
int getDataType (JDAQType< JDAQSuperFrame >)
 
int getDataType (JDAQType< JDAQSummaryFrame >)
 
int getDataType (JDAQType< JDAQTimeslice >)
 
int getDataType (JDAQType< JDAQTimesliceL0 >)
 
int getDataType (JDAQType< JDAQTimesliceL1 >)
 
int getDataType (JDAQType< JDAQTimesliceL2 >)
 
int getDataType (JDAQType< JDAQTimesliceSN >)
 
int getDataType (JDAQType< JDAQSummaryslice >)
 
int getDataType (JDAQType< JDAQEvent >)
 
bool operator== (const JDAQEvent &first, const JDAQEvent &second)
 Equal operator for DAQ events. More...
 
bool operator!= (const JDAQEvent &first, const JDAQEvent &second)
 Not-equal operator for DAQ events. More...
 
std::ostream & operator<< (std::ostream &out, const JDAQEvent &event)
 Print DAQ Event. More...
 
bool operator== (const JDAQEventHeader &first, const JDAQEventHeader &second)
 Equal operator for DAQ event headers. More...
 
bool operator!= (const JDAQEventHeader &first, const JDAQEventHeader &second)
 Not-equal operator for DAQ event headers. More...
 
bool operator== (const JDAQFrame &first, const JDAQFrame &second)
 Equal operator for DAQ frames. More...
 
bool operator!= (const JDAQFrame &first, const JDAQFrame &second)
 Not-equal operator for DAQ frames. More...
 
bool operator== (const JDAQFrameStatus &first, const JDAQFrameStatus &second)
 Equal operator for DAQ frame status. More...
 
bool operator!= (const JDAQFrameStatus &first, const JDAQFrameStatus &second)
 Not-equal operator for DAQ frame status. More...
 
bool operator== (const JDAQHeader &first, const JDAQHeader &second)
 Equal operator for DAQ headers. More...
 
bool operator!= (const JDAQHeader &first, const JDAQHeader &second)
 Not-equal operator for DAQ headers. More...
 
bool operator< (const JDAQHit &first, const JDAQHit &second)
 Less than operator for DAQ hits. More...
 
bool operator== (const JDAQHit &first, const JDAQHit &second)
 Equal operator for DAQ hits. More...
 
bool operator!= (const JDAQHit &first, const JDAQHit &second)
 Not-equal operator for DAQ hits. More...
 
bool operator< (const JDAQKeyHit &first, const JDAQKeyHit &second)
 Less than operator for DAQ hits. More...
 
bool operator== (const JDAQKeyHit &first, const JDAQKeyHit &second)
 Equal operator for DAQ hits. More...
 
bool operator!= (const JDAQKeyHit &first, const JDAQKeyHit &second)
 Not-equal operator for DAQ hits. More...
 
bool operator== (const JDAQModuleIdentifier &first, const JDAQModuleIdentifier &second)
 Equal operator. More...
 
bool operator!= (const JDAQModuleIdentifier &first, const JDAQModuleIdentifier &second)
 Not equal operator. More...
 
bool operator== (const JDAQModuleIdentifier &module, const int id)
 Equal operator. More...
 
bool operator!= (const JDAQModuleIdentifier &module, const int id)
 Not equal operator. More...
 
bool operator< (const JDAQModuleIdentifier &first, const JDAQModuleIdentifier &second)
 Less than operator. More...
 
bool operator< (const JDAQModuleIdentifier &module, const int id)
 Less than operator. More...
 
bool operator< (const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
 Less than operator for PMT identifiers. More...
 
bool operator== (const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
 Equal operator for PMT identifiers. More...
 
bool operator!= (const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
 Not-equal operator for PMT identifiers. More...
 
std::ostream & operator<< (std::ostream &out, const JDAQPreamble &preamble)
 Print DAQ preamble. More...
 
bool & getDAQLongprint ()
 Get DAQ print option. More...
 
void setDAQLongprint (const bool option)
 Set DAQ print option. More...
 
bool operator== (const JDAQRate &first, const JDAQRate &second)
 Equal operator for DAQ rates. More...
 
bool operator!= (const JDAQRate &first, const JDAQRate &second)
 Not-equal operator for DAQ rates. More...
 
bool operator== (const JDAQSummaryFrame &first, const JDAQSummaryFrame &second)
 Equal operator for DAQ summary frames. More...
 
bool operator!= (const JDAQSummaryFrame &first, const JDAQSummaryFrame &second)
 Not-equal operator for DAQ summary frames. More...
 
std::ostream & operator<< (std::ostream &out, const KM3NETDAQ::JDAQSummaryslice &summary)
 Print DAQ summary. More...
 
bool operator== (const JDAQSummaryslice &first, const JDAQSummaryslice &second)
 Equal operator for DAQ summary slices. More...
 
bool operator!= (const JDAQSummaryslice &first, const JDAQSummaryslice &second)
 Not-equal operator for DAQ summary slices. More...
 
bool operator== (const JDAQSummarysliceHeader &first, const JDAQSummarysliceHeader &second)
 Equal operator for DAQ summary slice headers. More...
 
bool operator!= (const JDAQSummarysliceHeader &first, const JDAQSummarysliceHeader &second)
 Not-equal operator for DAQ summary slice headers. More...
 
bool operator== (const JDAQSuperFrame &first, const JDAQSuperFrame &second)
 Equal operator for DAQ super frames. More...
 
bool operator!= (const JDAQSuperFrame &first, const JDAQSuperFrame &second)
 Not-equal operator for DAQ super frames. More...
 
bool operator== (const JDAQSuperFrameHeader &first, const JDAQSuperFrameHeader &second)
 Equal operator for DAQ super frame headers. More...
 
bool operator!= (const JDAQSuperFrameHeader &first, const JDAQSuperFrameHeader &second)
 Not-equal operator for DAQ super frame headers. More...
 
bool operator== (const JDAQTimeslice &first, const JDAQTimeslice &second)
 Equal operator for DAQ time slices. More...
 
bool operator!= (const JDAQTimeslice &first, const JDAQTimeslice &second)
 Not-equal operator for DAQ time slices. More...
 
std::ostream & operator<< (std::ostream &out, const JDAQTimeslice &timeslice)
 Print DAQ Timeslice. More...
 
bool operator== (const JDAQTimesliceHeader &first, const JDAQTimesliceHeader &second)
 Equal operator for DAQ time slice headers. More...
 
bool operator!= (const JDAQTimesliceHeader &first, const JDAQTimesliceHeader &second)
 Not-equal operator for DAQ time slice headers. More...
 
bool operator== (const JDAQTriggerCounter &first, const JDAQTriggerCounter &second)
 Equal operator for DAQ trigger counters. More...
 
bool operator!= (const JDAQTriggerCounter &first, const JDAQTriggerCounter &second)
 Not-equal operator for DAQ trigger counters. More...
 
bool operator== (const JDAQTriggeredHit &first, const JDAQTriggeredHit &second)
 Equal operator for DAQ triggered hits. More...
 
bool operator!= (const JDAQTriggeredHit &first, const JDAQTriggeredHit &second)
 Not-equal operator for DAQ triggered hits. More...
 
JTriggerMask_t getTriggerMask (const unsigned int bit)
 Convert trigger bit to trigger mask. More...
 
bool operator== (const JDAQTriggerMask &first, const JDAQTriggerMask &second)
 Equal operator for DAQ trigger masks. More...
 
bool operator!= (const JDAQTriggerMask &first, const JDAQTriggerMask &second)
 Not-equal operator for DAQ trigger masks. More...
 
bool operator< (const JDAQUTCExtended &first, const JDAQUTCExtended &second)
 Less than operator for UTC times. More...
 
bool operator== (const JDAQUTCExtended &first, const JDAQUTCExtended &second)
 Equal operator for UTC times. More...
 
bool operator!= (const JDAQUTCExtended &first, const JDAQUTCExtended &second)
 Not equal operator for UTC times. More...
 
JNET::JSubscriptionList getSubscription (const JEventTable &event_table)
 Convert event table to ControlHost subscription. More...
 
char getWildCard ()
 Get the wild card. More...
 
char getEventnameDelimeter ()
 Get the event name delimeter. More...
 
char getTokenDelimeter ()
 Get the token delimeter for command messages. More...
 
std::string getProcessName (const std::string &name, const std::string &process)
 Get process name of run control client. More...
 
std::string getFullName (const std::string &hostname, const std::string &name)
 Get full name of run control client. More...
 
std::string getFullName (const std::string &buffer)
 Get full name of run control client. More...
 
JTag getUniqueTag (const std::string &hostname, const std::string &name)
 Get unique tag of run control client. More...
 
std::string getStateName (const std::string &name)
 Get name of state. More...
 

Variables

static const int NUMBER_OF_PMTS = 31
 Total number of PMTs in module. More...
 
static const JBit DAQ_WHITE_RABBIT (31)
 White Rabbit status. More...
 
static const JBits DAQ_TDC (0, 30)
 TDC high-rate veto status. More...
 
static const JBits DAQ_FIFO (0, 30)
 FIFO almost full bits. More...
 
static const JBit DAQ_UDP_TRAILER (31)
 UDP trailer. More...
 
static const JBits DAQ_UDP_RECEIVED_PACKETS (0, 15)
 Mask of UDP received packets. More...
 
static const JBits DAQ_UDP_SEQUENCE_NUMBER (16, 31)
 Mask of UDP sequence number. More...
 
static const JDAQEvaluator getDAQValue
 Function object for evaluation of DAQ objects. More...
 
static const std::string RUN_CONTROL_CLIENT = std::string("DAQ")
 
static const std::string JDATAQUEUE = std::string("DataQueue")
 
static const std::string JDATAFILTER = std::string("JDataFilter")
 
static const std::string JACOUSTICDATAFILTER = std::string("AcousticDataFilter")
 
static const std::string JDATAWRITER = std::string("JDataWriter")
 
static const std::string JUNIQUE_ID = std::string("uniqueID")
 
static const char WILD_CARD = '%'
 
static const char EVENTNAME_DELIMETER = ':'
 
static const std::string TOKEN_DELIMETER = std::string("#")
 
static const std::string CLIENTNAME_DELIMETER = std::string("/")
 
static const std::string FILENAME_PREFIX = std::string("%<")
 
static const std::string FILENAME_POSTFIX = std::string(">%")
 
static const JNET::JTag RC_STRT = JNET::JTag("RC_STRT")
 
static const JNET::JTag RC_CMD = JNET::JTag("RC_CMD")
 
static const JNET::JTag RC_REPLY = JNET::JTag("RC_REPLY")
 
static const JNET::JTag RC_DOMSIMULATOR = JNET::JTag("RC_DOM")
 
static const JNET::JTag RC_EVTGENERATOR = JNET::JTag("RC_EVT")
 
static const JNET::JTag RC_DWRITER = JNET::JTag("RC_DWRT")
 
static const JNET::JTag RC_LOG = JNET::JTag("RC_LOG")
 
static const JNET::JTag RC_DFILTER = JNET::JTag("RC_DFLTR")
 
static const JNET::JTag RC_DQUEUE = JNET::JTag("RC_DQUE")
 
static const JNET::JTag RC_DQUEUE_ACS = JNET::JTag("RC_DQUEA")
 
static const JNET::JTag RC_DQUEUE_OPT = JNET::JTag("RC_DQUEO")
 
static const JNET::JTag RC_MONITORING_ROUTER = JNET::JTag("RC_MROUT")
 
static const JNET::JTag RC_AFILTER = JNET::JTag("RC_AFLTR")
 
static const JNET::JTag IO_TIMESLICE = JNET::JTag("IO_TSL")
 
static const JNET::JTag IO_TIMESLICE_L0 = JNET::JTag("IO_TSL0")
 
static const JNET::JTag IO_TIMESLICE_L1 = JNET::JTag("IO_TSL1")
 
static const JNET::JTag IO_TIMESLICE_L2 = JNET::JTag("IO_TSL2")
 
static const JNET::JTag IO_TIMESLICE_SN = JNET::JTag("IO_TSSN")
 
static const JNET::JTag IO_EVENT = JNET::JTag("IO_EVT")
 
static const JNET::JTag IO_SUMMARY = JNET::JTag("IO_SUM")
 
static const JNET::JTag IO_TRIGGER_PARAMETERS = JNET::JTag("TRG_PARS")
 
static const JNET::JTag IO_MONITORING_DATA = JNET::JTag("IO_MONIT")
 
static const unsigned int NUMBER_OF_TRIGGER_BITS = sizeof(JTriggerMask_t) * 8
 Number of trigger bits. More...
 
static const JDAQTriggerMask TRIGGER_MASK_ON = JDAQTriggerMask(~JTriggerMask_t(0))
 Trigger mask on;. More...
 
static const JDAQTriggerMask TRIGGER_MASK_OFF = JDAQTriggerMask( JTriggerMask_t(0))
 Trigger mask off;. More...
 

Detailed Description

KM3NeT DAQ data structures and auxiliaries.

Author
rbruijn
mdejong
cpellegrino

Typedef Documentation

Definition at line 28 of file JDAQEvent.hh.

typedef unsigned long long int KM3NETDAQ::JTriggerCounter_t

Type definition of trigger counter.

Definition at line 21 of file JDAQTriggerCounter.hh.

typedef unsigned long long int KM3NETDAQ::JTriggerMask_t

Type definition of trigger mask.

Definition at line 25 of file JDAQTriggerMask.hh.

typedef JDAQStateMachine::ev_daq_event KM3NETDAQ::JDAQEvent_t

Type definition of a DAQ event.

Definition at line 22 of file JEventTable.hh.

Function Documentation

std::ostream& KM3NETDAQ::operator<< ( std::ostream &  out,
const JDAQChronometer &  chronometer 
)
inline

Print DAQ chronometer.

Parameters
outoutput stream
chronometerJDAQChronometer
Returns
output stream

Definition at line 251 of file JDAQChronometer.hh.

252  {
253  using namespace std;
254 
255  out << setw(8) << chronometer.getDetectorID();
256  out << ' ';
257  out << setw(8) << chronometer.getRunNumber();
258  out << ' ';
259  out << setw(8) << chronometer.getFrameIndex();
260  out << ' ';
261  out << chronometer.getTimesliceStart();
262 
263  return out;
264  }
double KM3NETDAQ::getTimeOfRTS ( const JDAQChronometer &  chronometer)
inline

Get time of last RTS in ns since start of run for a given chronometer.

Parameters
chronometerchronometer
Returns
time [ns]

Definition at line 273 of file JDAQChronometer.hh.

274  {
275  return getTimeOfRTS(chronometer.getFrameIndex());
276  }
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.
bool KM3NETDAQ::operator== ( const JDAQChronometer &  first,
const JDAQChronometer &  second 
)
inline

Equal operator for DAQ chronometers.

Parameters
firstchronometer
secondchronometer
Returns
true if first chronometer equal to second; else false

Definition at line 286 of file JDAQChronometer.hh.

288  {
289  return (first.getDetectorID() == second.getDetectorID() &&
290  first.getRunNumber() == second.getRunNumber() &&
291  first.getFrameIndex() == second.getFrameIndex() &&
292  first.getTimesliceStart() == second.getTimesliceStart());
293  }
bool KM3NETDAQ::operator!= ( const JDAQChronometer &  first,
const JDAQChronometer &  second 
)
inline

Not-equal operator for DAQ chronometers.

Parameters
firstchronometer
secondchronometer
Returns
true if first chronometer not equal to second; else false

Definition at line 303 of file JDAQChronometer.hh.

305  {
306  return !(first == second);
307  }
bool KM3NETDAQ::operator== ( const JDAQClock &  first,
const JDAQClock &  second 
)
inline

Equal operator for JDAQClock.

Parameters
firstJDAQClock
secondJDAQClock
Returns
true if both clock types are equal; else false

Definition at line 151 of file JDAQClock.hh.

152  {
153  return first.get() == second.get();
154  }
double KM3NETDAQ::getFrameTime ( )
inline

Get frame time duration.

Returns
frame time [ns]

Definition at line 162 of file JDAQClock.hh.

163  {
164  return FRAME_TIME_NS;
165  }
double KM3NETDAQ::getRTS ( )
inline

Get TDC dynamic range.

Returns
TDC dynamic range [ns]

Definition at line 173 of file JDAQClock.hh.

174  {
175  return RESET_TIME_NS;
176  }
double KM3NETDAQ::getTimeOfFrame ( const int  frame_index)
inline

Get start time of frame in ns since start of run for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 185 of file JDAQClock.hh.

186  {
187  if (frame_index != 0)
188  return (double) (frame_index - 1) * FRAME_TIME_NS;
189  else
190  return 0;
191  }
double KM3NETDAQ::getTimeOfFrame ( const unsigned int  frame_index)
inline

Get start time of frame in ns since start of run for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 200 of file JDAQClock.hh.

201  {
202  if (frame_index != 0)
203  return (double) (frame_index - 1) * FRAME_TIME_NS;
204  else
205  return 0;
206  }
double KM3NETDAQ::getTimeOfRTS ( const double  t_ns)
inline

Get time of last RTS in ns since start of run for a given time.

Parameters
t_nstime [ns]
Returns
time [ns]

Definition at line 215 of file JDAQClock.hh.

216  {
217  return std::floor(t_ns/RESET_TIME_NS) * RESET_TIME_NS;
218  }
double KM3NETDAQ::getTimeOfRTS ( const int  frame_index)
inline

Get time of last RTS in ns since start of run for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 227 of file JDAQClock.hh.

228  {
229  return std::floor(getTimeOfFrame(frame_index)/RESET_TIME_NS) * RESET_TIME_NS;
230  }
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index.
Definition: JDAQClock.hh:185
double KM3NETDAQ::getTimeOfRTS ( const unsigned int  frame_index)
inline

Get time of last RTS in ns since start of run for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 239 of file JDAQClock.hh.

240  {
241  return std::floor(getTimeOfFrame(frame_index)/RESET_TIME_NS) * RESET_TIME_NS;
242  }
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index.
Definition: JDAQClock.hh:185
int KM3NETDAQ::getFrameIndex ( const double  t_ns)
inline

Get frame index for a given time in ns.

Parameters
t_nstime [ns]
Returns
frame index

Definition at line 251 of file JDAQClock.hh.

252  {
253  return (int) (t_ns / FRAME_TIME_NS) + 1;
254  }
double KM3NETDAQ::getTimeSinceRTS ( const int  frame_index)
inline

Get time in ns since last RTS for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 263 of file JDAQClock.hh.

264  {
265  return std::fmod(getTimeOfFrame(frame_index), RESET_TIME_NS);
266  }
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index.
Definition: JDAQClock.hh:185
double KM3NETDAQ::getTimeSinceRTS ( const unsigned int  frame_index)
inline

Get time in ns since last RTS for a given frame index.

Parameters
frame_indexframe index
Returns
time [ns]

Definition at line 275 of file JDAQClock.hh.

276  {
277  return std::fmod(getTimeOfFrame(frame_index), RESET_TIME_NS);
278  }
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index.
Definition: JDAQClock.hh:185
double KM3NETDAQ::getTimeSinceRTS ( const double &  t_ns)
inline

Get time in ns since last RTS for a given time in ns.

Parameters
t_nstime [ns]
Returns
time [ns]

Definition at line 287 of file JDAQClock.hh.

288  {
289  return std::fmod(t_ns, RESET_TIME_NS);
290  }
template<class T >
int KM3NETDAQ::getDataType ( )
inline

Template definition for method returning data type.

The template argument refers to the data type for future I/O operations.

Definition at line 25 of file JDAQDataTypes.hh.

26  {
27  return getDataType(JDAQType<T>());
28  }
int getDataType()
Template definition for method returning data type.
template<class T >
int KM3NETDAQ::getDataType ( JDAQType< T >  )
inline

Argument definition for method returning data type The method argument refers to the data type for future I/O operations.

This method should be overloaded for each corresponding class.

int KM3NETDAQ::getDataType ( JDAQType< JDAQSuperFrame >  )
inline

Definition at line 51 of file JDAQDataTypes.hh.

51 { return 101; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQSummaryFrame >  )
inline

Definition at line 52 of file JDAQDataTypes.hh.

52 { return 201; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQTimeslice >  )
inline

Definition at line 53 of file JDAQDataTypes.hh.

53 { return 1001; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQTimesliceL0 >  )
inline

Definition at line 54 of file JDAQDataTypes.hh.

54 { return 1002; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQTimesliceL1 >  )
inline

Definition at line 55 of file JDAQDataTypes.hh.

55 { return 1003; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQTimesliceL2 >  )
inline

Definition at line 56 of file JDAQDataTypes.hh.

56 { return 1004; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQTimesliceSN >  )
inline

Definition at line 57 of file JDAQDataTypes.hh.

57 { return 1005; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQSummaryslice >  )
inline

Definition at line 58 of file JDAQDataTypes.hh.

58 { return 2001; }
int KM3NETDAQ::getDataType ( JDAQType< JDAQEvent >  )
inline

Definition at line 59 of file JDAQDataTypes.hh.

59 { return 10001; }
bool KM3NETDAQ::operator== ( const JDAQEvent &  first,
const JDAQEvent &  second 
)

Equal operator for DAQ events.

Parameters
firstevent
secondevent
Returns
true if first event equal to second; else false

Definition at line 211 of file software/JDAQ/JDAQEvent.cc.

213  {
214  return (first.getDAQEventHeader() == second.getDAQEventHeader() &&
215  first.getHits<JDAQTriggeredHit>() == second.getHits<JDAQTriggeredHit>() &&
216  first.getHits<JDAQSnapshotHit> () == second.getHits<JDAQSnapshotHit> ());
217  }
JDAQKeyHit JDAQSnapshotHit
Definition: JDAQEvent.hh:28
bool KM3NETDAQ::operator!= ( const JDAQEvent &  first,
const JDAQEvent &  second 
)
inline

Not-equal operator for DAQ events.

Parameters
firstevent
secondevent
Returns
true if first event not equal to second; else false

Definition at line 340 of file JDAQEvent.hh.

342  {
343  return !(first == second);
344  }
std::ostream& KM3NETDAQ::operator<< ( std::ostream &  out,
const JDAQEvent &  event 
)
inline

Print DAQ Event.

Parameters
outoutput stream
eventevent
Returns
output stream

Definition at line 354 of file JDAQEvent.hh.

355  {
356  return event.print(out, getDAQLongprint());
357  }
bool & getDAQLongprint()
Get DAQ print option.
Definition: JDAQPrint.hh:15
bool KM3NETDAQ::operator== ( const JDAQEventHeader &  first,
const JDAQEventHeader &  second 
)
inline

Equal operator for DAQ event headers.

Parameters
firstevent header
secondevent header
Returns
true if first event header equal to second; else false

Definition at line 158 of file JDAQEventHeader.hh.

160  {
161  return (first.getDAQHeader() == second.getDAQHeader() &&
162  first.getDAQTriggerCounter() == second.getDAQTriggerCounter() &&
163  first.getDAQTriggerMask() == second.getDAQTriggerMask());
164  }
bool KM3NETDAQ::operator!= ( const JDAQEventHeader &  first,
const JDAQEventHeader &  second 
)
inline

Not-equal operator for DAQ event headers.

Parameters
firstevent header
secondevent header
Returns
true if first event header not equal to second; else false

Definition at line 174 of file JDAQEventHeader.hh.

176  {
177  return !(first == second);
178  }
bool KM3NETDAQ::operator== ( const JDAQFrame &  first,
const JDAQFrame &  second 
)
inline

Equal operator for DAQ frames.

Parameters
firstframe
secondframe
Returns
true if first frame equal to second; else false

Definition at line 314 of file JDAQFrame.hh.

316  {
317  if (first.size() == second.size()) {
318 
319  for (JDAQFrame::const_iterator p = first.begin(), q = second.begin(); p != first.end(); ++p, ++q) {
320  if (*p != *q) {
321  return false;
322  }
323  }
324 
325  return true;
326 
327  } else {
328 
329  return false;
330  }
331  }
bool KM3NETDAQ::operator!= ( const JDAQFrame &  first,
const JDAQFrame &  second 
)
inline

Not-equal operator for DAQ frames.

Parameters
firstframe
secondframe
Returns
true if first frame not equal to second; else false

Definition at line 341 of file JDAQFrame.hh.

343  {
344  return !(first == second);
345  }
bool KM3NETDAQ::operator== ( const JDAQFrameStatus &  first,
const JDAQFrameStatus &  second 
)
inline

Equal operator for DAQ frame status.

Parameters
firstframe status
secondframe status
Returns
true if first frame status equal to second; else false

Definition at line 379 of file JDAQFrameStatus.hh.

381  {
382  return (first.getDAQStatus() == second.getDAQStatus() &&
383  first.getStatus() == second.getStatus() &&
384  first.getFIFOStatus() == second.getFIFOStatus());
385  }
bool KM3NETDAQ::operator!= ( const JDAQFrameStatus &  first,
const JDAQFrameStatus &  second 
)
inline

Not-equal operator for DAQ frame status.

Parameters
firstframe status
secondframe status
Returns
true if first frame status not equal to second; else false

Definition at line 395 of file JDAQFrameStatus.hh.

397  {
398  return !(first == second);
399  }
bool KM3NETDAQ::operator== ( const JDAQHeader &  first,
const JDAQHeader &  second 
)
inline

Equal operator for DAQ headers.

Parameters
firstheader
secondheader
Returns
true if first header equal to second; else false

Definition at line 120 of file JDAQHeader.hh.

122  {
123  return (first.getDAQChronometer() == second.getDAQChronometer());
124  }
bool KM3NETDAQ::operator!= ( const JDAQHeader &  first,
const JDAQHeader &  second 
)
inline

Not-equal operator for DAQ headers.

Parameters
firstheader
secondheader
Returns
true if first header not equal to second; else false

Definition at line 134 of file JDAQHeader.hh.

136  {
137  return !(first == second);
138  }
bool KM3NETDAQ::operator< ( const JDAQHit &  first,
const JDAQHit &  second 
)
inline

Less than operator for DAQ hits.

The less than operator is applied first to the time and then to the PMT channel of the hits.

Parameters
firsthit
secondhit
Returns
true if first hit earlier than second; else false

Definition at line 178 of file JDAQHit.hh.

180  {
181  if (first.getT() != second.getT())
182  return first.getT() < second.getT();
183  else
184  return first.getPMT() < second.getPMT();
185  }
bool KM3NETDAQ::operator== ( const JDAQHit &  first,
const JDAQHit &  second 
)
inline

Equal operator for DAQ hits.

Parameters
firsthit
secondhit
Returns
true if first hit equal to second; else false

Definition at line 195 of file JDAQHit.hh.

197  {
198  return (first.getPMT() == second.getPMT() &&
199  first.getT() == second.getT() &&
200  first.getToT() == second.getToT());
201  }
bool KM3NETDAQ::operator!= ( const JDAQHit &  first,
const JDAQHit &  second 
)
inline

Not-equal operator for DAQ hits.

Parameters
firsthit
secondhit
Returns
true if first hit not equal to second; else false

Definition at line 211 of file JDAQHit.hh.

213  {
214  return !(first == second);
215  }
bool KM3NETDAQ::operator< ( const JDAQKeyHit &  first,
const JDAQKeyHit &  second 
)
inline

Less than operator for DAQ hits.

The less than operator is applied first to the module idientifier then to the PMT channel and then to the time of the hits.

Parameters
firsthit
secondhit
Returns
true if first hit before than second; else false

Definition at line 129 of file JDAQKeyHit.hh.

131  {
132  if (first.getModuleID() == second.getModuleID()) {
133  if (first.getPMT() == second.getPMT())
134  return first.getT() < second.getT();
135  else
136  return first.getPMT() < second.getPMT();
137  } else
138  return first.getModuleID() < second.getModuleID();
139  }
bool KM3NETDAQ::operator== ( const JDAQKeyHit &  first,
const JDAQKeyHit &  second 
)
inline

Equal operator for DAQ hits.

The equal operator is applied to the module idientifier, to the PMT channel and to the time of the hits.

Parameters
firsthit
secondhit
Returns
t rue if first hit equal to second; else false

Definition at line 152 of file JDAQKeyHit.hh.

154  {
155  return (first.getModuleID() == second.getModuleID() &&
156  first.getPMT() == second.getPMT() &&
157  first.getT() == second.getT());
158  }
bool KM3NETDAQ::operator!= ( const JDAQKeyHit &  first,
const JDAQKeyHit &  second 
)
inline

Not-equal operator for DAQ hits.

Parameters
firsthit
secondhit
Returns
true if first hit not equal to second; else false

Definition at line 168 of file JDAQKeyHit.hh.

170  {
171  return !(first == second);
172  }
bool KM3NETDAQ::operator== ( const JDAQModuleIdentifier &  first,
const JDAQModuleIdentifier &  second 
)
inline

Equal operator.

Parameters
firstfirst module identifier
secondsecond module identifier
Returns
true if identifiers are equal; else false

Definition at line 164 of file JDAQModuleIdentifier.hh.

165  {
166  return first.getModuleID() == second.getModuleID();
167  }
bool KM3NETDAQ::operator!= ( const JDAQModuleIdentifier &  first,
const JDAQModuleIdentifier &  second 
)
inline

Not equal operator.

Parameters
firstfirst module identifier
secondsecond module identifier
Returns
true if identifiers are different; else false

Definition at line 177 of file JDAQModuleIdentifier.hh.

178  {
179  return first.getModuleID() != second.getModuleID();
180  }
bool KM3NETDAQ::operator== ( const JDAQModuleIdentifier &  module,
const int  id 
)
inline

Equal operator.

Parameters
modulemodule identifier
ididentifier
Returns
true if identifiers are equal; else false

Definition at line 190 of file JDAQModuleIdentifier.hh.

191  {
192  return module.getModuleID() == id;
193  }
bool KM3NETDAQ::operator!= ( const JDAQModuleIdentifier &  module,
const int  id 
)
inline

Not equal operator.

Parameters
modulemodule identifier
ididentifier
Returns
true if identifiers are different; else false

Definition at line 203 of file JDAQModuleIdentifier.hh.

204  {
205  return module.getModuleID() != id;
206  }
bool KM3NETDAQ::operator< ( const JDAQModuleIdentifier &  first,
const JDAQModuleIdentifier &  second 
)
inline

Less than operator.

Parameters
firstfirst module identifier
secondsecond module identifier
Returns
true if first identifier less than second eidentifier; else false

Definition at line 216 of file JDAQModuleIdentifier.hh.

217  {
218  return first.getModuleID() < second.getModuleID();
219  }
bool KM3NETDAQ::operator< ( const JDAQModuleIdentifier &  module,
const int  id 
)
inline

Less than operator.

Parameters
modulemodule identifier
ididentifier
Returns
true if module identifier less than identifier; else false

Definition at line 229 of file JDAQModuleIdentifier.hh.

230  {
231  return module.getModuleID() < id;
232  }
bool KM3NETDAQ::operator< ( const JDAQPMTIdentifier &  first,
const JDAQPMTIdentifier &  second 
)
inline

Less than operator for PMT identifiers.

The less than operator is applied first to the module identifer and then to the PMT address.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT lower than second PMT; else false

Definition at line 198 of file JDAQPMTIdentifier.hh.

199  {
200  if (first.getModuleIdentifier() == second.getModuleIdentifier())
201  return first.getPMTAddress() < second.getPMTAddress();
202  else
203  return first.getModuleIdentifier() < second.getModuleIdentifier();
204  }
bool KM3NETDAQ::operator== ( const JDAQPMTIdentifier &  first,
const JDAQPMTIdentifier &  second 
)
inline

Equal operator for PMT identifiers.

The equal operator is applied to the module identifer and to the PMT address.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT equal second PMT; else false

Definition at line 216 of file JDAQPMTIdentifier.hh.

217  {
218  return (first.getModuleIdentifier() == second.getModuleIdentifier() &&
219  first.getPMTAddress() == second.getPMTAddress());
220  }
bool KM3NETDAQ::operator!= ( const JDAQPMTIdentifier &  first,
const JDAQPMTIdentifier &  second 
)
inline

Not-equal operator for PMT identifiers.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT identifier not equal to second; else false

Definition at line 230 of file JDAQPMTIdentifier.hh.

232  {
233  return !(first == second);
234  }
std::ostream& KM3NETDAQ::operator<< ( std::ostream &  out,
const JDAQPreamble &  preamble 
)
inline

Print DAQ preamble.

Parameters
outoutput stream
preambleJDAQPreamble
Returns
output stream

Definition at line 148 of file JDAQPreamble.hh.

149  {
150  using namespace std;
151 
152  out << setw(8) << preamble.getSize();
153  out << ' ';
154  out << setw(6) << preamble.getDataType();
155 
156  return out;
157  }
bool& KM3NETDAQ::getDAQLongprint ( )
inline

Get DAQ print option.

Returns
print option

Definition at line 15 of file JDAQPrint.hh.

16  {
17  static bool option;
18 
19  return option;
20  }
void KM3NETDAQ::setDAQLongprint ( const bool  option)
inline

Set DAQ print option.

Parameters
optionprint option

Definition at line 28 of file JDAQPrint.hh.

29  {
30  getDAQLongprint() = option;
31  }
bool & getDAQLongprint()
Get DAQ print option.
Definition: JDAQPrint.hh:15
bool KM3NETDAQ::operator== ( const JDAQRate &  first,
const JDAQRate &  second 
)
inline

Equal operator for DAQ rates.

Parameters
firstrate
secondrate
Returns
true if first rate equal to second; else false

Definition at line 296 of file JDAQSummaryFrame.hh.

298  {
299  return (first.getValue() == second.getValue());
300  }
bool KM3NETDAQ::operator!= ( const JDAQRate &  first,
const JDAQRate &  second 
)
inline

Not-equal operator for DAQ rates.

Parameters
firstrate
secondrate
Returns
true if first rate not equal to second; else false

Definition at line 310 of file JDAQSummaryFrame.hh.

312  {
313  return (first.getValue() != second.getValue());
314  }
bool KM3NETDAQ::operator== ( const JDAQSummaryFrame &  first,
const JDAQSummaryFrame &  second 
)
inline

Equal operator for DAQ summary frames.

Parameters
firstsummary frame
secondsummary frame
Returns
true if first summary frame equal to second; else false

Definition at line 537 of file JDAQSummaryFrame.hh.

539  {
540  if (first.getModuleIdentifier() == second.getModuleIdentifier() &&
541  first.getDAQFrameStatus() == second.getDAQFrameStatus()) {
542 
543  for (int i = 0; i != NUMBER_OF_PMTS; ++i) {
544  if (first[i] != second[i]) {
545  return false;
546  }
547  }
548 
549  return true;
550 
551  } else {
552 
553  return false;
554  }
555  }
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
bool KM3NETDAQ::operator!= ( const JDAQSummaryFrame &  first,
const JDAQSummaryFrame &  second 
)
inline

Not-equal operator for DAQ summary frames.

Parameters
firstsummary frame
secondsummary frame
Returns
true if first summary frame not equal to second; else false

Definition at line 565 of file JDAQSummaryFrame.hh.

567  {
568  return !(first == second);
569  }
std::ostream& KM3NETDAQ::operator<< ( std::ostream &  out,
const KM3NETDAQ::JDAQSummaryslice summary 
)
inline

Print DAQ summary.

Parameters
outoutput stream
summarysummary
Returns
output stream

Definition at line 193 of file JDAQSummaryslice.hh.

194  {
195  return summary.print(out, getDAQLongprint());
196  }
std::ostream & print(std::ostream &out, const bool lpr=false) const
Print DAQ summary.
bool & getDAQLongprint()
Get DAQ print option.
Definition: JDAQPrint.hh:15
bool KM3NETDAQ::operator== ( const JDAQSummaryslice &  first,
const JDAQSummaryslice &  second 
)
inline

Equal operator for DAQ summary slices.

Parameters
firstsummary slice
secondsummary slice
Returns
true if first summary slice equal to second; else false

Definition at line 206 of file JDAQSummaryslice.hh.

208  {
209  return (first.getDAQSummarysliceHeader() == second.getDAQSummarysliceHeader() &&
210  static_cast<const std::vector<JDAQSummaryFrame>&>(first) == static_cast<const std::vector<JDAQSummaryFrame>&>(second));
211  }
bool KM3NETDAQ::operator!= ( const JDAQSummaryslice &  first,
const JDAQSummaryslice &  second 
)
inline

Not-equal operator for DAQ summary slices.

Parameters
firstsummary slice
secondsummary slice
Returns
true if first summary slice not equal to second; else false

Definition at line 221 of file JDAQSummaryslice.hh.

223  {
224  return !(first == second);
225  }
bool KM3NETDAQ::operator== ( const JDAQSummarysliceHeader &  first,
const JDAQSummarysliceHeader &  second 
)
inline

Equal operator for DAQ summary slice headers.

Parameters
firstsummary slice header
secondsummary slice header
Returns
true if first summaryslice header equal to second; else false

Definition at line 66 of file JDAQSummarysliceHeader.hh.

68  {
69  return (first.getDAQHeader() == second.getDAQHeader());
70  }
bool KM3NETDAQ::operator!= ( const JDAQSummarysliceHeader &  first,
const JDAQSummarysliceHeader &  second 
)
inline

Not-equal operator for DAQ summary slice headers.

Parameters
firstsummary slice header
secondsummary slice header
Returns
true if first summary slice header not equal to second; else false

Definition at line 80 of file JDAQSummarysliceHeader.hh.

82  {
83  return !(first == second);
84  }
bool KM3NETDAQ::operator== ( const JDAQSuperFrame &  first,
const JDAQSuperFrame &  second 
)
inline

Equal operator for DAQ super frames.

Parameters
firstsuper frame
secondsuper frame
Returns
true if first super frame equal to second; else false

Definition at line 186 of file JDAQSuperFrame.hh.

188  {
189  if (first.getDAQSuperFrameHeader() == second.getDAQSuperFrameHeader() &&
190  first.size() == second.size()) {
191 
192  for (JDAQSuperFrame::const_iterator p = first.begin(), q = second.begin(); p != first.end(); ++p, ++q) {
193  if (*p != *q) {
194  return false;
195  }
196  }
197 
198  return true;
199 
200  } else {
201 
202  return false;
203  }
204  }
bool KM3NETDAQ::operator!= ( const JDAQSuperFrame &  first,
const JDAQSuperFrame &  second 
)
inline

Not-equal operator for DAQ super frames.

Parameters
firstsuper frame
secondsuper frame
Returns
true if first super frame not equal to second; else false

Definition at line 214 of file JDAQSuperFrame.hh.

216  {
217  return !(first == second);
218  }
bool KM3NETDAQ::operator== ( const JDAQSuperFrameHeader &  first,
const JDAQSuperFrameHeader &  second 
)
inline

Equal operator for DAQ super frame headers.

Parameters
firstsuper frame header
secondsuper frame header
Returns
true if first super frame header equal to second; else false

Definition at line 151 of file JDAQSuperFrameHeader.hh.

153  {
154  return (first.getDAQHeader() == second.getDAQHeader() &&
155  first.getModuleIdentifier() == second.getModuleIdentifier() &&
156  first.getDAQFrameStatus() == second.getDAQFrameStatus());
157  }
bool KM3NETDAQ::operator!= ( const JDAQSuperFrameHeader &  first,
const JDAQSuperFrameHeader &  second 
)
inline

Not-equal operator for DAQ super frame headers.

Parameters
firstsuper frame header
secondsuper frame header
Returns
true if first super frame header not equal to second; else false

Definition at line 167 of file JDAQSuperFrameHeader.hh.

169  {
170  return !(first == second);
171  }
bool KM3NETDAQ::operator== ( const JDAQTimeslice &  first,
const JDAQTimeslice &  second 
)
inline

Equal operator for DAQ time slices.

Parameters
firsttime slice
secondtime slice
Returns
true if first time slice equal to second; else false

Definition at line 288 of file JDAQTimeslice.hh.

290  {
291  return (first.getDAQTimesliceHeader() == second.getDAQTimesliceHeader() &&
292  static_cast<const std::vector<JDAQSuperFrame>&>(first) == static_cast<const std::vector<JDAQSuperFrame>&>(second));
293  }
bool KM3NETDAQ::operator!= ( const JDAQTimeslice &  first,
const JDAQTimeslice &  second 
)
inline

Not-equal operator for DAQ time slices.

Parameters
firsttime slice
secondtime slice
Returns
true if first time slice not equal to second; else false

Definition at line 303 of file JDAQTimeslice.hh.

305  {
306  return !(first == second);
307  }
std::ostream& KM3NETDAQ::operator<< ( std::ostream &  out,
const JDAQTimeslice &  timeslice 
)
inline

Print DAQ Timeslice.

Parameters
outoutput stream
timeslicetimeslice
Returns
output stream

Definition at line 341 of file JDAQTimeslice.hh.

342  {
343  return timeslice.print(out, getDAQLongprint());
344  }
bool & getDAQLongprint()
Get DAQ print option.
Definition: JDAQPrint.hh:15
bool KM3NETDAQ::operator== ( const JDAQTimesliceHeader &  first,
const JDAQTimesliceHeader &  second 
)
inline

Equal operator for DAQ time slice headers.

Parameters
firsttime slice header
secondtime slice header
Returns
true if first timeslice header equal to second; else false

Definition at line 66 of file JDAQTimesliceHeader.hh.

68  {
69  return (first.getDAQHeader() == second.getDAQHeader());
70  }
bool KM3NETDAQ::operator!= ( const JDAQTimesliceHeader &  first,
const JDAQTimesliceHeader &  second 
)
inline

Not-equal operator for DAQ time slice headers.

Parameters
firsttime slice header
secondtime slice header
Returns
true if first time slice header not equal to second; else false

Definition at line 80 of file JDAQTimesliceHeader.hh.

82  {
83  return !(first == second);
84  }
bool KM3NETDAQ::operator== ( const JDAQTriggerCounter &  first,
const JDAQTriggerCounter &  second 
)
inline

Equal operator for DAQ trigger counters.

Parameters
firsttrigger counter
secondtrigger counter
Returns
true if first trigger counter equal to second; else false

Definition at line 182 of file JDAQTriggerCounter.hh.

184  {
185  return (first.getCounter() == second.getCounter());
186  }
bool KM3NETDAQ::operator!= ( const JDAQTriggerCounter &  first,
const JDAQTriggerCounter &  second 
)
inline

Not-equal operator for DAQ trigger counters.

Parameters
firsttrigger counter
secondtrigger counter
Returns
true if first trigger counter not equal to second; else false

Definition at line 196 of file JDAQTriggerCounter.hh.

198  {
199  return !(first == second);
200  }
bool KM3NETDAQ::operator== ( const JDAQTriggeredHit &  first,
const JDAQTriggeredHit &  second 
)
inline

Equal operator for DAQ triggered hits.

Parameters
firsttriggered hit
secondtriggered hit
Returns
true if first triggered hit equal to second; else false

Definition at line 118 of file JDAQTriggeredHit.hh.

120  {
121  return (static_cast<const JDAQKeyHit&> (first) == static_cast<const JDAQKeyHit&> (second) &&
122  static_cast<const JDAQTriggerMask&>(first) == static_cast<const JDAQTriggerMask&>(second));
123  }
bool KM3NETDAQ::operator!= ( const JDAQTriggeredHit &  first,
const JDAQTriggeredHit &  second 
)
inline

Not-equal operator for DAQ triggered hits.

Parameters
firsttriggered hit
secondtriggered hit
Returns
true if first triggered hit not equal to second; else false

Definition at line 133 of file JDAQTriggeredHit.hh.

135  {
136  return !(first == second);
137  }
JTriggerMask_t KM3NETDAQ::getTriggerMask ( const unsigned int  bit)
inline

Convert trigger bit to trigger mask.

Parameters
bittrigger bit
Returns
trigger mask

Definition at line 40 of file JDAQTriggerMask.hh.

41  {
42  if (bit < NUMBER_OF_TRIGGER_BITS)
43  return JTriggerMask_t(1) << bit;
44  else
45  return 0;
46  }
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
unsigned long long int JTriggerMask_t
Type definition of trigger mask.
bool KM3NETDAQ::operator== ( const JDAQTriggerMask &  first,
const JDAQTriggerMask &  second 
)
inline

Equal operator for DAQ trigger masks.

Parameters
firsttrigger mask
secondtrigger mask
Returns
true if first trigger mask equal to second; else false

Definition at line 322 of file JDAQTriggerMask.hh.

324  {
325  return (first.getTriggerMask() == second.getTriggerMask());
326  }
bool KM3NETDAQ::operator!= ( const JDAQTriggerMask &  first,
const JDAQTriggerMask &  second 
)
inline

Not-equal operator for DAQ trigger masks.

Parameters
firsttrigger mask
secondtrigger mask
Returns
true if first trigger mask not equal to second; else false

Definition at line 336 of file JDAQTriggerMask.hh.

338  {
339  return !(first == second);
340  }
bool KM3NETDAQ::operator< ( const JDAQUTCExtended &  first,
const JDAQUTCExtended &  second 
)
inline

Less than operator for UTC times.

Parameters
firstUTC time
secondUTC time
Returns
true if first UTC time earlier than second UTC time; else false

Definition at line 215 of file JDAQUTCExtended.hh.

216  {
217  if (first.getUTCseconds() == second.getUTCseconds())
218  return first.getUTC16nanosecondcycles() < second.getUTC16nanosecondcycles();
219  else
220  return first.getUTCseconds() < second.getUTCseconds();
221  }
bool KM3NETDAQ::operator== ( const JDAQUTCExtended &  first,
const JDAQUTCExtended &  second 
)
inline

Equal operator for UTC times.

Parameters
firstUTC time
secondUTC time
Returns
true if first UTC time equal second UTC time; else false

Definition at line 231 of file JDAQUTCExtended.hh.

232  {
233  return (first.getUTCseconds() == second.getUTCseconds() &&
234  first.getUTC16nanosecondcycles() == second.getUTC16nanosecondcycles());
235  }
bool KM3NETDAQ::operator!= ( const JDAQUTCExtended &  first,
const JDAQUTCExtended &  second 
)
inline

Not equal operator for UTC times.

Parameters
firstUTC time
secondUTC time
Returns
true if first UTC time not equal second UTC time; else false

Definition at line 245 of file JDAQUTCExtended.hh.

246  {
247  return !(first == second);
248  }
JNET::JSubscriptionList KM3NETDAQ::getSubscription ( const JEventTable &  event_table)
inline

Convert event table to ControlHost subscription.

Parameters
event_tableevent table
Returns
subscription

Definition at line 125 of file JEventTable.hh.

126  {
127  using namespace JNET;
128  using std::string;
129 
130  JSubscriptionList buffer;
131 
132  for (JEventTable::const_iterator i = event_table.begin(); i != event_table.end(); ++i) {
133 
134  string key = i->first;
135  string::size_type pos = key.find_first_of(TOKEN_DELIMETER);
136 
137  if (pos != string::npos) {
138  buffer.add(JSubscriptionAll(key.substr(0, pos)));
139  }
140  }
141 
142  return buffer;
143  }
static const std::string TOKEN_DELIMETER
Definition: JDAQTags.hh:36
Subscription list.
JSubscriptionList & add(const JSubscription &subscription)
Add subscription.
Auxiliary class for all subscription.
Definition: JControlHost.hh:95
char KM3NETDAQ::getWildCard ( )
inline

Get the wild card.

Returns
wild card

Definition at line 33 of file JRuncontrolToolkit.hh.

34  {
35  return WILD_CARD;
36  }
static const char WILD_CARD
Definition: JDAQTags.hh:34
char KM3NETDAQ::getEventnameDelimeter ( )
inline

Get the event name delimeter.

Returns
event name delimeter

Definition at line 44 of file JRuncontrolToolkit.hh.

45  {
46  return EVENTNAME_DELIMETER;
47  }
static const char EVENTNAME_DELIMETER
Definition: JDAQTags.hh:35
char KM3NETDAQ::getTokenDelimeter ( )
inline

Get the token delimeter for command messages.

Returns
token delimeter

Definition at line 55 of file JRuncontrolToolkit.hh.

56  {
57  return TOKEN_DELIMETER[0];
58  }
static const std::string TOKEN_DELIMETER
Definition: JDAQTags.hh:36
std::string KM3NETDAQ::getProcessName ( const std::string &  name,
const std::string &  process 
)
inline

Get process name of run control client.

The process name corresponds to the name of the executable file. A wild card in the client name is replaced by the process name.

Parameters
namename of client
processname of process
Returns
process name

Definition at line 192 of file JRuncontrolToolkit.hh.

195  {
196  using namespace std;
197 
198  string buffer(name);
199 
200  size_t j = buffer.find_first_of(getWildCard());
201 
202  if (j != string::npos) {
203  buffer.replace(j, 1, process);
204  }
205 
206  return buffer;
207  }
char getWildCard()
Get the wild card.
std::string KM3NETDAQ::getFullName ( const std::string &  hostname,
const std::string &  name 
)
inline

Get full name of run control client.

The full name is the unique identifier of each run control client.

Parameters
hostnamename of host
namename of client
Returns
full name

Definition at line 218 of file JRuncontrolToolkit.hh.

220  {
221  using namespace JSYSTEM;
222 
225  name);
226  }
int getIPnumber(const std::string &host_name)
Get IP number.
Definition: JNetwork.hh:115
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation).
Definition: JNetwork.hh:150
static const std::string RUN_CONTROL_CLIENT
Definition: JDAQTags.hh:22
char getTokenDelimeter()
Get the token delimeter for command messages.
std::string KM3NETDAQ::getFullName ( const std::string &  buffer)
inline

Get full name of run control client.

Parameters
bufferfull name (possibly followed by more text)
Returns
full name

Definition at line 235 of file JRuncontrolToolkit.hh.

236  {
237  using namespace std;
238 
239  size_t j = 0;
240 
241  j = buffer.find_first_of(getTokenDelimeter(), (j != string::npos ? j : 0));
242  j = buffer.find_first_of(getTokenDelimeter(), (j != string::npos ? ++j : 0));
243  j = buffer.find_first_of(getTokenDelimeter(), (j != string::npos ? ++j : 0));
244 
245  return buffer.substr(0, j);
246  }
char getTokenDelimeter()
Get the token delimeter for command messages.
JTag KM3NETDAQ::getUniqueTag ( const std::string &  hostname,
const std::string &  name 
)
inline

Get unique tag of run control client.

The unique tag is used to communicate with a single client.

The unique tag consists of a sequence of 8 characters, where character 1-4 correspond the hexadecimal coded subaddress of the IP number of the host and character 5-8 to the short name of the client (i.e. part following the client name delimeter).

Parameters
hostnamehost name
nameclient name
Returns
tag

Definition at line 439 of file JRuncontrolToolkit.hh.

441  {
442  using namespace std;
443  using namespace JSYSTEM;
444 
445  ostringstream os;
446 
447  os << hex << getSubaddress(getIPnumber(hostname));
448 
449  string::size_type pos = name.find_first_of(CLIENTNAME_DELIMETER);
450 
451  if (pos != string::npos) {
452  os << name.substr(pos + 1, 4);
453  }
454 
455  return JTag(os.str());
456  }
int getIPnumber(const std::string &host_name)
Get IP number.
Definition: JNetwork.hh:115
unsigned short getSubaddress(const int ip)
Get host identifier within network.
Definition: JNetwork.hh:186
static const std::string CLIENTNAME_DELIMETER
Definition: JDAQTags.hh:37
std::string KM3NETDAQ::getStateName ( const std::string &  name)
inline

Get name of state.

Note that this method is used for backward compatibility.

Parameters
namename of state
Returns
name of state

Definition at line 589 of file JRuncontrolToolkit.hh.

590  {
591  using namespace std;
592 
593  static const string target = "Operational.";
594 
595  string buffer = name;
596 
597  const string::size_type pos = buffer.find(target);
598 
599  if (pos != string::npos)
600  return buffer.erase(pos, target.size());
601  else
602  return buffer;
603  }

Variable Documentation

const int KM3NETDAQ::NUMBER_OF_PMTS = 31
static

Total number of PMTs in module.

Definition at line 26 of file JDAQ.hh.

const JBit KM3NETDAQ::DAQ_WHITE_RABBIT(31)
static

White Rabbit status.

const JBits KM3NETDAQ::DAQ_TDC(0, 30)
static

TDC high-rate veto status.

const JBits KM3NETDAQ::DAQ_FIFO(0, 30)
static

FIFO almost full bits.

const JBit KM3NETDAQ::DAQ_UDP_TRAILER(31)
static

UDP trailer.

const JBits KM3NETDAQ::DAQ_UDP_RECEIVED_PACKETS(0, 15)
static

Mask of UDP received packets.

const JBits KM3NETDAQ::DAQ_UDP_SEQUENCE_NUMBER(16, 31)
static

Mask of UDP sequence number.

const JDAQEvaluator KM3NETDAQ::getDAQValue
static

Function object for evaluation of DAQ objects.

Definition at line 68 of file JDAQEvaluator.hh.

const std::string KM3NETDAQ::RUN_CONTROL_CLIENT = std::string("DAQ")
static

Definition at line 22 of file JDAQTags.hh.

const std::string KM3NETDAQ::JDATAQUEUE = std::string("DataQueue")
static

Definition at line 26 of file JDAQTags.hh.

const std::string KM3NETDAQ::JDATAFILTER = std::string("JDataFilter")
static

Definition at line 27 of file JDAQTags.hh.

const std::string KM3NETDAQ::JACOUSTICDATAFILTER = std::string("AcousticDataFilter")
static

Definition at line 28 of file JDAQTags.hh.

const std::string KM3NETDAQ::JDATAWRITER = std::string("JDataWriter")
static

Definition at line 29 of file JDAQTags.hh.

const std::string KM3NETDAQ::JUNIQUE_ID = std::string("uniqueID")
static

Definition at line 30 of file JDAQTags.hh.

const char KM3NETDAQ::WILD_CARD = '%'
static

Definition at line 34 of file JDAQTags.hh.

const char KM3NETDAQ::EVENTNAME_DELIMETER = ':'
static

Definition at line 35 of file JDAQTags.hh.

const std::string KM3NETDAQ::TOKEN_DELIMETER = std::string("#")
static

Definition at line 36 of file JDAQTags.hh.

const std::string KM3NETDAQ::CLIENTNAME_DELIMETER = std::string("/")
static

Definition at line 37 of file JDAQTags.hh.

const std::string KM3NETDAQ::FILENAME_PREFIX = std::string("%<")
static

Definition at line 38 of file JDAQTags.hh.

const std::string KM3NETDAQ::FILENAME_POSTFIX = std::string(">%")
static

Definition at line 39 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_STRT = JNET::JTag("RC_STRT")
static

Definition at line 43 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_CMD = JNET::JTag("RC_CMD")
static

Definition at line 44 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_REPLY = JNET::JTag("RC_REPLY")
static

Definition at line 45 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DOMSIMULATOR = JNET::JTag("RC_DOM")
static

Definition at line 46 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_EVTGENERATOR = JNET::JTag("RC_EVT")
static

Definition at line 47 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DWRITER = JNET::JTag("RC_DWRT")
static

JTag for JDataWriter

Definition at line 48 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_LOG = JNET::JTag("RC_LOG")
static

JTag for Logger

Definition at line 49 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DFILTER = JNET::JTag("RC_DFLTR")
static

JTag for JDataFilter

Definition at line 50 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DQUEUE = JNET::JTag("RC_DQUE")
static

JTag for combined opto-acoustic DataQueue

Definition at line 51 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DQUEUE_ACS = JNET::JTag("RC_DQUEA")
static

JTag for acoustic-only DataQueue

Definition at line 52 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_DQUEUE_OPT = JNET::JTag("RC_DQUEO")
static

JTag for optical-only DataQueue

Definition at line 53 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_MONITORING_ROUTER = JNET::JTag("RC_MROUT")
static

JTag for Monitoring Router

Definition at line 54 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::RC_AFILTER = JNET::JTag("RC_AFLTR")
static

Definition at line 55 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TIMESLICE = JNET::JTag("IO_TSL")
static

Definition at line 59 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TIMESLICE_L0 = JNET::JTag("IO_TSL0")
static

Definition at line 60 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TIMESLICE_L1 = JNET::JTag("IO_TSL1")
static

Definition at line 61 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TIMESLICE_L2 = JNET::JTag("IO_TSL2")
static

Definition at line 62 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TIMESLICE_SN = JNET::JTag("IO_TSSN")
static

Definition at line 63 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_EVENT = JNET::JTag("IO_EVT")
static

Definition at line 64 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_SUMMARY = JNET::JTag("IO_SUM")
static

Definition at line 65 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_TRIGGER_PARAMETERS = JNET::JTag("TRG_PARS")
static

Definition at line 66 of file JDAQTags.hh.

const JNET::JTag KM3NETDAQ::IO_MONITORING_DATA = JNET::JTag("IO_MONIT")
static

Definition at line 67 of file JDAQTags.hh.

const unsigned int KM3NETDAQ::NUMBER_OF_TRIGGER_BITS = sizeof(JTriggerMask_t) * 8
static

Number of trigger bits.

Definition at line 31 of file JDAQTriggerMask.hh.

const JDAQTriggerMask KM3NETDAQ::TRIGGER_MASK_ON = JDAQTriggerMask(~JTriggerMask_t(0))
static

Trigger mask on;.

Definition at line 311 of file JDAQTriggerMask.hh.

const JDAQTriggerMask KM3NETDAQ::TRIGGER_MASK_OFF = JDAQTriggerMask( JTriggerMask_t(0))
static

Trigger mask off;.

Definition at line 312 of file JDAQTriggerMask.hh.