Jpp
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
KM3NETDAQ::JDAQKeyHit Class Reference

DAQ key hit. More...

#include <JDAQKeyHit.hh>

Inheritance diagram for KM3NETDAQ::JDAQKeyHit:
KM3NETDAQ::JDAQModuleIdentifier KM3NETDAQ::JDAQHit 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

 JDAQKeyHit ()
 Default constructor. More...
 
 JDAQKeyHit (const JDAQModuleIdentifier &id, const JDAQHit &hit)
 Constructor. More...
 
virtual ~JDAQKeyHit ()
 Virtual destructor. More...
 
 operator JDAQPMTIdentifier () const
 Type conversion operator. More...
 
 ClassDef (JDAQKeyHit, 1)
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier. More...
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier. More...
 
int getModuleID () const
 Get module identifier. More...
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 
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 int sizeOf ()
 Get size of object. More...
 
static JTOT_t getMaximalToT ()
 Get maximal time-over-threshold. More...
 

Protected Attributes

int id
 
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, JDAQKeyHit &hit)
 Read JDAQKeyHit from input. More...
 
JWriteroperator<< (JWriter &out, const JDAQKeyHit &hit)
 Write JDAQKeyHit to output. More...
 

Detailed Description

DAQ key hit.

Definition at line 24 of file JDAQKeyHit.hh.

Member Typedef Documentation

◆ JPMT_t

typedef unsigned char KM3NETDAQ::JDAQHit::JPMT_t
inherited

PMT channel in FPGA.

Definition at line 44 of file JDAQHit.hh.

◆ JTDC_t

typedef unsigned int KM3NETDAQ::JDAQHit::JTDC_t
inherited

leading edge [ns]

Definition at line 45 of file JDAQHit.hh.

◆ JTOT_t

typedef unsigned char KM3NETDAQ::JDAQHit::JTOT_t
inherited

time over threshold [ns]

Definition at line 46 of file JDAQHit.hh.

Constructor & Destructor Documentation

◆ JDAQKeyHit() [1/2]

KM3NETDAQ::JDAQKeyHit::JDAQKeyHit ( )
inline

Default constructor.

Definition at line 34 of file JDAQKeyHit.hh.

34  :
36  JDAQHit()
37  {}

◆ JDAQKeyHit() [2/2]

KM3NETDAQ::JDAQKeyHit::JDAQKeyHit ( const JDAQModuleIdentifier id,
const JDAQHit hit 
)
inline

Constructor.

Parameters
idmodule identifier
hitPMT hit

Definition at line 46 of file JDAQKeyHit.hh.

47  :
49  JDAQHit(hit)
50  {}

◆ ~JDAQKeyHit()

virtual KM3NETDAQ::JDAQKeyHit::~JDAQKeyHit ( )
inlinevirtual

Virtual destructor.

Definition at line 56 of file JDAQKeyHit.hh.

57  {}

Member Function Documentation

◆ operator JDAQPMTIdentifier()

KM3NETDAQ::JDAQKeyHit::operator JDAQPMTIdentifier ( ) const
inline

Type conversion operator.

Returns
axis

Definition at line 65 of file JDAQKeyHit.hh.

66  {
67  return JDAQPMTIdentifier(this->getModuleID(), this->getPMT());
68  }

◆ sizeOf()

static int KM3NETDAQ::JDAQKeyHit::sizeOf ( )
inlinestatic

Get size of object.

Returns
number of bytes

Definition at line 108 of file JDAQKeyHit.hh.

109  {
110  return (JDAQModuleIdentifier::sizeOf() +
111  JDAQHit ::sizeOf());
112  }

◆ ClassDef()

KM3NETDAQ::JDAQKeyHit::ClassDef ( JDAQKeyHit  ,
 
)

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

73  {
74  return id;
75  }

◆ ClassDefNV() [1/2]

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

◆ getPMT()

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

Get PMT.

Returns
PMT

Definition at line 78 of file JDAQHit.hh.

79  {
80  return pmt;
81  }

◆ getT()

