ATLAS Offline Software
Loading...
Searching...
No Matches
LArID_Exception Class Reference

Exception class for LAr Identifiers. More...

#include <LArID_Exception.h>

Collaboration diagram for LArID_Exception:

Public Member Functions

 LArID_Exception ()
 default constructor
 LArID_Exception (const std::string &l_message, int l_code)
 constructor to be used
void message (const std::string &l_message)
 set error message
const std::string & message () const
 return error message

void code (int l_code)
 set error code number

int code () const
 return error code


 operator std::string () const

Private Attributes

std::string m_message
 error message
int m_code
 error code

Detailed Description

Exception class for LAr Identifiers.

Author
Johann Collot , Brinick Simmons

Definition at line 20 of file LArID_Exception.h.

Constructor & Destructor Documentation

◆ LArID_Exception() [1/2]

LArID_Exception::LArID_Exception ( )
inline

default constructor

Definition at line 26 of file LArID_Exception.h.

26: m_message("No error message") , m_code( 999 ) { }
std::string m_message
error message
int m_code
error code

◆ LArID_Exception() [2/2]

LArID_Exception::LArID_Exception ( const std::string & l_message,
int l_code )
inline

constructor to be used

Definition at line 31 of file LArID_Exception.h.

31: m_message ( l_message ) , m_code ( l_code ) { }

Member Function Documentation

◆ code() [1/2]

int LArID_Exception::code ( ) const
inline

return error code

error codes :
0 : no error
5 : LArEM::region_id Error
6 : LArEM::channel_id Error
7 : LArHEC::region_id Error
8 : LArHEC::channel_id Error
9 : LArFCAL::region_id Error
10 : LArFCAL::channel_id Error
999 : undefined error

Definition at line 61 of file LArID_Exception.h.

61{ return m_code;}

◆ code() [2/2]

void LArID_Exception::code ( int l_code)
inline

set error code number

Definition at line 46 of file LArID_Exception.h.

46{ m_code = l_code ;}

◆ message() [1/2]

const std::string & LArID_Exception::message ( ) const
inline

return error message

Definition at line 41 of file LArID_Exception.h.

41{ return m_message;}

◆ message() [2/2]

void LArID_Exception::message ( const std::string & l_message)
inline

set error message

Definition at line 36 of file LArID_Exception.h.

36{ m_message = l_message ;}

◆ operator std::string()

LArID_Exception::operator std::string ( ) const

Definition at line 10 of file LArID_Exception.cxx.

12{
13 std::ostringstream s;
14
15 s << "LArID_Exception - Error code: " << this->code() << " \n "
16 << this->message();
17 return s.str();
18}
int code() const
return error code
const std::string & message() const
return error message

Member Data Documentation

◆ m_code

int LArID_Exception::m_code
private

error code

Definition at line 76 of file LArID_Exception.h.

◆ m_message

std::string LArID_Exception::m_message
private

error message

Definition at line 71 of file LArID_Exception.h.


The documentation for this class was generated from the following files: