1#include "GaudiKernel/MsgStream.h"
2#include "GaudiKernel/Bootstrap.h"
11 if ( s_instance == 0 ) {
20 if ( s_instance != 0 ) {
28 uint32_t REId, TEId, TETDC, TEADC, measure;
29 uint32_t nbuf = src.
nBuf();
31 for (uint32_t i = 0; i < nbuf; ++i) {
32 uint32_t* buf = src(i);
33 uint32_t* bufend = buf + src.
bufSize(i);
34 for (; buf < bufend; ++buf) {
36 m_builder.
unPack(*buf, REId, TETDC, TEADC, measure);
39 if ( TEId == 0xFFFFFFFF )
continue;
41 if ( m_EmcProvider ) {
46 m_EmcProvider->
doCalib(
id, measure, TEADC);
52 des->push_back(emcDigi);
56 return StatusCode::SUCCESS;
61 return m_builder.
pack(src, des);
64EmcConverter::EmcConverter(
int runMode)
68 if ( m_runMode == 1 ) {
71 StatusCode sc = Gaudi::svcLocator()->getService(
"RawDataProviderSvc", svc);
80 std::cerr <<
"Failed to get the RawDataProviderSvc" << std::endl;
85EmcConverter::~EmcConverter()
ObjectVector< EmcDigi > EmcDigiCol
uint32_t bufSize(int i) const
StatusCode pack(EmcDigiCol *digiCol, WriteRawEvent *&re)
uint32_t getTEID(uint32_t reid)
void unPack(uint32_t reDigi, uint32_t &REId, uint32_t &TETDC, uint32_t &TEADC, uint32_t &measure)
static EmcConverter * instance(int runMode=2)
StatusCode convert(const BufferHolder &src, EmcDigiCol *des)
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)
virtual EmcRawDataProvider * getEmcProvider()=0