Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
KM3NETDAQ::JDAQHit Class Reference

Hit data structure. More...

#include <JDAQHit.hh>

Inheritance diagram for KM3NETDAQ::JDAQHit:
KM3NETDAQ::JDAQKeyHit KM3NETDAQ::JDAQTriggeredHit

Public Types

typedef unsigned char JPMT_t
 PMT channel in FPGA. More...
 
typedef unsigned int JTDC_t
 leading edge [ns] More...
 
typedef unsigned char JTOT_t
 time over threshold [ns] More...
 

Public Member Functions

 JDAQHit ()
 Default constructor. More...
 
 JDAQHit (const JPMT_t pmt_id, const JTDC_t tdc_ns, const JTOT_t tot_ns)
 Constructor. More...
 
JPMT_t getPMT () const
 Get PMT. More...
 
JTDC_t getT () const
 Get time. More...
 
JTOT_t getToT () const
 Get time-over-threshold. More...
 
 ClassDefNV (JDAQHit, 1)
 

Static Public Member Functions

static JTOT_t getMaximalToT ()
 Get maximal time-over-threshold. More...
 
static int sizeOf ()
 Get size of object. More...
 

Protected Attributes

JPMT_t pmt
 PMT readout channel in FPGA. More...
 
JTDC_t tdc
 leading edge [ns] More...
 
JTOT_t tot
 time over threshold [ns] More...
 

Friends

JReaderoperator>> (JReader &in, JDAQHit &hit)
 Read DAQ hit from input. More...
 
JWriteroperator<< (JWriter &out, const JDAQHit &hit)
 Write DAQ hit to output. More...
 

Detailed Description

Hit data structure.

N.B. The size of this data structure (i.e. the value obtained with the sizeof() operator should exactly match the preset number of bytes from the DAQ system. The pragma statement is necessary to ensure the correct size of this object. Furthermore, this data structure should have no virtual methods and no virtual destructor. Consequently, the standard ROOT CLassDef() macro is replaced by the designated ClassDefNV() macro.

Definition at line 36 of file JDAQHit.hh.

Member Typedef Documentation

typedef unsigned char KM3NETDAQ::JDAQHit::JPMT_t

PMT channel in FPGA.

Definition at line 40 of file JDAQHit.hh.

typedef unsigned int KM3NETDAQ::JDAQHit::JTDC_t

leading edge [ns]

Definition at line 41 of file JDAQHit.hh.

typedef unsigned char KM3NETDAQ::JDAQHit::JTOT_t

time over threshold [ns]

Definition at line 42 of file JDAQHit.hh.

Constructor & Destructor Documentation

KM3NETDAQ::JDAQHit::JDAQHit ( )
inline

Default constructor.

Definition at line 48 of file JDAQHit.hh.

49  {}
KM3NETDAQ::JDAQHit::JDAQHit ( const JPMT_t  pmt_id,
const JTDC_t  tdc_ns,
const JTOT_t  tot_ns 
)
inline

Constructor.

Parameters
pmt_idPMT channel
tdc_nstime of hit [ns]
tot_nstime over threshold [ns]

Definition at line 59 of file JDAQHit.hh.

61  :
62  pmt(pmt_id),
63  tdc(htonl(tdc_ns)),
64  //tdc(tdc_ns),
65  tot(tot_ns)
66  {}
JTOT_t tot
time over threshold [ns]
Definition: JDAQHit.hh:164
JTDC_t tdc
leading edge [ns]
Definition: JDAQHit.hh:163
JPMT_t pmt
PMT readout channel in FPGA.
Definition: JDAQHit.hh:162

Member Function Documentation

JPMT_t KM3NETDAQ::JDAQHit::getPMT ( ) const
inline

Get PMT.

Returns
PMT

Definition at line 74 of file JDAQHit.hh.

75  {
76  return pmt;
77  }
JPMT_t pmt
PMT readout channel in FPGA.
Definition: JDAQHit.hh:162
JTDC_t KM3NETDAQ::JDAQHit::getT ( ) const
inline

Get time.

Returns
time [ns]

Definition at line 85 of file JDAQHit.hh.

86  {
87  return ntohl(tdc);
88  }
JTDC_t tdc
leading edge [ns]
Definition: JDAQHit.hh:163
JTOT_t KM3NETDAQ::JDAQHit::getToT ( ) const
inline

Get time-over-threshold.

Returns
time-over-threshold [ns]

Definition at line 96 of file JDAQHit.hh.

97  {
98  return tot;
99  }
JTOT_t tot
time over threshold [ns]
Definition: JDAQHit.hh:164
static JTOT_t KM3NETDAQ::JDAQHit::getMaximalToT ( )
inlinestatic

Get maximal time-over-threshold.

Returns
time-over-threshold [ns]

Definition at line 107 of file JDAQHit.hh.

108  {
109  return 0xFF;
110  }
static int KM3NETDAQ::JDAQHit::sizeOf ( )
inlinestatic

Get size of object.

Returns
number of bytes

Definition at line 152 of file JDAQHit.hh.

153  {
154  return sizeof(JDAQHit);
155  }
JDAQHit()
Default constructor.
Definition: JDAQHit.hh:48
KM3NETDAQ::JDAQHit::ClassDefNV ( JDAQHit  ,
 
)

Friends And Related Function Documentation

JReader& operator>> ( JReader in,
JDAQHit hit 
)
friend

Read DAQ hit from input.

Parameters
inJReader
hitJDAQHit
Returns
JReader

Definition at line 120 of file JDAQHit.hh.

121  {
122  in >> hit.pmt;
123  in >> hit.tdc;
124  in >> hit.tot;
125 
126  return in;
127  }
JWriter& operator<< ( JWriter out,
const JDAQHit hit 
)
friend

Write DAQ hit to output.

Parameters
outJWriter
hitJDAQHit
Returns
JWriter

Definition at line 137 of file JDAQHit.hh.

138  {
139  out << hit.pmt;
140  out << hit.tdc;
141  out << hit.tot;
142 
143  return out;
144  }

Member Data Documentation

JPMT_t KM3NETDAQ::JDAQHit::pmt
protected

PMT readout channel in FPGA.

Definition at line 162 of file JDAQHit.hh.

JTDC_t KM3NETDAQ::JDAQHit::tdc
protected

leading edge [ns]

Definition at line 163 of file JDAQHit.hh.

JTOT_t KM3NETDAQ::JDAQHit::tot
protected

time over threshold [ns]

Definition at line 164 of file JDAQHit.hh.


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