ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1CTP::CTPTriggerItem Class Reference

Class storing information helping to make the CTP decision. More...

#include <CTPTriggerItem.h>

Collaboration diagram for LVL1CTP::CTPTriggerItem:

Public Member Functions

 CTPTriggerItem ()
 constructor setting trigger item and corresponding prescale
 ~CTPTriggerItem ()
 default destructor
void setLogic (const std::string &logicExpr)
const std::shared_ptr< TrigConf::Logic > & logic () const
void setBunchGroups (const std::vector< std::string > &bunchGroups)
const std::vector< std::string > & bunchGroups () const
void setCtpId (unsigned int ctpid)
unsigned int ctpId () const
void setName (const std::string &name)
const std::string & name () const
void setTriggerType (unsigned char triggerType)
unsigned char triggerType () const
void setPrescale (int prescale)
int prescale () const
bool evaluate (const std::map< std::string, unsigned int > &thrDecMap) const

Private Attributes

std::string m_name { "" }
 item name
unsigned int m_ctpid { 1 }
 CTPID.
unsigned char m_TriggerType { 0 }
 8 bit trigger type (4 bit for secondary partitions)
int m_prescale { 1 }
 prescale value
std::shared_ptr< TrigConf::Logicm_logic
 the definition of the item turned into a Logic object
std::vector< std::string > m_bunchGroups
 the list of bunchgroups forming this item

Detailed Description

Class storing information helping to make the CTP decision.

Definition at line 23 of file CTPTriggerItem.h.

Constructor & Destructor Documentation

◆ CTPTriggerItem()

LVL1CTP::CTPTriggerItem::CTPTriggerItem ( )

constructor setting trigger item and corresponding prescale

Definition at line 11 of file CTPTriggerItem.cxx.

12{}

◆ ~CTPTriggerItem()

LVL1CTP::CTPTriggerItem::~CTPTriggerItem ( )

default destructor

Definition at line 14 of file CTPTriggerItem.cxx.

15{}

Member Function Documentation

◆ bunchGroups()

const std::vector< std::string > & LVL1CTP::CTPTriggerItem::bunchGroups ( ) const

Definition at line 77 of file CTPTriggerItem.cxx.

77 {
78 return m_bunchGroups;
79}
std::vector< std::string > m_bunchGroups
the list of bunchgroups forming this item

◆ ctpId()

unsigned int LVL1CTP::CTPTriggerItem::ctpId ( ) const

Definition at line 40 of file CTPTriggerItem.cxx.

40 {
41 return m_ctpid;
42}
unsigned int m_ctpid
CTPID.

◆ evaluate()

bool LVL1CTP::CTPTriggerItem::evaluate ( const std::map< std::string, unsigned int > & thrDecMap) const

Definition at line 83 of file CTPTriggerItem.cxx.

84{
85 if(m_logic) {
86 bool dec = m_logic->evaluate(thrDecMap);
87 if( dec && (! m_bunchGroups.empty()) ) {
88 // apply bunchgroups, if set (if not set, it is part of the logic)
89 for( auto & bgName : m_bunchGroups ) {
90 try {
91 if( thrDecMap.at(bgName) == 0 ) {
92 dec = false; break;
93 }
94 }
95 catch(std::exception &) {
96 throw std::runtime_error( "Problem accessing decision for bunchgroup " + bgName);
97 }
98 }
99 }
100 return dec;
101 } else {
102 std::cerr << "No logic set for this ctpItem " << name() << std::endl;
103 return false;
104 }
105}
std::shared_ptr< TrigConf::Logic > m_logic
the definition of the item turned into a Logic object
const std::string & name() const

◆ logic()

const std::shared_ptr< TrigConf::Logic > & LVL1CTP::CTPTriggerItem::logic ( ) const

Definition at line 67 of file CTPTriggerItem.cxx.

67 {
68 return m_logic;
69}

◆ name()

const std::string & LVL1CTP::CTPTriggerItem::name ( ) const

Definition at line 35 of file CTPTriggerItem.cxx.

35 {
36 return m_name;
37}
std::string m_name
item name

◆ prescale()

int LVL1CTP::CTPTriggerItem::prescale ( ) const

Definition at line 24 of file CTPTriggerItem.cxx.

24 {
25 return m_prescale;
26}
int m_prescale
prescale value

◆ setBunchGroups()

void LVL1CTP::CTPTriggerItem::setBunchGroups ( const std::vector< std::string > & bunchGroups)

Definition at line 72 of file CTPTriggerItem.cxx.

72 {
74}
const std::vector< std::string > & bunchGroups() const

◆ setCtpId()

void LVL1CTP::CTPTriggerItem::setCtpId ( unsigned int ctpid)

Definition at line 45 of file CTPTriggerItem.cxx.

45 {
46 m_ctpid = ctpid;
47}

◆ setLogic()

void LVL1CTP::CTPTriggerItem::setLogic ( const std::string & logicExpr)

Definition at line 60 of file CTPTriggerItem.cxx.

60 {
61 TrigConf::LogicParser p;
62 m_logic = p.parse(logicExpr);
63}

◆ setName()

void LVL1CTP::CTPTriggerItem::setName ( const std::string & name)

Definition at line 29 of file CTPTriggerItem.cxx.

29 {
30 m_name = name;
31}

◆ setPrescale()

void LVL1CTP::CTPTriggerItem::setPrescale ( int prescale)

Definition at line 18 of file CTPTriggerItem.cxx.

18 {
20}

◆ setTriggerType()

void LVL1CTP::CTPTriggerItem::setTriggerType ( unsigned char triggerType)

Definition at line 50 of file CTPTriggerItem.cxx.

50 {
51 m_TriggerType = (triggerType & 0xff);
52}
unsigned char triggerType() const
unsigned char m_TriggerType
8 bit trigger type (4 bit for secondary partitions)

◆ triggerType()

unsigned char LVL1CTP::CTPTriggerItem::triggerType ( ) const

Definition at line 55 of file CTPTriggerItem.cxx.

55 {
56 return m_TriggerType;
57}

Member Data Documentation

◆ m_bunchGroups

std::vector<std::string> LVL1CTP::CTPTriggerItem::m_bunchGroups
private

the list of bunchgroups forming this item

Definition at line 59 of file CTPTriggerItem.h.

◆ m_ctpid

unsigned int LVL1CTP::CTPTriggerItem::m_ctpid { 1 }
private

CTPID.

Definition at line 55 of file CTPTriggerItem.h.

55{ 1 };

◆ m_logic

std::shared_ptr<TrigConf::Logic> LVL1CTP::CTPTriggerItem::m_logic
private

the definition of the item turned into a Logic object

Definition at line 58 of file CTPTriggerItem.h.

◆ m_name

std::string LVL1CTP::CTPTriggerItem::m_name { "" }
private

item name

Definition at line 54 of file CTPTriggerItem.h.

54{ "" };

◆ m_prescale

int LVL1CTP::CTPTriggerItem::m_prescale { 1 }
private

prescale value

Definition at line 57 of file CTPTriggerItem.h.

57{ 1 };

◆ m_TriggerType

unsigned char LVL1CTP::CTPTriggerItem::m_TriggerType { 0 }
private

8 bit trigger type (4 bit for secondary partitions)

Definition at line 56 of file CTPTriggerItem.h.

56{ 0 };

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