Project
Loading...
Searching...
No Matches
o2::emcal::Mapper Class Reference

ALTRO mapping for calorimeters. More...

#include <Mapper.h>

Classes

class  AddressNotFoundException
 Error handling requests for unknown hardware addresses. More...
 
class  AddressRangeException
 
struct  ChannelID
 Mapped information of a channel. More...
 
struct  ChannelIDHasher
 Hash functor for channel ID. More...
 
class  ChannelNotFoundException
 Exception handling invalid channel ID. More...
 
class  FileFormatException
 Error handling for invalid file format. More...
 
class  InitStatusException
 Error handling requests to not properly initialized mapping object. More...
 

Public Member Functions

 Mapper ()=default
 Default constructor.
 
 Mapper (const std::string_view inputfile)
 Costructor, initializing the mapping from file.
 
 ~Mapper ()=default
 Destructor.
 
ChannelID getChannelID (unsigned int hardawareaddress) const
 Get channel ID params for a given hardware address.
 
uint8_t getRow (unsigned int hardawareaddress) const
 Get channel row for a given hardware address.
 
uint8_t getColumn (unsigned int hardawareaddress) const
 Get channel column for a given hardware address.
 
ChannelType_t getChannelType (unsigned int hardawareaddress) const
 Get channel type for a given hardware address.
 
unsigned int getHardwareAddress (uint8_t row, uint8_t col, ChannelType_t channeltype) const
 Get the hardware address for a channel.
 
void setMapping (const std::string_view inputfile)
 Initialize with new.
 

Detailed Description

ALTRO mapping for calorimeters.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Aug 19, 2019

Based on AliAltroMapping by C. Cheshkov and AliCaloAltroMapping by G. Balbastre

Definition at line 42 of file Mapper.h.

Constructor & Destructor Documentation

◆ Mapper() [1/2]

o2::emcal::Mapper::Mapper ( )
default

Default constructor.

◆ Mapper() [2/2]

Mapper::Mapper ( const std::string_view  inputfile)

Costructor, initializing the mapping from file.

Parameters
inputfileName of the file containing the mapping
Exceptions
FileFormatExceptionin case entries in the mapping file are not in the expected format
AddressRangeExceptionin case addresses outside the valid range are found
ChannelTypeExceptionin case hardware address with unkknown channel types are found

Definition at line 20 of file Mapper.cxx.

◆ ~Mapper()

o2::emcal::Mapper::~Mapper ( )
default

Destructor.

Member Function Documentation

◆ getChannelID()

Mapper::ChannelID Mapper::getChannelID ( unsigned int  hardawareaddress) const

Get channel ID params for a given hardware address.

Returns
Channel params corresponding to the hardware address
Exceptions
InitStatusExceptionin case the mapping was not properly initialized
AddressNotFoundExceptionin case of invalid hardware address

Definition at line 76 of file Mapper.cxx.

◆ getChannelType()

ChannelType_t o2::emcal::Mapper::getChannelType ( unsigned int  hardawareaddress) const
inline

Get channel type for a given hardware address.

Returns
Channel type corresponding to the hardware address
Exceptions
InitStatusExceptionin case the mapping was not properly initialized
AddressNotFoundExceptionin case of invalid hardware address

Definition at line 268 of file Mapper.h.

◆ getColumn()

uint8_t o2::emcal::Mapper::getColumn ( unsigned int  hardawareaddress) const
inline

Get channel column for a given hardware address.

Returns
Column corresponding to the hardware address
Exceptions
InitStatusExceptionin case the mapping was not properly initialized
AddressNotFoundExceptionin case of invalid hardware address

Definition at line 259 of file Mapper.h.

◆ getHardwareAddress()

unsigned int Mapper::getHardwareAddress ( uint8_t  row,
uint8_t  col,
ChannelType_t  channeltype 
) const

Get the hardware address for a channel.

Parameters
rowRow of the channel
colColumn of the channel
channeltypetype of the channel
Returns
Harware address of the channel
Exceptions
InitStatusExceptionin case the mapping was not properly initialized

Definition at line 88 of file Mapper.cxx.

◆ getRow()

uint8_t o2::emcal::Mapper::getRow ( unsigned int  hardawareaddress) const
inline

Get channel row for a given hardware address.

Returns
Row corresponding to the hardware address
Exceptions
InitStatusExceptionin case the mapping was not properly initialized
AddressNotFoundExceptionin case of invalid hardware address

Definition at line 250 of file Mapper.h.

◆ setMapping()

void Mapper::setMapping ( const std::string_view  inputfile)

Initialize with new.

Parameters
inputfileName of the input file from which to read the mapping
Exceptions
FileFormatExceptionin case entries in the mapping file are not in the expected format
AddressRangeExceptionin case addresses outside the valid range are found
ChannelTypeExceptionin case hardware address with unkknown channel types are found

Definition at line 26 of file Mapper.cxx.


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