12#ifndef ALICEO2_EMCAL_GEOMETRYBASE_H
13#define ALICEO2_EMCAL_GEOMETRYBASE_H
48 [[nodiscard]] const
char*
what() const noexcept
override {
return "Geometry not initialized"; }
71 [[nodiscard]]
int GetModuleID() const noexcept {
return mModule; }
79 [[nodiscard]]
const char*
what() const noexcept final {
return mMessage.c_str(); }
107 [[nodiscard]]
double getEta() const noexcept {
return mEta; }
111 [[nodiscard]]
double getPhi() const noexcept {
return mPhi; }
115 [[nodiscard]]
const char*
what() const noexcept final {
return mMessage.data(); }
120 std::string mMessage;
132 mMessage(
"Cell ID " +
std::
to_string(mCellID) +
" outside limits.")
141 [[nodiscard]]
int getCellID() const noexcept {
return mCellID; }
145 [[nodiscard]]
const char*
what() const noexcept final {
return mMessage.data(); }
149 std::string mMessage;
165 [[nodiscard]] const
char*
what() const noexcept final {
return "Uknown SuperModule Type !!"; }
178 mMaxSupermodules(maxSupermodules)
196 [[nodiscard]]
const char*
what() const noexcept final {
return mMessage.data(); }
199 int mSupermoduleIndex;
200 int mMaxSupermodules;
201 std::string mMessage;
223 [[nodiscard]]
int getRow() const noexcept {
return mRow; }
227 [[nodiscard]]
int getCol() const noexcept {
return mCol; }
231 [[nodiscard]]
const char*
what() const noexcept final {
return mMessage.data(); }
235 std::string mMessage;
Error handling access to non-initialized geometry.
~GeometryNotInitializedException() noexcept final=default
Destructor.
const char * what() const noexcept override
Access to error message.
GeometryNotInitializedException()=default
Constructor.
Exception handling non-existing cell IDs.
InvalidCellIDException(int cellID)
Constructor, setting cell ID raising the exception.
int getCellID() const noexcept
Access to cell ID raising the exception.
~InvalidCellIDException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access to error message of the exception.
Error Handling when an invalid module ID (outside the limits) is called.
int GetMaxNumberOfModules() const noexcept
Get number of modules.
InvalidModuleException(int nModule, int nMax)
Constructor.
~InvalidModuleException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access to error message.
int GetModuleID() const noexcept
Get ID of the module raising the exception.
Exception handling errors due to positions not in the EMCAL area.
double getEta() const noexcept
Access to eta coordinate raising the exception.
const char * what() const noexcept final
Access to error message of the exception.
~InvalidPositionException() noexcept final=default
Destructor.
double getPhi() const noexcept
Access to phi corrdinate raising the exception.
InvalidPositionException(double eta, double phi)
Constructor, setting the position raising the exception.
Exception handling improper or uninitialized supermodule types.
InvalidSupermoduleTypeException()=default
constructor
~InvalidSupermoduleTypeException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access to error message of the exception.
Handling error for invalid positions in row-column space.
~RowColException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access tp error message of the exception.
int getRow() const noexcept
Get row of the position raising the exception.
RowColException(int row, int col)
Constructor, initializing the exception with invalid row-column position.
int getCol() const noexcept
Get column of the position raising the exception.
Handling error due to invalid supermodule.
SupermoduleIndexException(int supermodule, int maxSupermodules)
Constructor, initializing the exception.
int getMaxSupermodule() const noexcept
Access to maximum number of supermodules.
~SupermoduleIndexException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access to error message of the exception.
int getSupermodule() const noexcept
Access to supermodule index raising the exception.
const std::string DEFAULT_GEOMETRY
std::string to_string(gsl::span< T, Size > span)