Project
Loading...
Searching...
No Matches
o2::phos::Mapping Class Reference

#include <Mapping.h>

Public Types

enum  ErrorStatus {
  kOK , kWrongDDL , kWrongHWAddress , kWrongAbsId ,
  kWrongCaloFlag , kNotInitialized
}
 
enum  CaloFlag { kLowGain , kHighGain , kTRU }
 

Public Member Functions

 ~Mapping ()=default
 
ErrorStatus hwToAbsId (short ddl, short hw, short &absId, CaloFlag &caloFlag) const
 convert hardware address to absId and caloFlag
 
ErrorStatus absIdTohw (short absId, short caloFlag, short &ddl, short &hwAddr) const
 convert absId and caloflag to hardware address and ddl
 
ErrorStatus setMapping ()
 

Static Public Member Functions

static MappingInstance ()
 
static MappingInstance (std::basic_string_view< char > path)
 
static void ddlToCrorcLink (short iddl, short &flp, short &crorc, short &link)
 convert ddl number to crorc and link number
 
static bool isTRUReadoutchannel (short hwAddress)
 

Static Public Attributes

static constexpr short NCHANNELS = 14336
 Number of channels starting from 1.
 
static constexpr short NHWPERDDL = 2048
 Number of HW addressed per DDL.
 
static constexpr short NMaxHWAddress = 3929
 Maximal HW address (size of array)
 
static constexpr short NDDL = 14
 Total number of DDLs.
 
static constexpr short NTRUBranchReadoutChannels = 112
 Number of TRU readout channels per branch.
 
static constexpr short NTRUReadoutChannels = 3136
 Total number of TRU readout channels.
 
static constexpr short TRUFinalProductionChannel = 123
 

Protected Member Functions

 Mapping ()=default
 
 Mapping (std::basic_string_view< char > path)
 
ErrorStatus constructAbsToHWMatrix ()
 Construct vector for conversion only if necessary.
 

Detailed Description

Definition at line 33 of file Mapping.h.

Member Enumeration Documentation

◆ CaloFlag

Enumerator
kLowGain 
kHighGain 
kTRU 

Definition at line 50 of file Mapping.h.

◆ ErrorStatus

Enumerator
kOK 
kWrongDDL 
kWrongHWAddress 
kWrongAbsId 
kWrongCaloFlag 
kNotInitialized 

Definition at line 36 of file Mapping.h.

Constructor & Destructor Documentation

◆ ~Mapping()

o2::phos::Mapping::~Mapping ( )
default

◆ Mapping() [1/2]

o2::phos::Mapping::Mapping ( )
protecteddefault

◆ Mapping() [2/2]

Mapping::Mapping ( std::basic_string_view< char path)
protected

Definition at line 24 of file Mapping.cxx.

Member Function Documentation

◆ absIdTohw()

Mapping::ErrorStatus Mapping::absIdTohw ( short  absId,
short  caloFlag,
short ddl,
short hwAddr 
) const

convert absId and caloflag to hardware address and ddl

Definition at line 89 of file Mapping.cxx.

◆ constructAbsToHWMatrix()

ErrorStatus o2::phos::Mapping::constructAbsToHWMatrix ( )
protected

Construct vector for conversion only if necessary.

◆ ddlToCrorcLink()

static void o2::phos::Mapping::ddlToCrorcLink ( short  iddl,
short flp,
short crorc,
short link 
)
inlinestatic

convert ddl number to crorc and link number

Definition at line 66 of file Mapping.h.

◆ hwToAbsId()

Mapping::ErrorStatus Mapping::hwToAbsId ( short  ddl,
short  hw,
short absId,
CaloFlag caloFlag 
) const

convert hardware address to absId and caloFlag

Definition at line 54 of file Mapping.cxx.

◆ Instance() [1/2]

Mapping * Mapping::Instance ( )
static

Definition at line 29 of file Mapping.cxx.

◆ Instance() [2/2]

Mapping * Mapping::Instance ( std::basic_string_view< char path)
static

Definition at line 40 of file Mapping.cxx.

◆ isTRUReadoutchannel()

static bool o2::phos::Mapping::isTRUReadoutchannel ( short  hwAddress)
inlinestatic

Definition at line 112 of file Mapping.h.

◆ setMapping()

Mapping::ErrorStatus Mapping::setMapping ( )

Definition at line 122 of file Mapping.cxx.

Member Data Documentation

◆ NCHANNELS

constexpr short o2::phos::Mapping::NCHANNELS = 14336
staticconstexpr

Number of channels starting from 1.

Definition at line 42 of file Mapping.h.

◆ NDDL

constexpr short o2::phos::Mapping::NDDL = 14
staticconstexpr

Total number of DDLs.

Definition at line 45 of file Mapping.h.

◆ NHWPERDDL

constexpr short o2::phos::Mapping::NHWPERDDL = 2048
staticconstexpr

Number of HW addressed per DDL.

Definition at line 43 of file Mapping.h.

◆ NMaxHWAddress

constexpr short o2::phos::Mapping::NMaxHWAddress = 3929
staticconstexpr

Maximal HW address (size of array)

Definition at line 44 of file Mapping.h.

◆ NTRUBranchReadoutChannels

constexpr short o2::phos::Mapping::NTRUBranchReadoutChannels = 112
staticconstexpr

Number of TRU readout channels per branch.

Definition at line 46 of file Mapping.h.

◆ NTRUReadoutChannels

constexpr short o2::phos::Mapping::NTRUReadoutChannels = 3136
staticconstexpr

Total number of TRU readout channels.

Definition at line 47 of file Mapping.h.

◆ TRUFinalProductionChannel

constexpr short o2::phos::Mapping::TRUFinalProductionChannel = 123
staticconstexpr

Definition at line 48 of file Mapping.h.


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