Project
Loading...
Searching...
No Matches
o2::mch::raw::impl Namespace Reference

Classes

class  PageDecoderImpl
 
struct  PayloadDecoderImpl
 
struct  PayloadDecoderImpl< BareFormat, CHARGESUM, 0 >
 
struct  PayloadDecoderImpl< UserLogicFormat, CHARGESUM, VERSION >
 
struct  PayloadEncoderCreator
 

Functions

template<typename T >
std::function< std::optional< o2::mch::raw::DsDetId >(o2::mch::raw::DsElecId)> mapperElec2Det (const std::map< uint32_t, uint32_t > &elec2det)
 
template<typename T >
std::function< std::optional< o2::mch::raw::DsElecId >(o2::mch::raw::DsDetId)> mapperDet2Elec (const std::map< uint32_t, uint32_t > &det2elec)
 
template<typename T >
std::function< std::optional< FeeLinkId >(uint16_t)> mapperSolar2FeeLink (const std::map< uint16_t, uint32_t > &solar2cruLink)
 
template<typename T >
std::function< std::optional< uint16_t >(FeeLinkId)> mapperFeeLink2Solar (const std::map< uint32_t, uint16_t > &cruLink2solar)
 
template<typename KEY , typename VALUE >
std::map< VALUE, KEY > inverseMap (const std::map< KEY, VALUE > &src)
 
template<typename T >
std::set< uint16_t > getSolarUIDs (int deid)
 
template<typename T >
std::set< uint16_t > getSolarUIDs ()
 
template<typename T >
std::set< uint16_t > getSolarUIDsPerFeeId (uint16_t feeid)
 
template<typename T >
std::set< DsDetIdgetDualSampasPerFeeId (uint16_t feeId)
 
template<typename T >
std::vector< std::string > solar2FeeLinkConsistencyCheck ()
 
template<typename T >
std::set< DsElecIdgetAllDs ()
 
template<typename T >
std::set< DsDetIdgetDualSampas (uint16_t solarId)
 
template<typename T >
std::map< uint16_t, uint16_t > generateSolarIndex2IdMap ()
 
template<typename T >
std::optional< uint16_t > solarIndex2Id (uint16_t solarIndex)
 
template<typename T >
std::optional< uint16_t > solarId2Index (uint16_t solarId)
 
uint16_t computeChipAddress (uint8_t elinkId, DualSampaChannelId chId)
 
SampaHeader buildSampaHeader (uint8_t elinkId, DualSampaChannelId chId, gsl::span< const SampaCluster > data)
 
uint64_t build64 (uint16_t a10, uint16_t b10=0, uint16_t c10=0, uint16_t d10=0, uint16_t e10=0)
 
void addPadding (std::vector< uint10_t > &b10)
 
void b10to64 (std::vector< uint10_t > b10, std::vector< uint64_t > &b64, uint16_t prefix14)
 
void bufferizeClusters (gsl::span< const SampaCluster > clusters, std::vector< uint10_t > &b10)
 
void append (std::vector< uint10_t > &b10, uint50_t value)
 
void appendSync (std::vector< uint10_t > &b10)
 
void fillUserLogicBuffer10 (std::vector< uint10_t > &b10, gsl::span< const SampaCluster > clusters, uint8_t elinkId, DualSampaChannelId chId, bool addSync)
 
int assertIsInRange (std::string what, uint64_t value, uint64_t min, uint64_t max)
 
template<typename T , std::enable_if_t< std::is_integral< T >::value, int > = 1>
void dumpByteBuffer (gsl::span< T > buffer)
 
void append (std::vector< std::byte > &buffer, uint64_t w)
 
template<typename FORMAT >
void dumpWord (std::ostream &out, uint64_t w)
 
template<>
void dumpWord< o2::mch::raw::BareFormat > (std::ostream &out, uint64_t w)
 
template<>
void dumpWord< o2::mch::raw::UserLogicFormat > (std::ostream &out, uint64_t w)
 
template<typename FORMAT , int VERSION = 0>
void dumpWordInfo (std::ostream &out, uint64_t w, const char *spacer="")
 
template<>
void dumpWordInfo< o2::mch::raw::BareFormat, 0 > (std::ostream &out, uint64_t w, const char *)
 
template<int VERSION>
void dumpUserLogicWordInfo (std::ostream &out, uint64_t w, const char *spacer)
 
template<>
void dumpWordInfo< o2::mch::raw::UserLogicFormat, 0 > (std::ostream &out, uint64_t w, const char *spacer)
 
