ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
 LArID_Exception (const std::string &l_message, int l_code)
 constructor to be used More...
 
void message (const std::string &l_message)
 set error message More...
 
std::string message () const
 return error message
More...
 
void code (int l_code)
 set error code number
More...
 
int code () const
 return error code

More...
 
 operator std::string () const
 

Private Attributes

std::string m_message
 error message More...
 
int m_code
 error code More...
 

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 ) { }

◆ 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]

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 }

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:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LArID_Exception::code
int code() const
return error code
Definition: LArID_Exception.h:61
LArID_Exception::m_message
std::string m_message
error message
Definition: LArID_Exception.h:71
LArID_Exception::m_code
int m_code
error code
Definition: LArID_Exception.h:76
LArID_Exception::message
std::string message() const
return error message
Definition: LArID_Exception.h:41