Project
Loading...
Searching...
No Matches
o2::itsmft::ClusterPattern Class Reference

#include <ClusterPattern.h>

Public Member Functions

 ClusterPattern ()
 Default constructor.
 
 ClusterPattern (int nRow, int nCol, const unsigned char patt[MaxPatternBytes])
 Standard constructor.
 
template<class iterator >
void acquirePattern (iterator &pattIt)
 
template<class iterator >
 ClusterPattern (iterator &pattIt)
 Constructor from cluster patterns.
 
const std::array< unsigned char, kExtendedPatternBytes > & getPattern () const
 Returns the pattern.
 
unsigned char getByte (int n) const
 Returns a specific byte of the pattern.
 
int getRowSpan () const
 Returns the number of rows.
 
int getColumnSpan () const
 Returns the number of columns.
 
int getUsedBytes () const
 Returns the number of bytes used for the pattern.
 
int getNPixels () const
 Returns the number of fired pixels.
 
void print () const
 
void setPattern (int nRow, int nCol, const unsigned char patt[MaxPatternBytes])
 Sets the pattern.
 
void setPattern (const unsigned char bitmask[kExtendedPatternBytes])
 Sets the whole bitmask: the number of rows, the number of columns and the pattern.
 
int getCOG (float &xCOG, float &zCOG) const
 Compute pattern's COG position. Returns the number of fired pixels.
 
bool isSet (int row, int col) const
 
void resetPixel (int row, int col)
 
void setPixel (int row, int col)
 
template<typename Processor >
void process (Processor procRowCol)
 

Static Public Member Functions

template<class iterator >
static void skipPattern (iterator &pattIt)
 
static int getCOG (int rowSpan, int colSpan, const unsigned char patt[MaxPatternBytes], float &xCOG, float &zCOG)
 Static: Compute pattern's COG position. Returns the number of fired pixels.
 

Public Attributes

friend ClusterTopology
 
friend TopologyDictionary
 
friend BuildTopologyDictionary
 

Static Public Attributes

static constexpr uint8_t MaxRowSpan = 128
 
static constexpr uint8_t MaxColSpan = 128
 
static constexpr int MaxPatternBits = MaxRowSpan * MaxColSpan
 
static constexpr int MaxPatternBytes = MaxPatternBits / 8
 
static constexpr int SpanMask = 0x7fff
 
static constexpr int TruncateMask = 0x8000
 
static constexpr int kExtendedPatternBytes = MaxPatternBytes + 2
 Maximum number of bytes for the cluster puttern + 2 bytes respectively for the number of rows and columns of the bounding box.
 

Friends

std::ostream & operator<< (std::ostream &os, const ClusterPattern &top)
 Prints the pattern.
 

Detailed Description

Definition at line 39 of file ClusterPattern.h.

Constructor & Destructor Documentation

◆ ClusterPattern() [1/3]

o2::itsmft::ClusterPattern::ClusterPattern ( )

Default constructor.

Definition at line 26 of file ClusterPattern.cxx.

◆ ClusterPattern() [2/3]

o2::itsmft::ClusterPattern::ClusterPattern ( int  nRow,
int  nCol,
const unsigned char  patt[MaxPatternBytes] 
)

Standard constructor.

Definition at line 28 of file ClusterPattern.cxx.

◆ ClusterPattern() [3/3]

template<class iterator >
o2::itsmft::ClusterPattern::ClusterPattern ( iterator &  pattIt)
inline

Constructor from cluster patterns.

Definition at line 78 of file ClusterPattern.h.

Member Function Documentation

◆ acquirePattern()

template<class iterator >
void o2::itsmft::ClusterPattern::acquirePattern ( iterator &  pattIt)
inline

Definition at line 55 of file ClusterPattern.h.

◆ getByte()

unsigned char o2::itsmft::ClusterPattern::getByte ( int  n) const

Returns a specific byte of the pattern.

Definition at line 33 of file ClusterPattern.cxx.

◆ getCOG() [1/2]

int o2::itsmft::ClusterPattern::getCOG ( float &  xCOG,
float &  zCOG 
) const
inline

Compute pattern's COG position. Returns the number of fired pixels.

Definition at line 107 of file ClusterPattern.h.

◆ getCOG() [2/2]

int o2::itsmft::ClusterPattern::getCOG ( int  rowSpan,
int  colSpan,
const unsigned char  patt[MaxPatternBytes],
float &  xCOG,
float &  zCOG 
)
static

Static: Compute pattern's COG position. Returns the number of fired pixels.

Definition at line 126 of file ClusterPattern.cxx.

◆ getColumnSpan()

