LDMX Software
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ldmx::HgcrocTrigDigi Class Reference

Contains the trigger output for a single trigger hgcroc channel. More...

#include <HgcrocTrigDigi.h>

Public Member Functions

 HgcrocTrigDigi ()=default
 Default Constructor.
 
 HgcrocTrigDigi (uint32_t tid, uint8_t tp=0)
 Preferred Constructor.
 
virtual ~HgcrocTrigDigi ()=default
 Destructor.
 
bool operator< (const HgcrocTrigDigi &digi)
 Sort the collection to trig digis by the raw ID.
 
uint32_t getId () const
 Get the id of the digi.
 
void setPrimitive (uint8_t tp)
 Set the trigger primitive (7 bits) for the given link on a channel @params[in] tp the value of the trigger primitive.
 
uint8_t getPrimitive () const
 Get the trigger primitive (7 bits) for the given link on a channel.
 
uint32_t linearPrimitive () const
 Get the linearized value of the trigger primitive.
 
void Print () const
 Print a description of this object.
 

Static Public Member Functions

static uint8_t linear2Compressed (uint32_t lin)
 Static conversion from 18b linear -> compressed.
 
static uint32_t compressed2Linear (uint8_t comp)
 Static conversion from compressed -> linear 18b.
 

Private Member Functions

 ClassDef (HgcrocTrigDigi, 1)
 ROOT Dictionary class definition macro.
 

Private Attributes

uint32_t tid_ {0}
 the raw ID for this trigger channel
 
uint8_t tp_ {0}
 the compressed 7bit trigger primitive value for this channel
 

Friends

std::ostream & operator<< (std::ostream &o, const HgcrocTrigDigi &d)
 Stream the input digi.
 
std::ostream & operator<< (std::ostream &o, const HgcrocTrigDigiCollection &c)
 Stream the input digi collection.
 

Detailed Description

Contains the trigger output for a single trigger hgcroc channel.

Definition at line 24 of file HgcrocTrigDigi.h.

Constructor & Destructor Documentation

◆ HgcrocTrigDigi() [1/2]

ldmx::HgcrocTrigDigi::HgcrocTrigDigi ( )
default

Default Constructor.

Needed for ROOT dictionary definition, suggested to not use this constructor.

◆ HgcrocTrigDigi() [2/2]

ldmx::HgcrocTrigDigi::HgcrocTrigDigi ( uint32_t  tid,
uint8_t  tp = 0 
)

Preferred Constructor.

Defines the trigger group ID and the trigger primitive value.

Parameters
[in]tidraw trigger group ID
[in]tptrigger primitive value

◆ ~HgcrocTrigDigi()

virtual ldmx::HgcrocTrigDigi::~HgcrocTrigDigi ( )
virtualdefault

Destructor.

Needs to be defined for ROOT dictionary definition, does nothing right now.

Member Function Documentation

◆ compressed2Linear()

static uint32_t ldmx::HgcrocTrigDigi::compressed2Linear ( uint8_t  comp)
static

Static conversion from compressed -> linear 18b.

Parameters
[in]compcompressed 7bit ADC value
Returns
equivalent linearized 18bit ADC value

Referenced by linearPrimitive(), and hcal::HcalTrigPrimDigiProducer::produce().

◆ getId()

uint32_t ldmx::HgcrocTrigDigi::getId ( ) const
inline

Get the id of the digi.

Returns
raw trigger ID

Definition at line 67 of file HgcrocTrigDigi.h.

67{ return tid_; }
uint32_t tid_
the raw ID for this trigger channel

References tid_.

◆ getPrimitive()

uint8_t ldmx::HgcrocTrigDigi::getPrimitive ( ) const
inline

Get the trigger primitive (7 bits) for the given link on a channel.

Returns
the value of the trigger primitive

Definition at line 79 of file HgcrocTrigDigi.h.

79{ return tp_; }
uint8_t tp_
the compressed 7bit trigger primitive value for this channel

References tp_.

Referenced by linearPrimitive().

◆ linear2Compressed()

static uint8_t ldmx::HgcrocTrigDigi::linear2Compressed ( uint32_t  lin)
static

Static conversion from 18b linear -> compressed.

Parameters
[in]linlinearized 18bit ADC value
Returns
equivalent compressed 7bit ADC value

Referenced by ldmx::HgcrocTriggerCalculations::compressDigis().

◆ linearPrimitive()

uint32_t ldmx::HgcrocTrigDigi::linearPrimitive ( ) const
inline

Get the linearized value of the trigger primitive.

Returns
the linearized (unpacked) trigger primitive value

Definition at line 85 of file HgcrocTrigDigi.h.

static uint32_t compressed2Linear(uint8_t comp)
Static conversion from compressed -> linear 18b.
uint8_t getPrimitive() const
Get the trigger primitive (7 bits) for the given link on a channel.

References compressed2Linear(), and getPrimitive().

◆ operator<()

bool ldmx::HgcrocTrigDigi::operator< ( const HgcrocTrigDigi digi)
inline

Sort the collection to trig digis by the raw ID.

Parameters
[in]danother digi to compare against
Returns
true if this ID is less than the other ID

Definition at line 61 of file HgcrocTrigDigi.h.

61{ return tid_ < digi.tid_; }

References tid_.

◆ setPrimitive()

void ldmx::HgcrocTrigDigi::setPrimitive ( uint8_t  tp)
inline

Set the trigger primitive (7 bits) for the given link on a channel @params[in] tp the value of the trigger primitive.

Definition at line 73 of file HgcrocTrigDigi.h.

73{ tp_ = tp; }

References tp_.

Friends And Related Symbol Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  o,
const HgcrocTrigDigi d 
)
friend

Stream the input digi.

In one line, prints out the ID (in hex), the primitive (in hex), and the linearized primitive (in dec).

Parameters
[in]oostream to write to
[in]ddigi to write out
Returns
modified ostream

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  o,
const HgcrocTrigDigiCollection &  c 
)
friend

Stream the input digi collection.

Prints out each digi member of the collection on a new line.

Parameters
[in]oostream to write to
[in]ccollection to write out
Returns
modified ostream

Member Data Documentation

◆ tid_

uint32_t ldmx::HgcrocTrigDigi::tid_ {0}
private

the raw ID for this trigger channel

Definition at line 136 of file HgcrocTrigDigi.h.

136{0};

Referenced by getId(), and operator<().

◆ tp_

uint8_t ldmx::HgcrocTrigDigi::tp_ {0}
private

the compressed 7bit trigger primitive value for this channel

Definition at line 138 of file HgcrocTrigDigi.h.

138{0};

Referenced by getPrimitive(), and setPrimitive().


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