DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Issue.hpp File Reference
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <map>
#include <string>
#include <iostream>
#include <sstream>
#include <memory>
#include <chrono>
#include <list>
#include <ers/IssueFactory.hpp>
#include <ers/LocalContext.hpp>
#include <ers/Severity.hpp>
#include <ers/internal/IssueDeclarationMacro.hpp>
Include dependency graph for Issue.hpp:

Go to the source code of this file.

Classes

class  ers::IssueRegistrator< T >
class  ers::Issue
 Base class for any user define issue. More...

Namespaces

namespace  ers

Typedefs

typedef std::map< std::string, std::string > ers::string_map
using ers::inheritance_type = std::list<std::string>

Functions

std::ostream & ers::operator<< (std::ostream &, const ers::Issue &)
 ERS_DECLARE_ISSUE (ers, NoValue, "value for the \""<< key<< "\" key is not set ",((std::string) key)) template< typename T > void ers

Function Documentation

◆ ERS_DECLARE_ISSUE()

ERS_DECLARE_ISSUE ( ers ,
NoValue ,
"value for the \""<< key<< "\" key is not set " ,
((std::string) key)  )

Definition at line 200 of file Issue.hpp.

208{
209 string_map::const_iterator it = m_values.find(key);
210 if ( it == m_values.end() )
211 {
212 throw ers::NoValue( ERS_HERE, key );
213 }
214 std::istringstream in( it->second );
215 in >> value;
216}
217
218template <typename T>
219void
220ers::Issue::set_value( const std::string & key, T value )
221{
222 std::ostringstream out;
223 out << value;
224 m_values[key] = out.str();
225}
#define ERS_HERE
void set_value(const std::string &key, T value)
string_map m_values
List of user defined attributes.
Definition Issue.hpp:190
FELIX Initialization std::string initerror FELIX queue timed out