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

Exception class for LAr online Identifiers. More...

#include <LArOnlID_Exception.h>

Collaboration diagram for LArOnlID_Exception:

Public Member Functions

 LArOnlID_Exception ()
 default constructor More...
 
 LArOnlID_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...
 
virtual std::string message () const
 return error message
More...
 
void code (int l_code)
 set error code number
More...
 
virtual int code () const
 return error code

More...
 
virtual operator std::string ()
 
virtual ~LArOnlID_Exception ()
 destructor More...
 

Private Attributes

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

Detailed Description

Exception class for LAr online Identifiers.

Author
Johann Collot , Brinick Simmons
Version
00-00-00
Since
00-00-00

Definition at line 16 of file LArOnlID_Exception.h.

Constructor & Destructor Documentation

◆ LArOnlID_Exception() [1/2]

LArOnlID_Exception::LArOnlID_Exception ( )
inline

default constructor

Definition at line 22 of file LArOnlID_Exception.h.

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

◆ LArOnlID_Exception() [2/2]

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

constructor to be used

Definition at line 27 of file LArOnlID_Exception.h.

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

◆ ~LArOnlID_Exception()

virtual LArOnlID_Exception::~LArOnlID_Exception ( )
inlinevirtual

destructor

Definition at line 64 of file LArOnlID_Exception.h.

64 {}

Member Function Documentation

◆ code() [1/2]

virtual int LArOnlID_Exception::code ( ) const
inlinevirtual

return error code

error codes :
0 : no error
1 : at least 1 field was given a crazy value
2 : at least 1 field was given a value out of the allowed range
3 : wrong febID
4 : wrong feedthroughID
5 : channel value out of range 6 : slot and/or channel value out of range 999 : undefined error

Definition at line 57 of file LArOnlID_Exception.h.

57 { return m_code;}

◆ code() [2/2]

void LArOnlID_Exception::code ( int  l_code)
inline

set error code number

Definition at line 42 of file LArOnlID_Exception.h.

42 { m_code = l_code ;}

◆ message() [1/2]

virtual std::string LArOnlID_Exception::message ( ) const
inlinevirtual

return error message

Definition at line 37 of file LArOnlID_Exception.h.

37 { return m_message;}

◆ message() [2/2]

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

set error message

Definition at line 32 of file LArOnlID_Exception.h.

32 { m_message = l_message ;}

◆ operator std::string()

LArOnlID_Exception::operator std::string ( )
virtual

Definition at line 10 of file LArOnlID_Exception.cxx.

12 {
13 
14  char * l_str = new char[200];
15  std::string newline(" \n ") ;
16  std::string errorMessage ;
17  sprintf(l_str,"LArOnlID_Exception - Error code: %d ", this->code());
18  errorMessage += std::string(l_str);
19  errorMessage += newline ;
20  errorMessage += this->message() ;
21  delete[] l_str ;
22  return errorMessage ;
23 
24 }

Member Data Documentation

◆ m_code

int LArOnlID_Exception::m_code
private

error code

Definition at line 76 of file LArOnlID_Exception.h.

◆ m_message

std::string LArOnlID_Exception::m_message
private

error message

Definition at line 71 of file LArOnlID_Exception.h.


The documentation for this class was generated from the following files:
LArOnlID_Exception::message
virtual std::string message() const
return error message
Definition: LArOnlID_Exception.h:37
LArOnlID_Exception::m_code
int m_code
error code
Definition: LArOnlID_Exception.h:76
LArOnlID_Exception::m_message
std::string m_message
error message
Definition: LArOnlID_Exception.h:71
LArOnlID_Exception::code
virtual int code() const
return error code
Definition: LArOnlID_Exception.h:57
calibdata.newline
newline
Definition: calibdata.py:526