ATLAS Offline Software
Loading...
Searching...
No Matches
PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback Class Reference

#include <ITkPixelDecodingPhaseIIRDOAlg.h>

Collaboration diagram for PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback:

Public Member Functions

 PhaseIIRDOCallback (PhaseIIPixelRawDataContainerMT *cont_coll, PhaseIIPixelRawDataContainerMT::ContainerPtr rdo_container_dest, const PixelID *idHelper, MsgStream &msg_source)
 ~PhaseIIRDOCallback ()=default
void evt_init (uint8_t tag)
void evt_next (uint8_t tag)
void evt_done ()
void add_hit (uint16_t col, uint16_t row, uint16_t tot)
void add_hmap (uint8_t qcol, uint8_t qrow, uint16_t hmap, uint64_t tots)
void add_qcore (uint8_t qcol, uint8_t qrow, uint64_t qtot)
uint8_t on_error (itksw::pix::endec::intf::EventError error)
void registerLastModule ()
void setOfflineID (const uint32_t &offlineID)
void setChipID (const uint8_t &chipID)
void setTransformType (const ITkPixelCabling::TransformType &transform)

Private Attributes

PhaseIIPixelRawDataContainerMT::ContainerPtr m_rdo_container_dest
PhaseIIPixelRawDataContainerMTm_cont_coll {}
PhaseII::ContainerRangeGuard< PhaseII::DataRange, PhaseIIPixelRawDataContainerMT::ContainerPtrm_dest_range_guard
unsigned int m_currentIdentifierHash {std::numeric_limits<unsigned int>::max()}
unsigned int m_n_rejected_work {}
uint32_t m_offlineID = 0
uint8_t m_chipID = 0
uint32_t m_n_rdos = 0
Identifier m_identifier {}
ITkPixelCabling::TransformType m_transform {ITkPixelCabling::TransformType::UndefinedTransform}
const PixelIDm_idHelper {}
MsgStream & m_msg_source

Detailed Description

Definition at line 79 of file ITkPixelDecodingPhaseIIRDOAlg.h.

Constructor & Destructor Documentation

◆ PhaseIIRDOCallback()

PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::PhaseIIRDOCallback ( PhaseIIPixelRawDataContainerMT * cont_coll,
PhaseIIPixelRawDataContainerMT::ContainerPtr rdo_container_dest,
const PixelID * idHelper,
MsgStream & msg_source )
inlineexplicit

Definition at line 82 of file ITkPixelDecodingPhaseIIRDOAlg.h.

83 :
84 m_rdo_container_dest(rdo_container_dest),
85 m_cont_coll(cont_coll),
86 m_dest_range_guard(rdo_container_dest),
88 m_idHelper(idHelper),
89 m_msg_source(msg_source)
90 {};
PhaseIIPixelRawDataContainerMT::ContainerPtr m_rdo_container_dest
PhaseII::ContainerRangeGuard< PhaseII::DataRange, PhaseIIPixelRawDataContainerMT::ContainerPtr > m_dest_range_guard

◆ ~PhaseIIRDOCallback()

PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::~PhaseIIRDOCallback ( )
default

Member Function Documentation

◆ add_hit()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::add_hit ( uint16_t col,
uint16_t row,
uint16_t tot )
inline

Definition at line 111 of file ITkPixelDecodingPhaseIIRDOAlg.h.

111 {
112 //Translate the col, row into module coordinates
113 // after that, row and col are phi_index and eta_index, respectively
115
116 //Set dummy values at 0 for these:
117 int bcid = 0;
118 int lvl0a = 0;
119 int lvl0d = 0;
120 if(col >= 400 || row >= 400) {
121 //This check is needed because the decoder can call add_hit with invalid col and row to signal an error
122 m_msg_source << MSG::WARNING << "Decoded hit with col and row >= 400, skipping. col=" << col << " row=" << row << endmsg;
123 }
126 std::array<std::int16_t,2>{static_cast<std::int16_t>(row), static_cast<std::int16_t>(col)},
127 PhaseII::PixelRawDataContainer::makeWord( tot, bcid, lvl0a, lvl0d ));
128 };
#define endmsg
static std::uint32_t makeWord(int tot, int bcid, int lvl1a, int lvl1d)
static void chipToModuleTransform(const TransformType &transform, const uint8_t &chipID, uint16_t &col, uint16_t &row)
void addDataForModule(T_RawDataContainerCollection &rdo_container_collection, ContainerRangeGuard< T_RawDataContainerPtr, T_RangeType > &range_guard, T_Coordinates &&coordinates, std::uint32_t data_word)
convenience method to add data to an RDO container, add a new RDO container, copy the data added for ...
row
Appending html table to final .html summary file.
setEventNumber setTimeStamp bcid

◆ add_hmap()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::add_hmap ( uint8_t qcol,
uint8_t qrow,
uint16_t hmap,
uint64_t tots )
inline

