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 <chrono>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#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 188 of file Issue.hpp.

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