ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
 ~CTPTriggerItem ()
 default destructor More...
 
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 More...
 
unsigned int m_ctpid { 1 }
 CTPID. More...
 
unsigned char m_TriggerType { 0 }
 8 bit trigger type (4 bit for secondary partitions) More...
 
int m_prescale { 1 }
 prescale value More...
 
std::shared_ptr< TrigConf::Logicm_logic
 the definition of the item turned into a Logic object More...
 
std::vector< std::string > m_bunchGroups
 the list of bunchgroups forming this item More...
 

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 }

◆ ctpId()

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

Definition at line 40 of file CTPTriggerItem.cxx.

40  {
41  return m_ctpid;
42 }

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

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

◆ prescale()

int LVL1CTP::CTPTriggerItem::prescale ( ) const

Definition at line 24 of file CTPTriggerItem.cxx.

24  {
25  return m_prescale;
26 }

◆ setBunchGroups()

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

Definition at line 72 of file CTPTriggerItem.cxx.

72  {
74 }

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

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

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

◆ m_prescale

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

prescale value

Definition at line 57 of file CTPTriggerItem.h.

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


The documentation for this class was generated from the following files:
LVL1CTP::CTPTriggerItem::m_bunchGroups
std::vector< std::string > m_bunchGroups
the list of bunchgroups forming this item
Definition: CTPTriggerItem.h:59
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LVL1CTP::CTPTriggerItem::m_TriggerType
unsigned char m_TriggerType
8 bit trigger type (4 bit for secondary partitions)
Definition: CTPTriggerItem.h:56
LVL1CTP::CTPTriggerItem::prescale
int prescale() const
Definition: CTPTriggerItem.cxx:24
LVL1CTP::CTPTriggerItem::triggerType
unsigned char triggerType() const
Definition: CTPTriggerItem.cxx:55
LVL1CTP::CTPTriggerItem::bunchGroups
const std::vector< std::string > & bunchGroups() const
Definition: CTPTriggerItem.cxx:77
calibdata.exception
exception
Definition: calibdata.py:496
LVL1CTP::CTPTriggerItem::m_name
std::string m_name
item name
Definition: CTPTriggerItem.h:54
LVL1CTP::CTPTriggerItem::name
const std::string & name() const
Definition: CTPTriggerItem.cxx:35
LVL1CTP::CTPTriggerItem::m_ctpid
unsigned int m_ctpid
CTPID.
Definition: CTPTriggerItem.h:55
LVL1CTP::CTPTriggerItem::m_prescale
int m_prescale
prescale value
Definition: CTPTriggerItem.h:57
LVL1CTP::CTPTriggerItem::m_logic
std::shared_ptr< TrigConf::Logic > m_logic
the definition of the item turned into a Logic object
Definition: CTPTriggerItem.h:58