Definition at line 130 of file ITkPixelDecodingPhaseIIRDOAlg.h.

134 {};

◆ add_qcore()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::add_qcore ( uint8_t qcol,
uint8_t qrow,
uint64_t qtot )
inline

Definition at line 136 of file ITkPixelDecodingPhaseIIRDOAlg.h.

139 {};

◆ evt_done()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::evt_done ( )
inline

Definition at line 108 of file ITkPixelDecodingPhaseIIRDOAlg.h.

108 {
109 };

◆ evt_init()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::evt_init ( uint8_t tag)
inline

Definition at line 95 of file ITkPixelDecodingPhaseIIRDOAlg.h.

95 {
96
97 m_identifier = Identifier(m_offlineID);
98 const auto waferHash = m_idHelper->wafer_hash(m_identifier);
99 if(waferHash != m_currentIdentifierHash){
101 m_currentIdentifierHash = waferHash;
102 m_dest_range_guard=PhaseII::ContainerRangeGuard<PhaseII::DataRange, PhaseIIPixelRawDataContainerMT::ContainerPtr>(m_rdo_container_dest);
103 }
104 };

◆ evt_next()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::evt_next ( uint8_t tag)
inline

Definition at line 106 of file ITkPixelDecodingPhaseIIRDOAlg.h.

106{};

◆ on_error()

uint8_t PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::on_error ( itksw::pix::endec::intf::EventError error)
inline

Definition at line 141 of file ITkPixelDecodingPhaseIIRDOAlg.h.

141{return 0;};

◆ registerLastModule()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::registerLastModule ( )
inline

Definition at line 144 of file ITkPixelDecodingPhaseIIRDOAlg.h.

144 {
145 if (!m_dest_range_guard.empty()) {
146 // register the RDO range for this module, or erase the newly added
147 if (!m_cont_coll->registerOrEraseNewData(m_currentIdentifierHash,m_dest_range_guard.range())) {
149 }
150 // in the process of adding hits to the original container, its capacity may have
151 // been exceeded and the container may have been changed for the current module. To
152 // ensure that the same container is used for the next module get the container, that
153 // contains the hits for the current module from the the range_guard.
155 m_n_rdos += m_dest_range_guard.range().size();
156 }
157 }

◆ setChipID()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::setChipID ( const uint8_t & chipID)
inline

Definition at line 165 of file ITkPixelDecodingPhaseIIRDOAlg.h.

165 {
166 m_chipID = chipID;
167 }

◆ setOfflineID()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::setOfflineID ( const uint32_t & offlineID)
inline

Definition at line 160 of file ITkPixelDecodingPhaseIIRDOAlg.h.

160 {
161 m_offlineID = offlineID;
162 };

◆ setTransformType()

void PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::setTransformType ( const ITkPixelCabling::TransformType & transform)
inline

Definition at line 170 of file ITkPixelDecodingPhaseIIRDOAlg.h.

170 {
172 }
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.

Member Data Documentation

◆ m_chipID

uint8_t PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_chipID = 0
private

Definition at line 196 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_cont_coll

PhaseIIPixelRawDataContainerMT* PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_cont_coll {}
private

Definition at line 181 of file ITkPixelDecodingPhaseIIRDOAlg.h.

181{};

◆ m_currentIdentifierHash

unsigned int PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_currentIdentifierHash {std::numeric_limits<unsigned int>::max()}
private

Definition at line 187 of file ITkPixelDecodingPhaseIIRDOAlg.h.

187{std::numeric_limits<unsigned int>::max()};

◆ m_dest_range_guard

PhaseII::ContainerRangeGuard<PhaseII::DataRange, PhaseIIPixelRawDataContainerMT::ContainerPtr> PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_dest_range_guard
private

Definition at line 184 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_identifier

Identifier PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_identifier {}
private

Definition at line 202 of file ITkPixelDecodingPhaseIIRDOAlg.h.

202{};

◆ m_idHelper

const PixelID* PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_idHelper {}
private

Definition at line 208 of file ITkPixelDecodingPhaseIIRDOAlg.h.

208{};

◆ m_msg_source

MsgStream& PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_msg_source
private

Definition at line 211 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_n_rdos

uint32_t PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_n_rdos = 0
private

Definition at line 199 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_n_rejected_work

unsigned int PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_n_rejected_work {}
private

Definition at line 190 of file ITkPixelDecodingPhaseIIRDOAlg.h.

190{};

◆ m_offlineID

uint32_t PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_offlineID = 0
private

Definition at line 193 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_rdo_container_dest

PhaseIIPixelRawDataContainerMT::ContainerPtr PixelCallbacksPhaseIIRDO::PhaseIIRDOCallback::m_rdo_container_dest
private

Definition at line 178 of file ITkPixelDecodingPhaseIIRDOAlg.h.

◆ m_transform


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