BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
MucConverter Class Reference

#include <MucConverter.h>

Public Member Functions

StatusCode convert (const BufferHolder &src, MucDigiCol *des)
 
StatusCode convert (MucDigiCol *src, WriteRawEvent *&des)
 

Static Public Member Functions

static MucConverterinstance ()
 
static void destroy ()
 

Detailed Description

Definition at line 9 of file MucConverter.h.

Member Function Documentation

◆ convert() [1/2]

StatusCode MucConverter::convert ( const BufferHolder src,
MucDigiCol des 
)

Definition at line 22 of file MucConverter.cxx.

23{
24 uint32_t REId, TEId, FecData, StrSqc;
25 uint32_t nbuf = src.nBuf();
26
27 for (uint32_t i = 0; i < nbuf; ++i) {
28 uint32_t* buf = src(i);
29 uint32_t bufSize = src.bufSize(i);
30 for (uint32_t j = 0; j < bufSize; ++j) {
31 m_builder.unPack(buf[j], REId, FecData, StrSqc);
32 TEId = m_builder.getTEID( REId );
33 if ( TEId == 0xFFFFFFFF ) continue;
34
35 uint32_t teidBase = TEId & 0xFF0FFFFF;
36 uint32_t teid;
37 for (uint32_t k = 0; FecData != 0 && k < 16; FecData >>= 1, ++k) {
38 if ((FecData & 1) == 0) continue;
39 if (StrSqc == 0) {
40 teid = teidBase + 15 -k;
41 }
42 else {
43 teid = teidBase + k;
44 }
45 MucDigi* mucDigi = new MucDigi(teid);
46 des->push_back( mucDigi );
47 }
48 }
49 }
50
51 return StatusCode::SUCCESS;
52}
uint32_t nBuf() const
Definition: BufferHolder.h:15
uint32_t bufSize(int i) const
Definition: BufferHolder.h:16
virtual void unPack(uint32_t reDigi, uint32_t &REId, uint32_t &FecData, uint32_t &StrSqc)
Definition: MucBuilder.cxx:34
virtual uint32_t getTEID(uint32_t reid)
Definition: MucBuilder.h:17

Referenced by RawDataMucDigiCnv::createObj(), RawDataMucDigiCnv::createRep(), and MixerAlg::decodeMuc().

◆ convert() [2/2]

StatusCode MucConverter::convert ( MucDigiCol src,
WriteRawEvent *&  des 
)

Definition at line 54 of file MucConverter.cxx.

55{
56 return m_builder.pack(src, des);
57}
virtual StatusCode pack(MucDigiCol *digiCol, WriteRawEvent *&re)
Definition: MucBuilder.cxx:44

◆ destroy()

void MucConverter::destroy ( )
static

Definition at line 14 of file MucConverter.cxx.

15{
16 if ( s_instance != 0 ) {
17 delete s_instance;
18 s_instance = 0;
19 }
20}

Referenced by RawDataMucDigiCnv::~RawDataMucDigiCnv().

◆ instance()

MucConverter * MucConverter::instance ( )
static

Definition at line 5 of file MucConverter.cxx.

6{
7 if ( s_instance == 0 ) {
8 s_instance = new MucConverter();
9 }
10
11 return s_instance;
12}

Referenced by RawDataMucDigiCnv::initialize(), and MixerAlg::MixerAlg().


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