template<>
void dumpWordInfo< o2::mch::raw::UserLogicFormat, 1 > (std::ostream &out, uint64_t w, const char *spacer)
 
template<typename FORMAT , int VERSION>
void dumpBuffer (gsl::span< const std::byte > buffer, std::ostream &out=std::cout, size_t maxbytes=std::numeric_limits< size_t >::max())
 
template<typename FORMAT , int VERSION>
void dumpBuffer (const std::vector< uint64_t > &buffer, std::ostream &out=std::cout, size_t maxbytes=std::numeric_limits< size_t >::max())
 
template<typename CTOR , size_t... S>
std::array< std::invoke_result_t< CTOR, size_t >, sizeof...(S)> makeArray (CTOR &&ctor, std::index_sequence< S... >)
 
template<size_t N, typename CTOR >
std::array< std::invoke_result_t< CTOR, size_t >, N > makeArray (CTOR &&ctor)
 
size_t copyBuffer (const std::vector< uint64_t > &b64, std::vector< std::byte > &b8, uint64_t prefix=0)
 
size_t moveBuffer (std::vector< uint64_t > &b64, std::vector< std::byte > &b8, uint64_t prefix=0)
 
uint64_t b8to64 (gsl::span< const std::byte > buffer, size_t i)
 
size_t copyBuffer (gsl::span< const std::byte > b8, std::vector< uint64_t > &b64, uint64_t prefix=0)
 
template<typename T >
int nofBits (T val)
 
template<typename T >
void assertNofBits (std::string_view msg, T value, int n)
 

Function Documentation

◆ addPadding()

void o2::mch::raw::impl::addPadding ( std::vector< uint10_t > &  b10)

Definition at line 75 of file EncoderImplHelper.cxx.

◆ append() [1/2]

void o2::mch::raw::impl::append ( std::vector< std::byte > &  buffer,
uint64_t  w 
)
inline

Definition at line 44 of file DumpBuffer.h.

◆ append() [2/2]

void o2::mch::raw::impl::append ( std::vector< uint10_t > &  b10,
uint50_t  value 
)

Definition at line 111 of file EncoderImplHelper.cxx.

◆ appendSync()

void o2::mch::raw::impl::appendSync ( std::vector< uint10_t > &  b10)

Definition at line 120 of file EncoderImplHelper.cxx.

◆ assertIsInRange()

int o2::mch::raw::impl::assertIsInRange ( std::string  what,
uint64_t  value,
uint64_t  min,
uint64_t  max 
)
inline

Definition at line 20 of file Assertions.h.

◆ assertNofBits()

template<typename T >
void o2::mch::raw::impl::assertNofBits ( std::string_view  msg,
value,
int  n 
)

Definition at line 29 of file NofBits.h.

◆ b10to64()

void o2::mch::raw::impl::b10to64 ( std::vector< uint10_t b10,
std::vector< uint64_t > &  b64,
uint16_t  prefix14 
)

Definition at line 82 of file EncoderImplHelper.cxx.

◆ b8to64()

uint64_t o2::mch::raw::impl::b8to64 ( gsl::span< const std::byte >  buffer,
size_t  i 
)

Definition at line 52 of file MoveBuffer.h.

◆ bufferizeClusters()

void o2::mch::raw::impl::bufferizeClusters ( gsl::span< const SampaCluster clusters,
std::vector< uint10_t > &  b10 
)

Definition at line 95 of file EncoderImplHelper.cxx.

◆ build64()

uint64_t o2::mch::raw::impl::build64 ( uint16_t  a10,
uint16_t  b10 = 0,
uint16_t  c10 = 0,
uint16_t  d10 = 0,
uint16_t  e10 = 0 
)

Definition at line 61 of file EncoderImplHelper.cxx.

◆ buildSampaHeader()

SampaHeader o2::mch::raw::impl::buildSampaHeader ( uint8_t  elinkId,
DualSampaChannelId  chId,
gsl::span< const SampaCluster data 
)

Build a sampa header for one channel The vector of SampaCluster is assumed to be valid, i.e. :

  • all clusters are all of the same kind (ChargeSumMode or SampleMode)
  • all clusters have the same bunchCrossingCounter

Definition at line 34 of file EncoderImplHelper.cxx.

◆ computeChipAddress()

uint16_t o2::mch::raw::impl::computeChipAddress ( uint8_t  elinkId,
DualSampaChannelId  chId 
)

Definition at line 21 of file EncoderImplHelper.cxx.

◆ copyBuffer() [1/2]

