ATLAS Offline Software
ForwardDetectors
ZDC
ZdcIdentifier
ZdcIdentifier
ZdcID_Exception.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ZDCID_EXCEPTION_H
6
#define ZDCID_EXCEPTION_H
7
8
#include <string>
9
16
class
ZdcID_Exception
{
17
public
:
18
22
ZdcID_Exception
() :
m_message
(
"No error message"
) ,
m_code
( 999 ) { }
23
27
ZdcID_Exception
(
const
std::string& l_message ,
int
l_code) :
m_message
( l_message ) ,
m_code
( l_code ) { }
28
32
void
message
(
const
std::string& l_message) {
m_message
= l_message ;}
33
37
virtual
std::string
message
()
const
{
return
m_message
;}
38
42
void
code
(
int
l_code) {
m_code
= l_code ;}
43
59
virtual
int
code
()
const
{
return
m_code
;}
60
61
//virtual operator std::string() ;
62
66
virtual
~ZdcID_Exception
() {}
67
68
private
:
69
73
std::string
m_message
;
74
78
int
m_code
;
79
};
80
#endif //ZDCID_EXCEPTION_H
81
ZdcID_Exception::~ZdcID_Exception
virtual ~ZdcID_Exception()
destructor
Definition:
ZdcID_Exception.h:66
ZdcID_Exception::code
virtual int code() const
return error code
Definition:
ZdcID_Exception.h:59
ZdcID_Exception::code
void code(int l_code)
set error code number
Definition:
ZdcID_Exception.h:42
ZdcID_Exception::ZdcID_Exception
ZdcID_Exception()
default constructor
Definition:
ZdcID_Exception.h:22
ZdcID_Exception::message
void message(const std::string &l_message)
set error message
Definition:
ZdcID_Exception.h:32
ZdcID_Exception::message
virtual std::string message() const
return error message
Definition:
ZdcID_Exception.h:37
ZdcID_Exception::m_code
int m_code
error code
Definition:
ZdcID_Exception.h:78
ZdcID_Exception
Exception class for Zdc Identifiers.
Definition:
ZdcID_Exception.h:16
ZdcID_Exception::ZdcID_Exception
ZdcID_Exception(const std::string &l_message, int l_code)
constructor to be used
Definition:
ZdcID_Exception.h:27
ZdcID_Exception::m_message
std::string m_message
error message
Definition:
ZdcID_Exception.h:73
Generated on Wed Jan 8 2025 21:21:51 for ATLAS Offline Software by
1.8.18