21{
22
23 int nboard = m_data.getNBoard();
24 if (m_eb2 == 0 && nboard == 1) {
25 m_data_hlt.setBuffer(m_data.getBuffer());
26 } else if (m_eb2 > 0 || nboard > 1) {
27 m_data_hlt.setBuffer(m_data.getBody());
28 }
29
30 if (m_data_hlt.getBuffer() == NULL || m_data_hlt.getTrailerMagic() != BinData::TRAILER_MAGIC) {
31 static int count = 0;
32 B2FATAL("Bad tarailer magic for HLT = " << m_data_hlt.getTrailerMagic()
33 << " count = " << count);
34 }
36 if (msg->
type() == MSG_TERMINATE) {
37 B2INFO("Got Termination message");
38 delete msg;
39 return false;
40 }
41
43 delete msg;
44 if (nboard > 1) {
45 unsigned int offset = m_data_hlt.getWordSize() + m_data.getHeaderWordSize();
46 for (int i = 0; i < nboard - 1; ++i) {
47 m_data_pxd.setBuffer(m_data.getBuffer() + offset);
48 offset += m_data_pxd.getWordSize();
49 if (m_data_pxd.getBody()[0] != ONSENBinData::MAGIC) {
50 B2FATAL("Bad ONSEN magic for PXD = " << m_data_pxd.getTrailerMagic());
51 return false;
52 } else if (m_data_pxd.getTrailerMagic() != BinData::TRAILER_MAGIC) {
53 B2FATAL("Bad tarailer magic for PXD = " << m_data_pxd.getTrailerMagic());
54 return false;
55 }
56 if (m_data_pxd.getBuffer() != NULL) {
57 m_rawpxdary.appendNew((int*)m_data_pxd.getBody(), m_data_pxd.getBodyByteSize());
58
59 }
60 }
61 } else {
62 m_data_pxd.setBuffer(NULL);
63 }
64 return true;
65}
int restoreDataStore(EvtMessage *msg)
Restore DataStore objects from EvtMessage.
Class to manage streamed object.
ERecordType type() const
Get record type.