#include "MDfragmentDBBChain.h" using namespace std; MDfragmentDBBChain::MDfragmentDBBChain(void *d) : MDfragment(d) { Init(); for (int i=0; iSetEquipmentType(141); _dbb.push_back(dbb); } } MDfragmentDBBChain::~MDfragmentDBBChain() { for (int i=0; iGetSize(); if (size == 0) return; if (size >8) { uint32_t* ptr = this->Get32bWordPtr(0); int ndw_dbb(0); for (int i=0; igetDBBSize(ptr, size/4-ndw_dbb); _dbb[i]->SetDataPtr(ptr, this_dbb_size*4); // _dbb[i]->dumpEventVRB(ptr, this_dbb_size*4); ptr += this_dbb_size; ndw_dbb += this_dbb_size; } } } int MDfragmentDBBChain::getDBBSize(uint32_t *ptr, int max_size) { int size(0); uint32_t *header = ptr; MDdataWordDBB dw(header); if (dw.GetDataType() != MDdataWordDBB::Header ){ // The data doesn't start with a header throw MDexception(" ERROR in MDframentDBBChain::getDBBSize(uint32_t *ptr) : 1st word is not a header") ; } else { dw.SetDataPtr(++ptr); size++; while (1) { if (size > max_size) throw MDexception(" ERROR in MDframentDBBChain::getDBBSize(uint32_t *ptr) : the trailer is missing") ; dw.SetDataPtr(ptr); if (dw.GetDataType() == MDdataWordDBB::Trailer) { size += DBB_TRAILER_WORDS; break; } else { ptr++; size++; } } } return size; } void MDfragmentDBBChain::Dump(int atTheTime) {}