11#ifndef ALICEO2_FOCAL_PIXELMAPPER_H
12#define ALICEO2_FOCAL_PIXELMAPPER_H
19#include <unordered_map>
20#include <boost/container_hash/hash.hpp>
60 boost::hash_combine(seed, s.mFEEID);
61 boost::hash_combine(seed, s.mChipID);
62 boost::hash_combine(seed, s.mLaneID);
76 const
char*
what() const noexcept final {
return mMessage.data(); }
94 const
char*
what() const noexcept final {
return "Mapping is not initalized"; }
103 const
char*
what() const noexcept final {
return "Mapping file not set"; }
122 mMappingFile = mappingfile;
123 mMappingType = mappingtype;
128 void checkInitialized()
const;
130 std::unordered_map<ChipIdentifier, ChipPosition, ChipIdentifierHasher> mMapping;
131 std::string mMappingFile;
133 int mNumberOfColumns = 0;
134 int mNumberOfRows = 0;
139std::ostream&
operator<<(std::ostream&
stream,
const PixelMapper::InvalidChipException& error);
140std::ostream&
operator<<(std::ostream&
stream,
const PixelMapper::UninitException& error);
141std::ostream&
operator<<(std::ostream&
stream,
const PixelMapper::MappingNotSetException& error);
unsigned int getFEEID() const noexcept
unsigned int getLane() const noexcept
InvalidChipException(PixelMapper::ChipIdentifier &identifier)
const PixelMapper::ChipIdentifier & getIdentifier() const
const char * what() const noexcept final
unsigned int getChipID() const noexcept
~InvalidChipException() noexcept final=default
MappingNotSetException()=default
const char * what() const noexcept final
~MappingNotSetException() noexcept final=default
~UninitException() noexcept final=default
const char * what() const noexcept final
UninitException()=default
ChipPosition getPosition(unsigned int feeID, unsigned int laneID, unsigned int chipID) const
int getNumberOfColumns() const
void setMappingFile(const std::string_view mappingfile, MappingType_t mappingtype)
ChipPosition getPosition(unsigned int feeID, const PixelChip &chip) const
MappingType_t getMappingType() const
int getNumberOfRows() const
std::ostream & operator<<(std::ostream &in, const IndexExceptionEvent &error)
std::string to_string(gsl::span< T, Size > span)
size_t operator()(const ChipIdentifier &s) const
Functor implementation.
bool operator==(const ChipIdentifier &other) const
bool operator==(const ChipPosition &other) const
VectorOfTObjectPtrs other