Belle II Software development
SoftwareTriggerVariables Class Reference

Storable object for the variables calculated in the SoftwareTriggerModule. More...

#include <SoftwareTriggerVariables.h>

Inheritance diagram for SoftwareTriggerVariables:

Public Member Functions

void append (const std::string &identifier, const double &value)
 Append a new variable to the collection. Make sure not to override existing ones.
 
const std::map< std::string, double > & get () const
 Get the whole map of results for analysis.
 
double getVariable (std::string identifier) const
 Get just one value from the map.
 
bool has (std::string identifier) const
 Returns true if indentifier is in the map of trigger variables.
 
void clear ()
 Clear all results.
 

Private Member Functions

 ClassDef (SoftwareTriggerVariables, 1)
 Making this class a ROOT class.
 

Private Attributes

std::map< std::string, double > m_results
 Internal storage of the variables with names.
 

Detailed Description

Storable object for the variables calculated in the SoftwareTriggerModule.

The module will write out instances of this class to the data store if you turn on the debug feature.

This class is more or less only a wrapper around an std::map<string, double> where the strings are the identifier of the variables (prefixed with the base_identifier) and the double are the variables' values.

Definition at line 28 of file SoftwareTriggerVariables.h.

Member Function Documentation

◆ append()

void append ( const std::string &  identifier,
const double &  value 
)
inline

Append a new variable to the collection. Make sure not to override existing ones.

Definition at line 31 of file SoftwareTriggerVariables.h.

32 {
33 m_results[identifier] = value;
34 }
std::map< std::string, double > m_results
Internal storage of the variables with names.

◆ clear()

void clear ( )
inline

Clear all results.

Definition at line 55 of file SoftwareTriggerVariables.h.

56 {
57 m_results.clear();
58 }

◆ get()

const std::map< std::string, double > & get ( ) const
inline

Get the whole map of results for analysis.

Definition at line 37 of file SoftwareTriggerVariables.h.

38 {
39 return m_results;
40 }

◆ getVariable()

double getVariable ( std::string  identifier) const
inline

Get just one value from the map.

Definition at line 43 of file SoftwareTriggerVariables.h.

44 {
45 return m_results.at(identifier);
46 }

◆ has()

bool has ( std::string  identifier) const
inline

Returns true if indentifier is in the map of trigger variables.

Definition at line 49 of file SoftwareTriggerVariables.h.

50 {
51 return m_results.count(identifier) > 0;
52 }

Member Data Documentation

◆ m_results

std::map<std::string, double> m_results
private

Internal storage of the variables with names.

Definition at line 62 of file SoftwareTriggerVariables.h.


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