BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
ZddConverter Class Reference

#include <ZddConverter.h>

Public Member Functions

bool convert (uint32_t *pdata, int size, Event::ZddEvent *evt)
 
bool convert (uint32_t *pdata, int size, Event::ZddEvent *evt)
 

Static Public Member Functions

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

Detailed Description

Member Function Documentation

◆ convert() [1/2]

bool ZddConverter::convert ( uint32_t *  pdata,
int  size,
Event::ZddEvent evt 
)

Definition at line 26 of file ZddConverter.cxx.

27{
28 // for debugging
29 //std::cout << "RAW buffer size: " << size << std::endl << std::hex;
30 //for ( int i = 0; i < size; ++i ) {
31 // if ( i%8 == 0 ) std::cout << "0x" << std::setw(8) << std::setfill('0') << i << ":";
32 // std::cout << " 0x" << std::setw(8) << std::setfill('0') << pdata[i];
33 // if ( i%8 == 7 ) std::cout << std::endl;
34 //}
35 //std::cout << std::dec << std::endl;
36 ///////////////////////////////////////////
37
38 uint32_t* pend = pdata + size;
39
40 while ( pdata < pend ) {
41 pdata = decodeBoard(pdata, evt);
42 }
43
44 if ( pdata != pend ) {
45 std::cout << "ZddConverter: there are problems within the event data size" << std::endl;
46 exit(1);
47 }
48
49 return true;
50}

Referenced by RawDataZddEventCnv::createObj().

◆ convert() [2/2]

bool ZddConverter::convert ( uint32_t *  pdata,
int  size,
Event::ZddEvent evt 
)

◆ destroy() [1/2]

void ZddConverter::destroy ( )
static

Definition at line 18 of file ZddConverter.cxx.

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

Referenced by RawDataZddEventCnv::~RawDataZddEventCnv().

◆ destroy() [2/2]

static void ZddConverter::destroy ( )
static

◆ instance() [1/2]

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

Definition at line 9 of file ZddConverter.cxx.

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

Referenced by RawDataZddEventCnv::initialize().

◆ instance() [2/2]

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

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