ATLAS Offline Software
Loading...
Searching...
No Matches
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
 LArOnlID_Exception (const std::string &l_message, int l_code)
 constructor to be used
void message (const std::string &l_message)
 set error message
virtual std::string message () const
 return error message

void code (int l_code)
 set error code number

virtual int code () const
 return error code


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

Private Attributes

std::string m_message
 error message
int m_code
 error code

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 ) { }
std::string m_message
error message

◆ 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}
virtual std::string message() const
return error message
virtual int code() const
return error code

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: