CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DCCTBDataParser Class Reference

#include <DCCDataParser.h>

Public Types

enum  DCCDataParserGlobalFields { EMPTYEVENTSIZE = 32 }
 

Public Member Functions

std::pair< uint32_t, uint32_t > checkEventLength (const uint32_t *pointerToEvent, uint32_t bytesToEnd, bool singleEvent=false)
 
std::vector< DCCTBEventBlock * > & dccEvents ()
 
uint32_t dccId ()
 
 DCCTBDataParser (const std::vector< uint32_t > &parserParameters, bool parseInternalData=true, bool debug=true)
 
bool debug ()
 
std::map< std::string, uint32_t > & errorCounters ()
 
std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > events ()
 
const uint32_t * getBuffer ()
 
std::string getDecString (uint32_t data)
 
std::string getHexString (uint32_t data)
 
std::string getIndexedData (uint32_t indexed, uint32_t *pointer)
 
std::string index (uint32_t position)
 
DCCTBDataMappermapper ()
 
uint32_t numbSRF ()
 
uint32_t numbTriggerSamples ()
 
uint32_t numbTTs ()
 
uint32_t numbXtalSamples ()
 
void parseBuffer (const uint32_t *buffer, uint32_t bufferSize, bool singleEvent=false)
 
void parseFile (std::string fileName, bool singleEvent=false)
 
std::vector< uint32_t > parserParameters ()
 
void resetErrorCounters ()
 
void setParameters (const std::vector< uint32_t > &newParameters)
 
uint32_t srpBlockSize ()
 
uint32_t srpId ()
 
uint32_t tcc1Id ()
 
uint32_t tcc2Id ()
 
uint32_t tcc3Id ()
 
uint32_t tcc4Id ()
 
uint32_t tccBlockSize ()
 
 ~DCCTBDataParser ()
 

Protected Types

enum  DCCTBDataParserFields {
  EVENTLENGTHMASK = 0xFFFFFF, BOEBEGIN = 28, BOEMASK = 0xF, BOE = 0x5,
  EOEBEGIN = 28, EOEMASK = 0xF, EOE = 0xA
}
 

Protected Member Functions

void computeBlockSizes ()
 

Protected Attributes

const uint32_t * buffer_
 
uint32_t bufferSize_
 
std::vector< DCCTBEventBlock * > dccEvents_
 
bool debug_
 
std::map< std::string, uint32_t > errors_
 
std::string eventErrors_
 
std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > events_
 
DCCTBDataMappermapper_
 
std::vector< uint32_t > parameters
 
bool parseInternalData_
 
uint32_t processedEvent_
 
uint32_t srpBlockSize_
 
uint32_t tccBlockSize_
 

Detailed Description

Definition at line 25 of file DCCDataParser.h.

Member Enumeration Documentation

◆ DCCDataParserGlobalFields

Enumerator
EMPTYEVENTSIZE 

Definition at line 132 of file DCCDataParser.h.

132  {
133  EMPTYEVENTSIZE = 32 //bytes
134  };

◆ DCCTBDataParserFields

Enumerator
EVENTLENGTHMASK 
BOEBEGIN 
BOEMASK 
BOE 
EOEBEGIN 
EOEMASK 
EOE 

Definition at line 159 of file DCCDataParser.h.

159  {
160  EVENTLENGTHMASK = 0xFFFFFF,
161 
162  BOEBEGIN = 28, //begin of event (on 32 bit string starts at bit 28)
163  BOEMASK = 0xF, //mask is 4 bits (F)
164  BOE = 0x5, //B'0101'
165 
166  EOEBEGIN = 28, //end of event
167  EOEMASK = 0xF, //4 bits
168  EOE = 0xA //B'1010'
169  };

Constructor & Destructor Documentation

◆ DCCTBDataParser()

DCCTBDataParser::DCCTBDataParser ( const std::vector< uint32_t > &  parserParameters,
bool  parseInternalData = true,
bool  debug = true 
)

Class constructor: takes a vector of 10 parameters and flags for parseInternalData and debug Parameters are: 0 - crystal samples (default is 10) 1 - number of trigger time samples (default is 1) 2 - number of TT (default is 68) 3 - number of SR Flags (default is 68) 4 - DCC id 5 - SR id [6-9] - TCC[6-9] id

Definition at line 7 of file DCCDataParser.cc.

References computeBlockSizes(), mapper_, and resetErrorCounters().

8  : buffer_(nullptr), parseInternalData_(parseInternalData), debug_(debug), parameters(parserParameters) {
9  mapper_ = new DCCTBDataMapper(this); //build a new data mapper
10  resetErrorCounters(); //restart error counters
11  computeBlockSizes(); //calculate block sizes
12 }
void resetErrorCounters()
void computeBlockSizes()
std::vector< uint32_t > parameters
const uint32_t * buffer_
std::vector< uint32_t > parserParameters()
DCCTBDataMapper * mapper_

◆ ~DCCTBDataParser()

DCCTBDataParser::~DCCTBDataParser ( )

Class destructor

Definition at line 331 of file DCCDataParser.cc.

References dccEvents_, and mapper_.

331  {
332  // delete DCCTBEvents if any...
333  std::vector<DCCTBEventBlock *>::iterator it;
334  for (it = dccEvents_.begin(); it != dccEvents_.end(); it++) {
335  delete *it;
336  }
337  dccEvents_.clear();
338 
339  delete mapper_;
340 }
std::vector< DCCTBEventBlock * > dccEvents_
DCCTBDataMapper * mapper_

Member Function Documentation

◆ checkEventLength()

std::pair< uint32_t, uint32_t > DCCTBDataParser::checkEventLength ( const uint32_t *  pointerToEvent,
uint32_t  bytesToEnd,
bool  singleEvent = false 
)

Check if EVENT LENGTH is coeherent and if BOE/EOE are correctly written returns 3 bits code with the error found + event length

Definition at line 206 of file DCCDataParser.cc.

