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 189 of file Issue.hpp.

197{
198 string_map::const_iterator it = m_values.find(key);
199 if ( it == m_values.end() )
200 {
201 throw ers::NoValue( ERS_HERE, key );
202 }
203 std::istringstream in( it->second );
204 in >> value;
205}
206
207template <typename T>
208void
209ers::Issue::set_value( const std::string & key, T value )
210{
211 std::ostringstream out;
212 out << value;
213 m_values[key] = out.str();
214}
#define ERS_HERE
void set_value(const std::string &key, T value)
string_map m_values
List of user defined attributes.
Definition Issue.hpp:179
FELIX Initialization std::string initerror FELIX queue timed out