size_t o2::mch::raw::impl::copyBuffer ( const std::vector< uint64_t > &  b64,
std::vector< std::byte > &  b8,
uint64_t  prefix = 0 
)

Copy the content of b64 to b8 Returns the number of bytes copied into b8.

Definition at line 24 of file MoveBuffer.h.

◆ copyBuffer() [2/2]

size_t o2::mch::raw::impl::copyBuffer ( gsl::span< const std::byte >  b8,
std::vector< uint64_t > &  b64,
uint64_t  prefix = 0 
)

Copy the content of b8 to b64 Returns the number of 64-bits words copied into b64

Definition at line 66 of file MoveBuffer.h.

◆ dumpBuffer() [1/2]

template<typename FORMAT , int VERSION>
void o2::mch::raw::impl::dumpBuffer ( const std::vector< uint64_t > &  buffer,
std::ostream &  out = std::cout,
size_t  maxbytes = std::numeric_limits<size_t>::max() 
)

Definition at line 222 of file DumpBuffer.h.

◆ dumpBuffer() [2/2]

template<typename FORMAT , int VERSION>
void o2::mch::raw::impl::dumpBuffer ( gsl::span< const std::byte >  buffer,
std::ostream &  out = std::cout,
size_t  maxbytes = std::numeric_limits<size_t>::max() 
)

Definition at line 139 of file DumpBuffer.h.

◆ dumpByteBuffer()

template<typename T , std::enable_if_t< std::is_integral< T >::value, int > = 1>
void o2::mch::raw::impl::dumpByteBuffer ( gsl::span< T >  buffer)

Definition at line 30 of file DumpBuffer.h.

◆ dumpUserLogicWordInfo()

template<int VERSION>
void o2::mch::raw::impl::dumpUserLogicWordInfo ( std::ostream &  out,
uint64_t  w,
const char spacer 
)

Definition at line 97 of file DumpBuffer.h.

◆ dumpWord()

template<typename FORMAT >
void o2::mch::raw::impl::dumpWord ( std::ostream &  out,
uint64_t  w 
)

◆ dumpWord< o2::mch::raw::BareFormat >()

template<>
void o2::mch::raw::impl::dumpWord< o2::mch::raw::BareFormat > ( std::ostream &  out,
uint64_t  w 
)

Definition at line 60 of file DumpBuffer.h.

◆ dumpWord< o2::mch::raw::UserLogicFormat >()

template<>
void o2::mch::raw::impl::dumpWord< o2::mch::raw::UserLogicFormat > ( std::ostream &  out,
uint64_t  w 
)

Definition at line 73 of file DumpBuffer.h.

◆ dumpWordInfo()

template<typename FORMAT , int VERSION = 0>
void o2::mch::raw::impl::dumpWordInfo ( std::ostream &  out,
uint64_t  w,
const char spacer = "" 
)

◆ dumpWordInfo< o2::mch::raw::BareFormat, 0 >()

template<>
void o2::mch::raw::impl::dumpWordInfo< o2::mch::raw::BareFormat, 0 > ( std::ostream &  out,
uint64_t  w,
const char  
)

Definition at line 82 of file DumpBuffer.h.

◆ dumpWordInfo< o2::mch::raw::UserLogicFormat, 0 >()

template<>
void o2::mch::raw::impl::dumpWordInfo< o2::mch::raw::UserLogicFormat, 0 > ( std::ostream &  out,
uint64_t  w,
const char spacer 
)

Definition at line 125 of file DumpBuffer.h.

◆ dumpWordInfo< o2::mch::raw::UserLogicFormat, 1 >()

template<>
void o2::mch::raw::impl::dumpWordInfo< o2::mch::raw::UserLogicFormat, 1 > ( std::ostream &  out,
uint64_t  w,
const char spacer 
)

Definition at line 132 of file DumpBuffer.h.

◆ fillUserLogicBuffer10()

void o2::mch::raw::impl::fillUserLogicBuffer10 ( std::vector< uint10_t > &  b10,
gsl::span< const SampaCluster clusters,
uint8_t  elinkId,
DualSampaChannelId  chId,
bool  addSync 
)

Definition at line 126 of file EncoderImplHelper.cxx.

◆ generateSolarIndex2IdMap()

template<typename T >
std::map< uint16_t, uint16_t > o2::mch::raw::impl::generateSolarIndex2IdMap ( )

Definition at line 218 of file ElectronicMapperImplHelper.h.

◆ getAllDs()

template<typename T >
std::set< DsElecId > o2::mch::raw::impl::getAllDs ( )

Definition at line 180 of file ElectronicMapperImplHelper.h.

