ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TileID_Exception Class Reference

Exception class for Tile Identifiers. More...

#include <TileID_Exception.h>

Collaboration diagram for TileID_Exception:

Public Member Functions

 TileID_Exception ()
 default constructor More...
 
 TileID_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...
 
const 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 Tile Identifiers.

Author
Alexander Solodkov

Definition at line 16 of file TileID_Exception.h.

Constructor & Destructor Documentation

◆ TileID_Exception() [1/2]

TileID_Exception::TileID_Exception ( )
inline

default constructor

Definition at line 22 of file TileID_Exception.h.

22 : m_message("No error message") , m_code( 999 ) { }

◆ TileID_Exception() [2/2]

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

constructor to be used

Definition at line 27 of file TileID_Exception.h.

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

Member Function Documentation

◆ code() [1/2]

int TileID_Exception::code ( ) const
inline

return error code

error codes : 0 : no error 1 : Logical ID is out of range 2 : Hardware ID is out of range 3 : No PMT for this logical ID (invalid logical ID) 4 : No PMT for this channel (not connected) 9 : ID compactification Error 11 : id is not an TileCal logical identifier 12 : id is not an TileCal hardware identifier 19 : no IDCompactor available ( null pointer ) 999 : undefined error

Definition at line 59 of file TileID_Exception.h.

59 { return m_code;}

◆ code() [2/2]

void TileID_Exception::code ( int  l_code)
inline

set error code number

Definition at line 42 of file TileID_Exception.h.

42 { m_code = l_code ;}

◆ message() [1/2]

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

return error message

Definition at line 37 of file TileID_Exception.h.

37 { return m_message;}

◆ message() [2/2]

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

set error message

Definition at line 32 of file TileID_Exception.h.

32 { m_message = l_message ;}

◆ operator std::string()

TileID_Exception::operator std::string ( ) const

Definition at line 11 of file TileID_Exception.cxx.

13 {
14  std::ostringstream text;
15 
16  text << "TileID_Exception - Error code: " << this->code() << std::endl;
17  text << this->message() ;
18  return text.str();
19 }

Member Data Documentation

◆ m_code

int TileID_Exception::m_code
private

error code

Definition at line 74 of file TileID_Exception.h.

◆ m_message

std::string TileID_Exception::m_message
private

error message

Definition at line 69 of file TileID_Exception.h.


The documentation for this class was generated from the following files:
TileID_Exception::m_message
std::string m_message
error message
Definition: TileID_Exception.h:69
TileID_Exception::m_code
int m_code
error code
Definition: TileID_Exception.h:74
TileID_Exception::message
const std::string & message() const
return error message
Definition: TileID_Exception.h:37
TileID_Exception::code
int code() const
return error code
Definition: TileID_Exception.h:59
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11