ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerElement Class Reference

#include <L1Emu.h>

Inheritance diagram for TriggerElement:
Collaboration diagram for TriggerElement:

Public Member Functions

 TriggerElement (const std::string &threshold, size_t multiplicity)
virtual bool evaluate (const std::unordered_map< std::string, size_t > &resultMap, bool debug) const override final
const std::string & threshold () const
size_t multiplicity () const
virtual std::string to_string () const override final
virtual bool isGroup () const

Private Attributes

std::string m_threshold {""}
size_t m_multiplicity {0}

Detailed Description

Definition at line 29 of file L1Emu.h.

Constructor & Destructor Documentation

◆ TriggerElement()

TriggerElement::TriggerElement ( const std::string & threshold,
size_t multiplicity )
inline

Definition at line 35 of file L1Emu.h.

35 :
37 {}
std::string m_threshold
Definition L1Emu.h:31
size_t m_multiplicity
Definition L1Emu.h:32
const std::string & threshold() const
Definition L1Emu.h:41
size_t multiplicity() const
Definition L1Emu.h:43

Member Function Documentation

◆ evaluate()

bool TriggerElement::evaluate ( const std::unordered_map< std::string, size_t > & resultMap,
bool debug ) const
finaloverridevirtual

Implements LogicalElement.

Definition at line 15 of file L1Emu.cxx.

15 {
16 if(debug) {std::cout << m_threshold << " has multiplicity " << resultMap.at(m_threshold) << ", require " << m_multiplicity << std::endl;}
17 return resultMap.at(m_threshold)>=m_multiplicity;
18}
const bool debug

◆ isGroup()

virtual bool LogicalElement::isGroup ( ) const
inlinevirtualinherited

Reimplemented in TriggerGroup.

Definition at line 22 of file L1Emu.h.

22{return false;};

◆ multiplicity()

size_t TriggerElement::multiplicity ( ) const
inline

Definition at line 43 of file L1Emu.h.

43{return m_multiplicity;}

◆ threshold()

const std::string & TriggerElement::threshold ( ) const
inline

Definition at line 41 of file L1Emu.h.

41{return m_threshold;}

◆ to_string()

std::string TriggerElement::to_string ( ) const
finaloverridevirtual

Implements LogicalElement.

Definition at line 21 of file L1Emu.cxx.

21 {
22 std::stringstream ss;
23 ss << m_threshold << "[x" << m_multiplicity << "]";
24 return ss.str();
25}
static Double_t ss

Member Data Documentation

◆ m_multiplicity

size_t TriggerElement::m_multiplicity {0}
private

Definition at line 32 of file L1Emu.h.

32{0};

◆ m_threshold

std::string TriggerElement::m_threshold {""}
private

Definition at line 31 of file L1Emu.h.

31{""};

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