References BOE, BOEBEGIN, BOEMASK, EMPTYEVENTSIZE, EOEBEGIN, EOEMASK, errors_, EVENTLENGTHMASK, events_, getDecString(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by parseBuffer().

208  {
209  std::pair<uint32_t, uint32_t> result; //returns error mask and event length
210  uint32_t errorMask(0); //error mask to return
211 
212  //check begin of event (BOE bits field)
213  //(Note: we have to add one to read the 2nd 32 bit word where BOE is written)
214  const uint32_t *boePointer = pointerToEvent + 1;
215  if ((((*boePointer) >> BOEBEGIN) & BOEMASK) != BOE) {
216  (errors_["DCC::BOE"])++;
217  errorMask = 1;
218  }
219 
220  //get Event Length from buffer (Note: we have to add two to read the 3rd 32 bit word where EVENT LENGTH is written)
221  const uint32_t *myPointer = pointerToEvent + 2;
222  uint32_t eventLength = (*myPointer) & EVENTLENGTHMASK;
223 
224  // std::cout << " Event Length(from decoding) = " << dec << eventLength << "... bytes to end... " << bytesToEnd << ", event numb : " << processedEvent_ << std::endl;
225 
226  bool eoeError = false;
227 
228  //check if event is empty but but EVENT LENGTH is not corresponding to it
229  if (singleEvent && eventLength != bytesToEnd / 8) {
230  eventLength = bytesToEnd / 8;
231  (errors_["DCC::EVENT LENGTH"])++;
232  errorMask = errorMask | (1 << 1);
233  }
234  //check if event length mismatches the number of words written as data
235  else if (eventLength == 0 || eventLength > (bytesToEnd / 8) || eventLength < (EMPTYEVENTSIZE / 8)) {
236  // How to handle bad event length in multiple event buffers
237  // First approach : Send an exception
238  // Second aproach : Try to find the EOE (To be done? If yes check dataDecoder tBeam implementation)
239  std::string fatalError;
240 
241  fatalError += "\n ======================================================================";
242  fatalError += "\n Fatal error at event = " + getDecString(events_.size() + 1);
243  fatalError += "\n Decoded event length = " + getDecString(eventLength);
244  fatalError += "\n bytes to buffer end = " + getDecString(bytesToEnd);
245  fatalError += "\n Unable to procead the data decoding ...";
246 
247  if (eventLength > (bytesToEnd / 8)) {
248  fatalError += " (eventLength > (bytesToEnd / 8)";
249  } else {
250  fatalError += "\n event length not big enough heaven to build an empty event ( 4x8 bytes)";
251  }
252 
253  fatalError += "\n ======================================================================";
254 
255  throw ECALTBParserException(fatalError);
256  }
257 
258  //check end of event (EOE bits field)
259  //(Note: event length is multiplied by 2 because its written as 32 bit words and not 64 bit words)
260  const uint32_t *endOfEventPointer = pointerToEvent + eventLength * 2 - 1;
261  if ((((*endOfEventPointer) >> EOEBEGIN & EOEMASK) != EOEMASK) && !eoeError) {
262  (errors_["DCC::EOE"])++;
263  errorMask = errorMask | (1 << 2);
264  }
265 
266  //build result to return
267  result.first = errorMask;
268  result.second = eventLength;
269 
270  return result;
271 }
std::string getDecString(uint32_t data)
std::map< std::string, uint32_t > errors_
std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > events_

◆ computeBlockSizes()

void DCCTBDataParser::computeBlockSizes ( )
protected

Definition at line 29 of file DCCDataParser.cc.

References l1trig_cff::nTT, numbSRF(), numbTriggerSamples(), numbTTs(), srpBlockSize_, and tccBlockSize_.

Referenced by DCCTBDataParser(), and setParameters().

29  {
30  uint32_t nTT = numbTTs(); //gets the number of the trigger towers (default:68)
31  uint32_t tSamples = numbTriggerSamples(); //gets the number of trigger time samples (default: 1)
32  uint32_t nSr = numbSRF(); //gests the number of SR flags (default:68)
33 
34  uint32_t tf(0), srf(0);
35 
36  if ((nTT * tSamples) < 4 || (nTT * tSamples) % 4)
37  tf = 1; //test is there is no TTC primitives or if it's a multiple of 4?
38  else
39  tf = 0;
40 
41  if (srf < 16 || srf % 16)
42  srf = 1; //??? by default srf=0 why do we make this test ?????
43  else
44  srf = 0;
45 
46  //TTC block size: header (8 bytes) + 17 words with 4 trigger primitives (17*8bytes)
47  tccBlockSize_ = 8 + ((nTT * tSamples) / 4) * 8 + tf * 8;
48 
49  //SR block size: header (8 bytes) + 4 words with 16 SR flags + 1 word with 4 SR flags (5*8bytes)
50  srpBlockSize_ = 8 + (nSr / 16) * 8 + srf * 8;
51 }
uint32_t tccBlockSize_
uint32_t numbTriggerSamples()
uint32_t srpBlockSize_
uint32_t numbTTs()
uint32_t numbSRF()

◆ dccEvents()

std::vector< DCCTBEventBlock * > & DCCTBDataParser::dccEvents ( )
inline

Get method for DCCEventBlocks vector

Definition at line 195 of file DCCDataParser.h.

References dccEvents_.

Referenced by EcalTBDaqFormatter::interpretRawData(), and EcalTB07DaqFormatter::interpretRawData().

195 { return dccEvents_; }
std::vector< DCCTBEventBlock * > dccEvents_

◆ dccId()

uint32_t DCCTBDataParser::dccId ( )
inline

Definition at line 179 of file DCCDataParser.h.

References parameters.

179 { return parameters[4]; }
std::vector< uint32_t > parameters

◆ debug()

bool DCCTBDataParser::debug ( )
inline

◆ errorCounters()

std::map< std::string, uint32_t > & DCCTBDataParser::errorCounters ( )
inline

Get method for error counters map

Definition at line 196 of file DCCDataParser.h.

References errors_.

196 { return errors_; }
std::map< std::string, uint32_t > errors_

◆ events()

std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > DCCTBDataParser::events ( )
inline

Get method for events

Definition at line 197 of file DCCDataParser.h.

References events_.

197  {
198  return events_;
199 }
std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > events_

◆ getBuffer()

const uint32_t* DCCTBDataParser::getBuffer ( )
inline

Retrieves a pointer to the data buffer

Definition at line 125 of file DCCDataParser.h.

References buffer_.

125 { return buffer_; }
const uint32_t * buffer_

◆ getDecString()

std::string DCCTBDataParser::getDecString ( uint32_t  data)

◆ getHexString()

std::string DCCTBDataParser::getHexString ( uint32_t  data)

Definition at line 302 of file DCCDataParser.cc.

References edmScanValgrind::buffer, data, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getIndexedData().

302  {
303  char buffer[15];
304  snprintf(buffer, sizeof(buffer), "0x%08x", (uint16_t)(data));
305 
306  return std::string(buffer);
307 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ getIndexedData()

std::string DCCTBDataParser::getIndexedData ( uint32_t  indexed,
uint32_t *  pointer 
)

Definition at line 313 of file DCCDataParser.cc.

References getHexString(), index(), position, runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

313  {
315 
316  //char indexBuffer[20];
317  //char dataBuffer[20];
318  //sprintf(indexBuffer,"W[%08u] = ",position);
319  //sprintf(dataBuffer,"0x%08x",*pointer);
320  //ret = std::string(indexBuffer)+std::string(dataBuffer);
321 
322  ret = index(position) + getHexString(*pointer);
323 
324  return ret;
325 }
ret
prodAgent to be discontinued
std::string getHexString(uint32_t data)
static int position[264][3]
Definition: ReadPGInfo.cc:289
std::string index(uint32_t position)

◆ index()

std::string DCCTBDataParser::index ( uint32_t  position)

Definition at line 277 of file DCCDataParser.cc.

References position, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getIndexedData().

277  {
278  char indexBuffer[20];
279  long unsigned int pos = position;
280  snprintf(
281  indexBuffer, sizeof(indexBuffer), "W[%08lu]", pos); //build an index string for display purposes, p.e. W[15]
282 
283  return std::string(indexBuffer);
284 }
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ mapper()

DCCTBDataMapper * DCCTBDataParser::mapper ( )
inline

◆ numbSRF()

uint32_t DCCTBDataParser::numbSRF ( )
inline

Definition at line 178 of file DCCDataParser.h.

References parameters.

Referenced by computeBlockSizes(), and DCCTBSRPBlock::DCCTBSRPBlock().

178 { return parameters[3]; }
std::vector< uint32_t > parameters

◆ numbTriggerSamples()

uint32_t DCCTBDataParser::numbTriggerSamples ( )
inline

Definition at line 176 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBDataMapper::buildTCCFields(), and computeBlockSizes().

176 { return parameters[1]; }
std::vector< uint32_t > parameters

◆ numbTTs()

uint32_t DCCTBDataParser::numbTTs ( )
inline

Definition at line 177 of file DCCDataParser.h.

References parameters.

Referenced by computeBlockSizes(), DCCTBTCCBlock::DCCTBTCCBlock(), DCCTBTCCBlock::triggerFlags(), and DCCTBTCCBlock::triggerSamples().

177 { return parameters[2]; }
std::vector< uint32_t > parameters

◆ numbXtalSamples()

uint32_t DCCTBDataParser::numbXtalSamples ( )
inline

Definition at line 175 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBDataMapper::buildXtalFields(), DCCTBTowerBlock::parseXtalData(), and DCCTBXtalBlock::xtalDataSamples().

175 { return parameters[0]; }
std::vector< uint32_t > parameters

◆ parseBuffer()

void DCCTBDataParser::parseBuffer ( const uint32_t *  buffer,
uint32_t  bufferSize,
bool  singleEvent = false 
)

Parse data from a buffer

Definition at line 104 of file DCCDataParser.cc.

References edmScanValgrind::buffer, buffer_, checkEventLength(), dccEvents_, EMPTYEVENTSIZE, eventErrors_, events_, getDecString(), parseInternalData_, processedEvent_, resetErrorCounters(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalTBDaqFormatter::interpretRawData(), EcalTB07DaqFormatter::interpretRawData(), and parseFile().

104  {
105  resetErrorCounters(); //reset error counters
106 
107  buffer_ = buffer; //set class buffer
108 
109  //clear stored data
110  processedEvent_ = 0;
111  events_.clear();
112  std::vector<DCCTBEventBlock *>::iterator it;
113  for (it = dccEvents_.begin(); it != dccEvents_.end(); it++) {
114  delete *it;
115  }
116  dccEvents_.clear();
117  eventErrors_ = "";
118 
119  //for debug purposes
120  //std::cout << std::endl << "Now in DCCTBDataParser::parseBuffer" << std::endl;
121  //std::cout << std::endl << "Buffer Size:" << dec << bufferSize << std::endl;
122 
123  //check if we have a coherent buffer size
124  if (bufferSize % 8) {
125  std::string fatalError;
126  fatalError += "\n ======================================================================";
127  fatalError += "\n Fatal error at event = " + getDecString(events_.size() + 1);
128  fatalError += "\n Buffer Size of = " + getDecString(bufferSize) + "[bytes] is not divisible by 8 ... ";
129  fatalError += "\n ======================================================================";
130  throw ECALTBParserException(fatalError);
131  }
132  if (bufferSize < EMPTYEVENTSIZE) {
133  std::string fatalError;
134  fatalError += "\n ======================================================================";
135  fatalError += "\n Fatal error at event = " + getDecString(events_.size() + 1);
136  fatalError += "\n Buffer Size of = " + getDecString(bufferSize) + "[bytes] is less than an empty event ... ";
137  fatalError += "\n ======================================================================";
138  throw ECALTBParserException(fatalError);
139  }
140 
141  const uint32_t *myPointer = buffer_;
142 
143  // uint32_t processedBytes(0), wordIndex(0), lastEvIndex(0),eventSize(0), eventLength(0), errorMask(0);
144  uint32_t processedBytes(0), wordIndex(0), eventLength(0), errorMask(0);
145 
146  //parse until there are no more events
147  while (processedBytes + EMPTYEVENTSIZE <= bufferSize) {
148  //for debug purposes
149  //std::cout << "-> processedBytes. = " << dec << processedBytes << std::endl;
150  //std::cout << " -> Processed Event index = " << dec << processedEvent_ << std::endl;
151  //std::cout << "-> First ev.word = 0x" << hex << (*myPointer) << std::endl;
152  //std::cout << "-> word index = " << dec << wordIndex << std::endl;
153 
154  //check if Event Length is coherent /////////////////////////////////////////
155  uint32_t bytesToEnd = bufferSize - processedBytes;
156  std::pair<uint32_t, uint32_t> eventD = checkEventLength(myPointer, bytesToEnd, singleEvent);
157  eventLength = eventD.second;
158  errorMask = eventD.first;
160 
161  //for debug purposes
162  //std::cout <<" -> EventSizeBytes = " << dec << eventLength*8 << std::endl;
163 
164  //for debug purposes debug
165  //std::cout<<std::endl;
166  //std::cout<<" out... Bytes To End.... = "<<dec<<bytesToEnd<<std::endl;
167  //std::cout<<" out... Processed Event = "<<dec<<processedEvent_<<std::endl;
168  //std::cout<<" out... Event Length = "<<dec<<eventLength<<std::endl;
169  //std::cout<<" out... LastWord = 0x"<<hex<<*(myPointer+eventLength*2-1)<<std::endl;
170 
171  if (parseInternalData_) {
172  //build a new event block from buffer
173  DCCTBEventBlock *myBlock =
174  new DCCTBEventBlock(this, myPointer, eventLength * 8, eventLength * 2 - 1, wordIndex, 0);
175 
176  //add event to dccEvents vector
177  dccEvents_.push_back(myBlock);
178  }
179 
180  //build the event pointer with error mask and add it to the events vector
181  std::pair<const uint32_t *, uint32_t> eventPointer(myPointer, eventLength);
182  std::pair<uint32_t, std::pair<const uint32_t *, uint32_t> > eventPointerWithErrorMask(errorMask, eventPointer);
183  events_.push_back(eventPointerWithErrorMask);
184 
185  //update processed buffer size
186  processedEvent_++;
187  processedBytes += eventLength * 8;
188  //std::cout << std::endl << "Processed Bytes = " << dec << processedBytes << std::endl;
189 
190  //go to next event
191  myPointer += eventLength * 2;
192  wordIndex += eventLength * 2;
193  }
194 }
std::vector< DCCTBEventBlock * > dccEvents_
void resetErrorCounters()
std::string getDecString(uint32_t data)
const uint32_t * buffer_
uint32_t processedEvent_
std::pair< uint32_t, uint32_t > checkEventLength(const uint32_t *pointerToEvent, uint32_t bytesToEnd, bool singleEvent=false)
std::vector< std::pair< uint32_t, std::pair< const uint32_t *, uint32_t > > > events_
std::string eventErrors_

◆ parseFile()

void DCCTBDataParser::parseFile ( std::string  fileName,
bool  singleEvent = false 
)

Parse data from file

Definition at line 57 of file DCCDataParser.cc.

References bufferSize_, MillePedeFileConverter_cfg::fileName, mps_fire::i, makeListRunsInFiles::inputFile, makeListRunsInFiles::myData, parseBuffer(), resetErrorCounters(), and AlCaHLTBitMon_QueryRunRegistry::string.

57  {
58  std::ifstream inputFile; //open file as input
59  inputFile.open(fileName.c_str());
60 
61  resetErrorCounters(); //reset error counters
62 
63  //for debug purposes
64  //std::cout << "Now in DCCTBDataParser::parseFile " << std::endl;
65 
66  //if file opened correctly read data to a buffer and parse it
67  //else throw an exception
68  if (!inputFile.fail()) {
69  std::string myWord; //word read from line
70  std::vector<std::string> dataVector; //data vector
71 
72  //until the end of file read each line as a string and add it to the data vector
73  while (inputFile >> myWord) {
74  dataVector.push_back(myWord);
75  }
76 
77  bufferSize_ = (dataVector.size()) * 4; //buffer size in bytes (note:each char is an hex number)
78 
79  uint32_t *myData = new uint32_t[dataVector.size()]; //allocate memory for a new data buffer
80  uint32_t *const myDataBeginning = myData; //pointer that stays at the beginning of the allocated memory
81 
82  //fill buffer data with data from file lines
83  for (uint32_t i = 1; i <= dataVector.size(); i++, myData++) {
84  sscanf((dataVector[i - 1]).c_str(), "%x", myData);
85 
86  //for debug purposes
87  //std::cout << std::endl << "Data position: " << dec << i << " val = " << getHexString(*myData);
88  }
89 
90  inputFile.close(); //close file
91 
92  parseBuffer(myData, bufferSize_, singleEvent); //parse data from the newly filled myData
93  delete[] myDataBeginning;
94  } else {
95  std::string errorMessage = std::string(" Error::Unable to open file :") + fileName;
96  throw ECALTBParserException(errorMessage);
97  }
98 }
void resetErrorCounters()
uint32_t bufferSize_
void parseBuffer(const uint32_t *buffer, uint32_t bufferSize, bool singleEvent=false)

◆ parserParameters()

std::vector< uint32_t > DCCTBDataParser::parserParameters ( )
inline

Get methods for parser parameters;

Definition at line 174 of file DCCDataParser.h.

References parameters.

174 { return parameters; }
std::vector< uint32_t > parameters

◆ resetErrorCounters()

void DCCTBDataParser::resetErrorCounters ( )

Reset Error Counters

Definition at line 18 of file DCCDataParser.cc.

References errors_.

Referenced by DCCTBDataParser(), parseBuffer(), and parseFile().

18  {
19  //set error counters to 0
20  errors_["DCC::BOE"] = 0; //begin of event (header B[60-63])
21  errors_["DCC::EOE"] = 0; //end of event (trailer B[60-63])
22  errors_["DCC::EVENT LENGTH"] = 0; //event length (trailer B[32-55])
23 }
std::map< std::string, uint32_t > errors_

◆ setParameters()

void DCCTBDataParser::setParameters ( const std::vector< uint32_t > &  newParameters)
inline

Set method for parser parameters

Definition at line 186 of file DCCDataParser.h.

References computeBlockSizes(), and parameters.

186  {
187  parameters = newParameters;
189 }
void computeBlockSizes()
std::vector< uint32_t > parameters

◆ srpBlockSize()

uint32_t DCCTBDataParser::srpBlockSize ( )
inline

Get methods for block sizes

Definition at line 191 of file DCCDataParser.h.

References srpBlockSize_.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

191 { return srpBlockSize_; }
uint32_t srpBlockSize_

◆ srpId()

uint32_t DCCTBDataParser::srpId ( )
inline

Definition at line 180 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBSRPBlock::dataCheck().

180 { return parameters[5]; }
std::vector< uint32_t > parameters

◆ tcc1Id()

uint32_t DCCTBDataParser::tcc1Id ( )
inline

Definition at line 181 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

181 { return parameters[6]; }
std::vector< uint32_t > parameters

◆ tcc2Id()

uint32_t DCCTBDataParser::tcc2Id ( )
inline

Definition at line 182 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

182 { return parameters[7]; }
std::vector< uint32_t > parameters

◆ tcc3Id()

uint32_t DCCTBDataParser::tcc3Id ( )
inline

Definition at line 183 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

183 { return parameters[8]; }
std::vector< uint32_t > parameters

◆ tcc4Id()

uint32_t DCCTBDataParser::tcc4Id ( )
inline

Definition at line 184 of file DCCDataParser.h.

References parameters.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

184 { return parameters[9]; }
std::vector< uint32_t > parameters

◆ tccBlockSize()

uint32_t DCCTBDataParser::tccBlockSize ( )
inline

Definition at line 192 of file DCCDataParser.h.

References tccBlockSize_.

Referenced by DCCTBEventBlock::DCCTBEventBlock().

192 { return tccBlockSize_; }
uint32_t tccBlockSize_

Member Data Documentation

◆ buffer_

const uint32_t* DCCTBDataParser::buffer_
protected

Definition at line 139 of file DCCDataParser.h.

Referenced by getBuffer(), and parseBuffer().

◆ bufferSize_

uint32_t DCCTBDataParser::bufferSize_
protected

Definition at line 140 of file DCCDataParser.h.

Referenced by parseFile().

◆ dccEvents_

std::vector<DCCTBEventBlock *> DCCTBDataParser::dccEvents_
protected

Definition at line 149 of file DCCDataParser.h.

Referenced by dccEvents(), parseBuffer(), and ~DCCTBDataParser().

◆ debug_

bool DCCTBDataParser::debug_
protected

Definition at line 155 of file DCCDataParser.h.

Referenced by debug().

◆ errors_

std::map<std::string, uint32_t> DCCTBDataParser::errors_
protected

Definition at line 156 of file DCCDataParser.h.

Referenced by checkEventLength(), errorCounters(), and resetErrorCounters().

◆ eventErrors_

std::string DCCTBDataParser::eventErrors_
protected

Definition at line 146 of file DCCDataParser.h.

Referenced by parseBuffer().

◆ events_

std::vector<std::pair<uint32_t, std::pair<const uint32_t *, uint32_t> > > DCCTBDataParser::events_
protected

Definition at line 152 of file DCCDataParser.h.

Referenced by checkEventLength(), events(), and parseBuffer().

◆ mapper_

DCCTBDataMapper* DCCTBDataParser::mapper_
protected

Definition at line 147 of file DCCDataParser.h.

Referenced by DCCTBDataParser(), mapper(), and ~DCCTBDataParser().

◆ parameters

std::vector<uint32_t> DCCTBDataParser::parameters
protected

◆ parseInternalData_

bool DCCTBDataParser::parseInternalData_
protected

Definition at line 154 of file DCCDataParser.h.

Referenced by parseBuffer().

◆ processedEvent_

uint32_t DCCTBDataParser::processedEvent_
protected

Definition at line 145 of file DCCDataParser.h.

Referenced by parseBuffer().

◆ srpBlockSize_

uint32_t DCCTBDataParser::srpBlockSize_
protected

Definition at line 142 of file DCCDataParser.h.

Referenced by computeBlockSizes(), and srpBlockSize().

◆ tccBlockSize_

uint32_t DCCTBDataParser::tccBlockSize_
protected

Definition at line 143 of file DCCDataParser.h.

Referenced by computeBlockSizes(), and tccBlockSize().