ATLAS Offline Software
Loading...
Searching...
No Matches
Error.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "L1TopoRDO/Error.h"
6
7namespace L1Topo {
8 std::ostream& operator<<(std::ostream& os, const Error e){
9 std::string text = "Unknown Error";
10 auto it = errorText.find(e);
11 if (it != errorText.end()){
12 text = it->second;
13 }
14 os << text;
15 return os;
16 }
17
18 std::ostream& operator<<(std::ostream& os, const std::vector<Error>& v){
19 os << "[";
20 std::string prefix="";
21 for (auto e : v){
22 os << prefix << e;
23 prefix=", ";
24 }
25 os << "]";
26 return os;
27 }
28
29} // namespace L1Topo
static const std::map< Error, std::string > errorText
Define the text to print for each error type above - bad design to put it in the header file?
Definition Error.h:18
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.
Definition Error.cxx:8
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition Error.h:16