int o2::itsmft::ClusterPattern::getColumnSpan ( ) const
inline

Returns the number of columns.

Definition at line 92 of file ClusterPattern.h.

◆ getNPixels()

int o2::itsmft::ClusterPattern::getNPixels ( ) const

Returns the number of fired pixels.

Definition at line 110 of file ClusterPattern.cxx.

◆ getPattern()

const std::array< unsigned char, kExtendedPatternBytes > & o2::itsmft::ClusterPattern::getPattern ( ) const
inline

Returns the pattern.

Definition at line 86 of file ClusterPattern.h.

◆ getRowSpan()

int o2::itsmft::ClusterPattern::getRowSpan ( ) const
inline

Returns the number of rows.

Definition at line 90 of file ClusterPattern.h.

◆ getUsedBytes()

int o2::itsmft::ClusterPattern::getUsedBytes ( ) const

Returns the number of bytes used for the pattern.

Definition at line 43 of file ClusterPattern.cxx.

◆ isSet()

bool o2::itsmft::ClusterPattern::isSet ( int  row,
int  col 
) const
inline

Definition at line 109 of file ClusterPattern.h.

◆ print()

void o2::itsmft::ClusterPattern::print ( ) const

Definition at line 105 of file ClusterPattern.cxx.

◆ process()

template<typename Processor >
void o2::itsmft::ClusterPattern::process ( Processor  procRowCol)

Definition at line 156 of file ClusterPattern.h.

◆ resetPixel()

void o2::itsmft::ClusterPattern::resetPixel ( int  row,
int  col 
)
inline

Definition at line 116 of file ClusterPattern.h.

◆ setPattern() [1/2]

void o2::itsmft::ClusterPattern::setPattern ( const unsigned char  bitmask[kExtendedPatternBytes])

Sets the whole bitmask: the number of rows, the number of columns and the pattern.

◆ setPattern() [2/2]

void o2::itsmft::ClusterPattern::setPattern ( int  nRow,
int  nCol,
const unsigned char  patt[MaxPatternBytes] 
)

Sets the pattern.

Definition at line 53 of file ClusterPattern.cxx.

◆ setPixel()

void o2::itsmft::ClusterPattern::setPixel ( int  row,
int  col 
)
inline

Definition at line 125 of file ClusterPattern.h.

◆ skipPattern()

template<class iterator >
static void o2::itsmft::ClusterPattern::skipPattern ( iterator &  pattIt)
inlinestatic

Definition at line 69 of file ClusterPattern.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const ClusterPattern top 
)
friend

Prints the pattern.

Definition at line 69 of file ClusterPattern.cxx.

Member Data Documentation

◆ BuildTopologyDictionary

friend o2::itsmft::ClusterPattern::BuildTopologyDictionary

Definition at line 139 of file ClusterPattern.h.

◆ ClusterTopology

friend o2::itsmft::ClusterPattern::ClusterTopology

Definition at line 137 of file ClusterPattern.h.

◆ kExtendedPatternBytes

constexpr int o2::itsmft::ClusterPattern::kExtendedPatternBytes = MaxPatternBytes + 2
staticconstexpr

Maximum number of bytes for the cluster puttern + 2 bytes respectively for the number of rows and columns of the bounding box.

Definition at line 84 of file ClusterPattern.h.

◆ MaxColSpan

constexpr uint8_t o2::itsmft::ClusterPattern::MaxColSpan = 128
staticconstexpr

Definition at line 43 of file ClusterPattern.h.

◆ MaxPatternBits

constexpr int o2::itsmft::ClusterPattern::MaxPatternBits = MaxRowSpan * MaxColSpan
staticconstexpr

Definition at line 44 of file ClusterPattern.h.

◆ MaxPatternBytes

constexpr int o2::itsmft::ClusterPattern::MaxPatternBytes = MaxPatternBits / 8
staticconstexpr

Definition at line 45 of file ClusterPattern.h.

◆ MaxRowSpan

constexpr uint8_t o2::itsmft::ClusterPattern::MaxRowSpan = 128
staticconstexpr

Definition at line 42 of file ClusterPattern.h.

◆ SpanMask

constexpr int o2::itsmft::ClusterPattern::SpanMask = 0x7fff
staticconstexpr

Definition at line 46 of file ClusterPattern.h.

◆ TopologyDictionary

friend o2::itsmft::ClusterPattern::TopologyDictionary

Definition at line 138 of file ClusterPattern.h.

◆ TruncateMask

constexpr int o2::itsmft::ClusterPattern::TruncateMask = 0x8000
staticconstexpr

Definition at line 47 of file ClusterPattern.h.


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