BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcConverter Class Reference

#include <EmcConverter.h>

Public Member Functions

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

Static Public Member Functions

static EmcConverterinstance (int runMode=2)
 
static void destroy ()
 
static EmcConverterinstance (int runMode=2)
 
static void destroy ()
 

Detailed Description

Member Function Documentation

◆ convert() [1/4]

StatusCode EmcConverter::convert ( const BufferHolder src,
EmcDigiCol des 
)

Definition at line 26 of file EmcConverter.cxx.

27{
28 uint32_t REId, TEId, TETDC, TEADC, measure;
29 uint32_t nbuf = src.nBuf();
30
31 for (uint32_t i = 0; i < nbuf; ++i) { //loop the buffer
32 uint32_t* buf = src(i);
33 uint32_t* bufend = buf + src.bufSize(i);
34 for (; buf < bufend; ++buf) { //loop the digit
35
36 m_builder.unPack(*buf, REId, TETDC, TEADC, measure);
37
38 TEId = m_builder.getTEID(REId);
39 if ( TEId == 0xFFFFFFFF ) continue;
40
41 if ( m_EmcProvider ) {
42 // by fucd: if not good digi, reject. Only for online mode now
44 |EmcRawDataProvider::DropHot,TEId,measure,TEADC,TETDC)) continue;
45 Identifier id(TEId);
46 m_EmcProvider->doCalib(id, measure, TEADC);
47 }
48
49 // create and set the DataObject
50 EmcDigi* emcDigi = new EmcDigi(Identifier(TEId), TETDC, TEADC);
51 emcDigi->setMeasure(measure);
52 des->push_back(emcDigi);
53 }
54 }
55
56 return StatusCode::SUCCESS;
57}
void unPack(uint32_t reDigi, uint32_t &REId, uint32_t &TETDC, uint32_t &TEADC, uint32_t &measure)
Definition: EmcBuilder.cxx:22
void setMeasure(const unsigned int measure)
bool isGoodEmcDigi(uint32_t control, uint32_t id, uint32_t measure, uint32_t adc, uint32_t tdc)
void doCalib(Identifier &id, uint32_t &measure, uint32_t &adc)

Referenced by RawDataEmcDigiCnv::createObj(), RawDataEmcDigiCnv::createRep(), MixerAlg::decodeEmc(), and RawEventReader::execute().

◆ convert() [2/4]

StatusCode EmcConverter::convert ( const BufferHolder src,
EmcDigiCol des 
)

◆ convert() [3/4]

StatusCode EmcConverter::convert ( EmcDigiCol src,
WriteRawEvent *&  des 
)

Definition at line 59 of file EmcConverter.cxx.

60{
61 return m_builder.pack(src, des);
62}
StatusCode pack(EmcDigiCol *digiCol, WriteRawEvent *&re)
Definition: EmcBuilder.cxx:33

◆ convert() [4/4]

StatusCode EmcConverter::convert ( EmcDigiCol src,
WriteRawEvent *&  des 
)

◆ destroy() [1/2]

void EmcConverter::destroy ( )
static

Definition at line 18 of file EmcConverter.cxx.

19{
20 if ( s_instance != 0 ) {
21 delete s_instance;
22 s_instance = 0;
23 }
24}

Referenced by RawDataEmcDigiCnv::~RawDataEmcDigiCnv(), and RawEventReader::~RawEventReader().

◆ destroy() [2/2]

static void EmcConverter::destroy ( )
static

◆ instance() [1/2]

EmcConverter * EmcConverter::instance ( int  runMode = 2)
static

Definition at line 9 of file EmcConverter.cxx.

10{
11 if ( s_instance == 0 ) {
12 s_instance = new EmcConverter(runMode);
13 }
14
15 return s_instance;
16}

Referenced by RawDataEmcDigiCnv::initialize(), MixerAlg::MixerAlg(), and RawEventReader::RawEventReader().

◆ instance() [2/2]

static EmcConverter * EmcConverter::instance ( int  runMode = 2)
static

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