ATLAS Offline Software
Calorimeter
CaloIdentifier
src
CaloID_Exception.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
CaloIdentifier/CaloID_Exception.h
"
6
#include "
CxxUtils/StrFormat.h
"
7
8
using
CxxUtils::strformat
;
9
10
11
CaloID_Exception::CaloID_Exception
() :
12
m_message(
"No error message"
) , m_code( 999 )
13
{ }
14
15
CaloID_Exception::CaloID_Exception
(
const
std::string& lMessage ,
int
lCode) :
16
m_message ( lMessage ) , m_code ( lCode )
17
{ }
18
19
void
CaloID_Exception::message
(
const
std::string& lMessage)
20
{
m_message
= lMessage ;}
21
22
const
std::string&
CaloID_Exception::message
()
const
23
{
return
m_message
;}
24
25
void
CaloID_Exception::code
(
int
lCode)
26
{
m_code
= lCode ;}
27
28
int
CaloID_Exception::code
()
const
29
{
return
m_code
;}
30
31
CaloID_Exception::operator std::string ()
const
32
33
{
34
return
35
strformat
(
"CaloID_Exception - Error code: %d \n "
, this->
code
()) +
36
this->
message
();
37
}
38
ReweightUtils.message
message
Definition:
ReweightUtils.py:15
CaloID_Exception::m_message
std::string m_message
error message
Definition:
CaloID_Exception.h:69
histSizes.code
code
Definition:
histSizes.py:129
StrFormat.h
Provide helper functions to create formatted strings.
CaloID_Exception::code
int code() const
return error code
Definition:
CaloID_Exception.cxx:28
CaloID_Exception::message
const std::string & message() const
return error message
Definition:
CaloID_Exception.cxx:22
CaloID_Exception::CaloID_Exception
CaloID_Exception()
default constructor
Definition:
CaloID_Exception.cxx:11
CxxUtils::strformat
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition:
StrFormat.cxx:49
CaloID_Exception.h
CaloID_Exception::m_code
int m_code
error code
Definition:
CaloID_Exception.h:74
Generated on Fri Jan 10 2025 21:07:52 for ATLAS Offline Software by
1.8.18