BOSS 8.0.0
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)
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 ()
static ZddConverterinstance (int runMode=2)
static void destroy ()

Detailed Description

Member Function Documentation

◆ convert() [1/3]

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

Definition at line 24 of file ZddConverter.cxx.

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

◆ convert() [2/3]

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

◆ convert() [3/3]

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

◆ destroy() [1/3]

void ZddConverter::destroy ( )
static

Definition at line 16 of file ZddConverter.cxx.

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

Referenced by RawDataZddEventCnv::~RawDataZddEventCnv().

◆ destroy() [2/3]

void ZddConverter::destroy ( )
static

◆ destroy() [3/3]

void ZddConverter::destroy ( )
static

◆ instance() [1/3]

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

Definition at line 10 of file ZddConverter.cxx.

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

Referenced by RawDataZddEventCnv::initialize().

◆ instance() [2/3]

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

◆ instance() [3/3]

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

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