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

Contains the trigger output for generic calo objects. More...

#include <CaloTrigPrim.h>

Public Member Functions

 CaloTrigPrim ()=default
 Default Constructor.
 
 CaloTrigPrim (uint32_t tid, uint32_t tp=0)
 Preferred Constructor.
 
virtual ~CaloTrigPrim ()=default
 Destructor.
 
bool operator< (const CaloTrigPrim &c)
 Sort the collection of CaloTPs by the raw ID.
 
uint32_t getId () const
 Get the id of the CaloTP.
 
void setPrimitive (uint32_t tp)
 Set the trigger primitive value for the given channel @params[in] tp the value of the trigger primitive.
 
uint32_t getPrimitive () const
 Get the trigger primitive value for the given channel.
 
void Print () const
 Print a description of this object.
 

Private Member Functions

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

Private Attributes

uint32_t tid_ {0}
 the raw ID for this trigger channel
 
uint32_t tp_ {0}
 the integer trigger primitive value for this channel
 

Friends

std::ostream & operator<< (std::ostream &s, const CaloTrigPrim &c)
 Stream the input CaloTP.
 
std::ostream & operator<< (std::ostream &s, const CaloTrigPrimCollection &c)
 Stream the input tp collection.
 

Detailed Description

Contains the trigger output for generic calo objects.

Definition at line 24 of file CaloTrigPrim.h.

Constructor & Destructor Documentation

◆ CaloTrigPrim() [1/2]

ldmx::CaloTrigPrim::CaloTrigPrim ( )
default

Default Constructor.

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

◆ CaloTrigPrim() [2/2]

ldmx::CaloTrigPrim::CaloTrigPrim ( uint32_t  tid,
uint32_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

◆ ~CaloTrigPrim()

virtual ldmx::CaloTrigPrim::~CaloTrigPrim ( )
virtualdefault

Destructor.

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

Member Function Documentation

◆ getId()

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

Get the id of the CaloTP.

Returns
raw trigger ID

Definition at line 67 of file CaloTrigPrim.h.

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

References tid_.

◆ getPrimitive()

uint32_t ldmx::CaloTrigPrim::getPrimitive ( ) const
inline

Get the trigger primitive value for the given channel.

Returns
the value of the trigger primitive

Definition at line 79 of file CaloTrigPrim.h.

79{ return tp_; }
uint32_t tp_
the integer trigger primitive value for this channel

References tp_.

◆ operator<()

bool ldmx::CaloTrigPrim::operator< ( const CaloTrigPrim c)
inline

Sort the collection of CaloTPs by the raw ID.

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

Definition at line 61 of file CaloTrigPrim.h.

61{ return tid_ < c.tid_; }

References tid_.

◆ setPrimitive()

void ldmx::CaloTrigPrim::setPrimitive ( uint32_t  tp)
inline

Set the trigger primitive value for the given channel @params[in] tp the value of the trigger primitive.

Definition at line 73 of file CaloTrigPrim.h.

73{ tp_ = tp; }

References tp_.

Friends And Related Symbol Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  s,
const CaloTrigPrim c 
)
friend

Stream the input CaloTP.

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

Parameters
[in]sostream to write to
[in]dtp to write out
Returns
modified ostream

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  s,
const CaloTrigPrimCollection &  c 
)
friend

Stream the input tp collection.

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

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

Member Data Documentation

◆ tid_

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

the raw ID for this trigger channel

Definition at line 113 of file CaloTrigPrim.h.

113{0};

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

◆ tp_

uint32_t ldmx::CaloTrigPrim::tp_ {0}
private

the integer trigger primitive value for this channel

Definition at line 115 of file CaloTrigPrim.h.

115{0};

Referenced by getPrimitive(), and setPrimitive().


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