CGEM BOSS 6.6.5.h
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)
 

Static Public Member Functions

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

Detailed Description

Definition at line 9 of file ZddConverter.h.

Member Function Documentation

◆ convert()

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 // std::cout << " 0x" << std::setw(8) << std::setfill('0') << pdata[i];
32 // if ( i%8 == 7 ) std::cout << std::endl;
33 //}
34 //std::cout << std::dec << std::endl;
35 ///////////////////////////////////////////
36
37 uint32_t* pend = pdata + size;
38
39 while ( pdata < pend ) {
40 pdata = decodeBoard(pdata, evt);
41 }
42
43 if ( pdata != pend ) {
44 std::cout << "ZddConverter: there are problems within the event data size" << std::endl;
45 exit(1);
46 }
47
48 return true;
49}

Referenced by RawDataZddEventCnv::createObj().

◆ destroy()

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().

◆ instance()

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().


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