JTDC_t KM3NETDAQ::JDAQHit::getT ( ) const
inlineinherited

Get time.

Returns
time [ns]

Definition at line 89 of file JDAQHit.hh.

90  {
91  return ntohl(tdc);
92  }

◆ getToT()

JTOT_t KM3NETDAQ::JDAQHit::getToT ( ) const
inlineinherited

Get time-over-threshold.

Returns
time-over-threshold [ns]

Definition at line 100 of file JDAQHit.hh.

101  {
102  return tot;
103  }

◆ getMaximalToT()

static JTOT_t KM3NETDAQ::JDAQHit::getMaximalToT ( )
inlinestaticinherited

Get maximal time-over-threshold.

Returns
time-over-threshold [ns]

Definition at line 111 of file JDAQHit.hh.

112  {
113  return 0xFF;
114  }

◆ ClassDefNV() [2/2]

KM3NETDAQ::JDAQHit::ClassDefNV ( JDAQHit  ,
 
)
inherited

Friends And Related Function Documentation

◆ operator>>

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

Read JDAQKeyHit from input.

Parameters
inJReader
hitJDAQKeyHit
Returns
JReader

Definition at line 78 of file JDAQKeyHit.hh.

79  {
80  in >> static_cast<JDAQModuleIdentifier&>(hit);
81  in >> static_cast<JDAQHit&> (hit);
82 
83  return in;
84  }

◆ operator<<

JWriter& operator<< ( JWriter out,
const JDAQKeyHit hit 
)
friend

Write JDAQKeyHit to output.

Parameters
outJWriter
hitJDAQKeyHit
Returns
JWriter

Definition at line 94 of file JDAQKeyHit.hh.

95  {
96  out << static_cast<const JDAQModuleIdentifier&>(hit);
97  out << static_cast<const JDAQHit&> (hit);
98 
99  return out;
100  }

Member Data Documentation

◆ id

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 153 of file JDAQModuleIdentifier.hh.

◆ pmt

JPMT_t KM3NETDAQ::JDAQHit::pmt
protectedinherited

PMT readout channel in FPGA.

Definition at line 206 of file JDAQHit.hh.

◆ tdc

JTDC_t KM3NETDAQ::JDAQHit::tdc
protectedinherited

leading edge [ns]

Definition at line 207 of file JDAQHit.hh.

◆ tot

JTOT_t KM3NETDAQ::JDAQHit::tot
protectedinherited

time over threshold [ns]

Definition at line 208 of file JDAQHit.hh.


The documentation for this class was generated from the following file:
KM3NETDAQ::JDAQHit::pmt
JPMT_t pmt
PMT readout channel in FPGA.
Definition: JDAQHit.hh:206
KM3NETDAQ::JDAQModuleIdentifier::sizeOf
static int sizeOf()
Get size of object.
Definition: JDAQModuleIdentifier.hh:143
KM3NETDAQ::JDAQHit::getPMT
JPMT_t getPMT() const
Get PMT.
Definition: JDAQHit.hh:78
KM3NETDAQ::JDAQHit::tot
JTOT_t tot
time over threshold [ns]
Definition: JDAQHit.hh:208
KM3NETDAQ::JDAQHit::JDAQHit
JDAQHit()
Default constructor.
Definition: JDAQHit.hh:52
KM3NETDAQ::JDAQModuleIdentifier::getModuleID
int getModuleID() const
Get module identifier.
Definition: JDAQModuleIdentifier.hh:72
KM3NETDAQ::JDAQModuleIdentifier::id
int id
Definition: JDAQModuleIdentifier.hh:153
KM3NETDAQ::JDAQHit::sizeOf
static int sizeOf()
Get size of object.
Definition: JDAQHit.hh:196
KM3NETDAQ::JDAQModuleIdentifier::JDAQModuleIdentifier
JDAQModuleIdentifier()
Default constructor.
Definition: JDAQModuleIdentifier.hh:30
KM3NETDAQ::JDAQHit::tdc
JTDC_t tdc
leading edge [ns]
Definition: JDAQHit.hh:207