ATLAS Offline Software
Loading...
Searching...
No Matches
Decoder::Slice Struct Reference
Collaboration diagram for Decoder::Slice:

Classes

struct  Id

Public Member Functions

void addTob (const xAOD::eFexEMRoI &tob)
void addTob (const xAOD::eFexTauRoI &tob)
std::vector< uint32_t > getWords (const Id &id)

Public Attributes

std::vector< xTobem_xtobs
std::vector< xTobtau_xtobs
std::vector< Tobtobs

Detailed Description

Definition at line 268 of file eFexByteStreamTool.cxx.

Member Function Documentation

◆ addTob() [1/2]

void Decoder::Slice::addTob ( const xAOD::eFexEMRoI & tob)
inline

Definition at line 276 of file eFexByteStreamTool.cxx.

276 {
277 if(tob.isTOB()) {
278 tobs.push_back({.word0=tob.word0()});
279 } else {
280 em_xtobs.push_back({.word0=tob.word0(),.word1=tob.word1()});
281 }
282 }
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
uint32_t word1() const
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
std::vector< Tob > tobs
std::vector< xTob > em_xtobs

◆ addTob() [2/2]

void Decoder::Slice::addTob ( const xAOD::eFexTauRoI & tob)
inline

Definition at line 283 of file eFexByteStreamTool.cxx.

283 {
284 if(tob.isTOB()) {
285 tobs.push_back({.word0=tob.word0()});
286 } else {
287 tau_xtobs.push_back({.word0=tob.word0(),.word1=tob.word1()});
288 }
289 }
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
uint32_t word1() const
std::vector< xTob > tau_xtobs

◆ getWords()

std::vector< uint32_t > Decoder::Slice::getWords ( const Id & id)
inline

Definition at line 290 of file eFexByteStreamTool.cxx.

290 {
291
292 const uint32_t tobType = (id.fpgaNumber==1) ? 1 : 0; // only fpga1 produce tau tobs
293 const uint32_t numTobs = tobs.size();
294 const uint32_t numEmXtobs = em_xtobs.size();
295 const uint32_t numTauXtobs = tau_xtobs.size();
296 const uint32_t safeMode=0; // tob/xtob data not suppressed
297
298 std::vector<uint32_t> out;
299 out.reserve(numTobs + numEmXtobs*2+numTauXtobs*2 + 1 + (numTobs%2 ? 0 : 1)); // last part to ensure multiple of 64bit
300 for(auto& tob : tobs) out.push_back(tob.word0);
301 for(auto& xtob : em_xtobs) {out.push_back(xtob.word0);out.push_back(xtob.word1);}
302 for(auto& xtob : tau_xtobs) {out.push_back(xtob.word0);out.push_back(xtob.word1);}
303 if(numTobs%2==0) out.push_back(0); // padding word
304
305 uint32_t sliceTrailer = 0;
306 sliceTrailer += (tobType&0x1)<<8;
307 sliceTrailer += (numTobs&0x7)<<9;
308 sliceTrailer += (numEmXtobs&0x3f)<<12;
309 sliceTrailer += (numTauXtobs&0x3f)<<18;
310 sliceTrailer += (id.sliceNumber&0x7)<<24;
311 sliceTrailer += (safeMode&0x1)<<27;
312 sliceTrailer += (id.fpgaNumber&0x3)<<28;
313
314 out.push_back(sliceTrailer);
315 return out;
316
317 }
setEventNumber uint32_t

Member Data Documentation

◆ em_xtobs

std::vector<xTob> Decoder::Slice::em_xtobs

Definition at line 318 of file eFexByteStreamTool.cxx.

◆ tau_xtobs

std::vector<xTob> Decoder::Slice::tau_xtobs

Definition at line 319 of file eFexByteStreamTool.cxx.

◆ tobs

std::vector<Tob> Decoder::Slice::tobs

Definition at line 320 of file eFexByteStreamTool.cxx.


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