◆ getDualSampas()

template<typename T >
std::set< DsDetId > o2::mch::raw::impl::getDualSampas ( uint16_t  solarId)

Definition at line 200 of file ElectronicMapperImplHelper.h.

◆ getDualSampasPerFeeId()

template<typename T >
std::set< DsDetId > o2::mch::raw::impl::getDualSampasPerFeeId ( uint16_t  feeId)

Definition at line 138 of file ElectronicMapperImplHelper.h.

◆ getSolarUIDs() [1/2]

template<typename T >
std::set< uint16_t > o2::mch::raw::impl::getSolarUIDs ( )

Definition at line 110 of file ElectronicMapperImplHelper.h.

◆ getSolarUIDs() [2/2]

template<typename T >
std::set< uint16_t > o2::mch::raw::impl::getSolarUIDs ( int  deid)

Definition at line 94 of file ElectronicMapperImplHelper.h.

◆ getSolarUIDsPerFeeId()

template<typename T >
std::set< uint16_t > o2::mch::raw::impl::getSolarUIDsPerFeeId ( uint16_t  feeid)

Definition at line 124 of file ElectronicMapperImplHelper.h.

◆ inverseMap()

template<typename KEY , typename VALUE >
std::map< VALUE, KEY > o2::mch::raw::impl::inverseMap ( const std::map< KEY, VALUE > &  src)

Definition at line 84 of file ElectronicMapperImplHelper.h.

◆ makeArray() [1/2]

template<size_t N, typename CTOR >
std::array< std::invoke_result_t< CTOR, size_t >, N > o2::mch::raw::impl::makeArray ( CTOR &&  ctor)

Definition at line 29 of file MakeArray.h.

◆ makeArray() [2/2]

template<typename CTOR , size_t... S>
std::array< std::invoke_result_t< CTOR, size_t >, sizeof...(S)> o2::mch::raw::impl::makeArray ( CTOR &&  ctor,
std::index_sequence< S... >   
)

Definition at line 22 of file MakeArray.h.

◆ mapperDet2Elec()

template<typename T >
std::function< std::optional< o2::mch::raw::DsElecId >(o2::mch::raw::DsDetId)> o2::mch::raw::impl::mapperDet2Elec ( const std::map< uint32_t, uint32_t > &  det2elec)

Definition at line 46 of file ElectronicMapperImplHelper.h.

◆ mapperElec2Det()

template<typename T >
std::function< std::optional< o2::mch::raw::DsDetId >(o2::mch::raw::DsElecId)> o2::mch::raw::impl::mapperElec2Det ( const std::map< uint32_t, uint32_t > &  elec2det)

Definition at line 33 of file ElectronicMapperImplHelper.h.

◆ mapperFeeLink2Solar()

template<typename T >
std::function< std::optional< uint16_t >(FeeLinkId)> o2::mch::raw::impl::mapperFeeLink2Solar ( const std::map< uint32_t, uint16_t > &  cruLink2solar)

Definition at line 72 of file ElectronicMapperImplHelper.h.

◆ mapperSolar2FeeLink()

template<typename T >
std::function< std::optional< FeeLinkId >(uint16_t)> o2::mch::raw::impl::mapperSolar2FeeLink ( const std::map< uint16_t, uint32_t > &  solar2cruLink)

Definition at line 59 of file ElectronicMapperImplHelper.h.

◆ moveBuffer()

size_t o2::mch::raw::impl::moveBuffer ( std::vector< uint64_t > &  b64,
std::vector< std::byte > &  b8,
uint64_t  prefix = 0 
)

Move the content of b64 to b8 and clears b64. Returns the number of bytes moved into b8.

Definition at line 43 of file MoveBuffer.h.

◆ nofBits()

template<typename T >
int o2::mch::raw::impl::nofBits ( val)

Definition at line 23 of file NofBits.h.

◆ solar2FeeLinkConsistencyCheck()

template<typename T >
std::vector< std::string > o2::mch::raw::impl::solar2FeeLinkConsistencyCheck ( )

Definition at line 151 of file ElectronicMapperImplHelper.h.

◆ solarId2Index()

template<typename T >
std::optional< uint16_t > o2::mch::raw::impl::solarId2Index ( uint16_t  solarId)

Definition at line 242 of file ElectronicMapperImplHelper.h.

◆ solarIndex2Id()

template<typename T >
std::optional< uint16_t > o2::mch::raw::impl::solarIndex2Id ( uint16_t  solarIndex)

Definition at line 231 of file ElectronicMapperImplHelper.h.