AliPhysics  a0db429 (a0db429)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
EMCalTriggerPtAnalysis::HistoContainerContentException Class Reference

Exception thrown by the histogram container in case of problems. More...

#include <AliEMCalHistoContainer.h>

Inheritance diagram for EMCalTriggerPtAnalysis::HistoContainerContentException:

Public Types

enum  ExceptionType_t { kHistNotFoundException = 0, kTypeException = 1, kHistDuplicationException = 2, kGroupException = 3 }
 Definition of exception types thrown by the histogram container. More...
 

Public Member Functions

 HistoContainerContentException (const char *histname, const char *hgroup, ExceptionType_t etype)
 
virtual ~HistoContainerContentException () throw ()
 
virtual const char * what () const throw ()
 
const char * GetErrorHistogramName () const
 
ExceptionType_t GetExceptionType () const
 

Private Member Functions

void CreateErrorMessage ()
 

Private Attributes

std::string fHistname
 Name of the histogram producing the exception. More...
 
std::string fGroup
 Group of objects producing the exception. More...
 
std::string fErrorMessage
 container for the error message produced in the what function More...
 
ExceptionType_t fExceptionType
 type of the exception More...
 

Detailed Description

Exception thrown by the histogram container in case of problems.

HistoContainerContentException is thrown by the histogram container in case of problems appearing when accessing or filling histograms. Problems handled by this class are:

  • Required histogram not defined
  • Histogram types not matching
  • Histogram would be duplicated
  • Group not existing or duplicated when creating

Error handling class for the histogram container

Definition at line 51 of file AliEMCalHistoContainer.h.

Member Enumeration Documentation

Definition of exception types thrown by the histogram container.

This enumeration defines possible exeption types handled by the exception class

Enumerator
kHistNotFoundException 

Histogram with name not found in the container.

kTypeException 

Histogram type mismatch.

kHistDuplicationException 

Histogram with name duplicated.

kGroupException 

Group error (not existing or duplicated)

Definition at line 59 of file AliEMCalHistoContainer.h.

Constructor & Destructor Documentation

EMCalTriggerPtAnalysis::HistoContainerContentException::HistoContainerContentException ( const char *  histname,
const char *  hgroup,
ExceptionType_t  etype 
)
inline

Constuctor, defining the exception. Called when a HistoContainerContentException is thrown

Parameters
histnameName of the histogram throwing the exception
hgroupGroup throwing the exception
etype

Definition at line 72 of file AliEMCalHistoContainer.h.

virtual EMCalTriggerPtAnalysis::HistoContainerContentException::~HistoContainerContentException ( )
throw (
)
inlinevirtual

Destructor

Definition at line 87 of file AliEMCalHistoContainer.h.

Member Function Documentation

void EMCalTriggerPtAnalysis::HistoContainerContentException::CreateErrorMessage ( )
inlineprivate

Create error message with the histogram name, the histogram group, and the error type

Definition at line 112 of file AliEMCalHistoContainer.h.

Referenced by HistoContainerContentException().

const char* EMCalTriggerPtAnalysis::HistoContainerContentException::GetErrorHistogramName ( ) const
inline

Get the name of the histogram raising the exception

Returns
Name of the histogram

Definition at line 101 of file AliEMCalHistoContainer.h.

ExceptionType_t EMCalTriggerPtAnalysis::HistoContainerContentException::GetExceptionType ( ) const
inline

Get the type of the exception

Returns
Type of the exception

Definition at line 106 of file AliEMCalHistoContainer.h.

Member Data Documentation

std::string EMCalTriggerPtAnalysis::HistoContainerContentException::fErrorMessage
private

container for the error message produced in the what function

Definition at line 137 of file AliEMCalHistoContainer.h.

Referenced by CreateErrorMessage(), and what().

ExceptionType_t EMCalTriggerPtAnalysis::HistoContainerContentException::fExceptionType
private

type of the exception

Definition at line 138 of file AliEMCalHistoContainer.h.

Referenced by CreateErrorMessage(), and GetExceptionType().

std::string EMCalTriggerPtAnalysis::HistoContainerContentException::fGroup
private

Group of objects producing the exception.

Definition at line 136 of file AliEMCalHistoContainer.h.

Referenced by CreateErrorMessage(), and HistoContainerContentException().

std::string EMCalTriggerPtAnalysis::HistoContainerContentException::fHistname
private

Name of the histogram producing the exception.

Definition at line 135 of file AliEMCalHistoContainer.h.

Referenced by CreateErrorMessage(), GetErrorHistogramName(), and HistoContainerContentException().


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