ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrigOperationalInfo Class Reference

This class defined generic object to store operational info available during triggering online i.e. More...

#include <TrigOperationalInfo.h>

Collaboration diagram for TrigOperationalInfo:

Public Member Functions

 TrigOperationalInfo ()
 
 TrigOperationalInfo (const std::vector< std::string > &keys, const std::vector< float > &values)
 
unsigned int defined (const std::string &name) const
 
float get (const std::string &name) const
 
void set (const std::string &name, float value)
 
std::pair< std::vector< std::string >, std::vector< float > > infos () const
 
const std::vector< std::string > & getKeys () const
 
const std::vector< float > & getValues () const
 
void updateAtLocation (unsigned int location, float value)
 

Private Attributes

std::vector< std::string > m_infoName
 
std::vector< float > m_infoValue
 

Detailed Description

This class defined generic object to store operational info available during triggering online i.e.

timing infomration. To avoid various problems reated to schema evolution this are just key: value pairs while value is always of type float (OK we can think about templating this for int and float maybe)

Definition at line 27 of file TrigOperationalInfo.h.

Constructor & Destructor Documentation

◆ TrigOperationalInfo() [1/2]

TrigOperationalInfo::TrigOperationalInfo ( )

Definition at line 10 of file TrigOperationalInfo.cxx.

10  {
11 
12 }

◆ TrigOperationalInfo() [2/2]

TrigOperationalInfo::TrigOperationalInfo ( const std::vector< std::string > &  keys,
const std::vector< float > &  values 
)

Definition at line 14 of file TrigOperationalInfo.cxx.

16  : m_infoName (keys),
18 {
19 }

Member Function Documentation

◆ defined()

unsigned int TrigOperationalInfo::defined ( const std::string &  name) const

Definition at line 21 of file TrigOperationalInfo.cxx.

21  {
22  return count( m_infoName.begin(), m_infoName.end(), name );
23 }

◆ get()

float TrigOperationalInfo::get ( const std::string &  name) const

Definition at line 25 of file TrigOperationalInfo.cxx.

25  {
26  std::vector<std::string>::const_iterator it;
27  it = find ( m_infoName.begin(), m_infoName.end(), name );
28  return m_infoValue[it - m_infoName.begin()];
29 }

◆ getKeys()

const std::vector< std::string > & TrigOperationalInfo::getKeys ( ) const

Definition at line 41 of file TrigOperationalInfo.cxx.

41  {
42  return m_infoName;
43 }

◆ getValues()

const std::vector< float > & TrigOperationalInfo::getValues ( ) const

Definition at line 45 of file TrigOperationalInfo.cxx.

45  {
46  return m_infoValue;
47 }

◆ infos()

std::pair< std::vector< std::string >, std::vector< float > > TrigOperationalInfo::infos ( ) const

Definition at line 37 of file TrigOperationalInfo.cxx.

37  {
38  return std::make_pair(m_infoName, m_infoValue);
39 }

◆ set()

void TrigOperationalInfo::set ( const std::string &  name,
float  value 
)

Definition at line 31 of file TrigOperationalInfo.cxx.

31  {
32  // Tim Martin - April 2016. Removed code which enforces unique names. Rquired by use in Cost Monitoring.
33  m_infoName.push_back(name);
34  m_infoValue.push_back(value);
35 }

◆ updateAtLocation()

void TrigOperationalInfo::updateAtLocation ( unsigned int  location,
float  value 
)

Definition at line 49 of file TrigOperationalInfo.cxx.

49  {
50  m_infoValue.at(location) = value;
51 }

Member Data Documentation

◆ m_infoName

std::vector<std::string> TrigOperationalInfo::m_infoName
private

Definition at line 42 of file TrigOperationalInfo.h.

◆ m_infoValue

std::vector<float> TrigOperationalInfo::m_infoValue
private

Definition at line 43 of file TrigOperationalInfo.h.


The documentation for this class was generated from the following files:
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
skel.it
it
Definition: skel.GENtoEVGEN.py:396
athena.value
value
Definition: athena.py:124
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
TrigOperationalInfo::m_infoName
std::vector< std::string > m_infoName
Definition: TrigOperationalInfo.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TrigOperationalInfo::m_infoValue
std::vector< float > m_infoValue
Definition: TrigOperationalInfo.h:43