CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DaqData.h
Go to the documentation of this file.
1 #ifndef FEDRawData_DaqData_h
2 #define FEDRawData_DaqData_h
3 
49 #include <typeinfo>
50 #include <vector>
51 #include <map>
52 #include <string>
53 #include <cmath>
54 
55 template <class Format>
56 class DaqData {
57 
58  public:
59 
60  DaqData(std::vector<unsigned int> & v) : size_(0), buffer_(0), nobjects_(0) {
61 
62  try {
63 
64  if (v.size() == 0) throw string("DaqData: empty input data vector provided: ");
65 
66  int Nfields = Format::getNumberOfFields();
67  if (v.size()%Nfields != 0) throw string("DaqData: ERROR. You must provide a number of input values compatibles with the requested format: ");
68 
69 
70  int ObjSize = Format::getFieldLastBit(Nfields-1)+1;
71  nobjects_ = v.size()/Nfields;
72  // cout<<"Going to create "<<nobjects_<< " objects of type "<<typeid(Format).name()<<endl;
73 
74 
75  size_ = (int) ceil(((double)(ObjSize*nobjects_))/8);
76  buffer_= new char[size_];
77  // cout<<"The buffer will be "<<size_ <<" bytes long"<<endl;
78 
79  std::vector<unsigned int>::iterator vit = v.begin();
80  char * p = buffer_;
81  int bitsalreadyfilled = 0;
82 
83  int Totbytes=1;
84 
85  for(int i=0; i<nobjects_; i++) {
86 
87  //additional bytes necessary to accomodate the current object
88  int Nbytes = (int) ceil((double)(Format::getFieldLastBit(Nfields-1)+1-8+bitsalreadyfilled)/8);
89 
90  if ((Totbytes+=Nbytes) > size_) throw string("Exceeded allocated buffer size");
91 
92  compressObject(p, vit, bitsalreadyfilled);
93 
94  // cout<<"Successfully compressed object "<< i <<endl;
95 
96  data_.insert(std::pair< int, std::vector<unsigned int> >(i,std::vector<unsigned int>(vit-Nfields,vit) ));
97 
98  //the second term is necessary in the case the last byte has been fully used
99  p+=(Nbytes+(8-bitsalreadyfilled)/8) ;
100  Totbytes+=(8-bitsalreadyfilled)/8 ;
101  }
102  if(bitsalreadyfilled==0) Totbytes--;
103 
104  /*
105  cout << "Compression successful. "<< Totbytes<<" bytes compressed in total"<< endl;
106  cout<< "Buffer pointer: "<<hex<< buffer_<< dec << "Size of buffer= "<< size_<<endl;
107  for(int i=0; i<nobjects_; i++) {
108  cout << "Object # "<< i << " fields: " <<endl;
109  for(int j=0; j<Format::getNumberOfFields(); j++) cout << getValue(j,i) <<endl;
110  }
111  */
112 
113  }
114 
115  catch (std::string s){
116 
117  cout<<"DaqData - Exception caught: " << s <<endl;
118  cout<<"Object compression failed! No data has been constructed for format: "<< string(typeid(Format).name())<<endl;
119 
120  }
121 
122  }
123 
124 
125  DaqData(const unsigned char * ptr,
126  int sizeinbytes) : size_(0), buffer_(0), nobjects_(0) {
127 
128 
129  try {
130 
131  if (sizeinbytes==0) throw std::string("Buffer size is zero");
132 
133  int Nfields = Format::getNumberOfFields();
134  int ObjSize = Format::getFieldLastBit(Nfields-1)+1;
135  nobjects_ = (sizeinbytes*8)/ObjSize;
136 
137  // cout<<"Going to create "<<nobjects_<< " objects of type "<<typeid(Format).name()<<endl;
138  // cout<<"The buffer will be "<<size_ <<" bytes long"<<endl;
139 
140  if ((sizeinbytes*8)%ObjSize != 0) {
141  cout<<"DaqData: there will be " << (sizeinbytes*8)%ObjSize <<" meaningless bits at the end of the buffer"<<endl;
142  }
143 
144  // buffer_ = new char[sizeinbytes];
145  // memmove(buffer_,ptr,sizeinbytes);
146 
147  // char * p = buffer_;
148 
149  const unsigned char * p = ptr;
150  int bitsalreadyfilled = 0;
151 
152  int Totbytes=1;
153 
154  for(int i=0; i<nobjects_; i++) {
155 
156  std::vector<unsigned int> objdata;
157  objdata.reserve(Nfields);
158 
159  //additional bytes necessary to accomodate the current object
160  int Nbytes = (int) ceil((double)(Format::getFieldLastBit(Nfields-1)+1-8+bitsalreadyfilled)/8);
161 
162 
163  if ((Totbytes+=Nbytes) > sizeinbytes) throw std::string("Exceeded allocated buffer size");
164 
165 
166  uncompressObject(p, objdata, bitsalreadyfilled);
167 
168  // cout<<"Successfully uncompressed object "<< i <<endl;
169  data_.insert(std::pair< int, std::vector<unsigned int> >(i,objdata) );
170 
171  //the second term is necessary in the case the last byte has been fully used
172  p+= (Nbytes + (8-bitsalreadyfilled)/8);
173  Totbytes+= (8-bitsalreadyfilled)/8;
174 
175  }
176 
177  if(bitsalreadyfilled==0) Totbytes--;
178 
179  /*
180  cout << "Uncompression succeeded. "<< Totbytes<<" bytes uncompressed in total"<< endl;
181  cout<< "Buffer pointer: "<<hex<< buffer_<< dec<< "Size of buffer= "<< size_<<endl;
182 
183  for(int i=0; i<nobjects_; i++) {
184  cout << "Object # "<< i << " fields: " <<endl;
185  for(int j=0; j<Format::getNumberOfFields(); j++) cout << getValue(j,i) <<endl;
186  }
187  */
188 
189  }
190  catch (std::string s){
191 
192  std::cout<<"DaqData - Exception caught: " << s <<std::endl;
193  std::cout<<"Object uncompression failed! No data has been constructed for format: "<<std::string(typeid(Format).name())<<endl;
194 
195  }
196 
197  }
198 
199 
200  DaqData(const DaqData & a) {
201 
202  size_ = a.Size();
203  buffer_ = new char[size_];
204  memmove(buffer_,a.Buffer(),size_);
205  nobjects_ = a.Nobjects();
206 
207  for(int i=0; i<nobjects_; i++) {
208  std::vector<unsigned int> vec;
209  for(int j=0; j<Format::getNumberOfFields(); j++) vec.push_back(a.getValue(j,i));
210  data_.insert(std::pair< int, std::vector<unsigned int> >(i, vec));
211  }
212 
213  }
214 
215 
217 
218  // cout<<"Deleting DaqData of type "<<typeid(Format).name()<<endl;
219  if (buffer_!=0) delete [] buffer_;
220 
221  };
222 
223 
224  char * Buffer() const {return buffer_;}
225 
226  int Size() const {return size_;}
227 
228  int Nobjects() const {
229  return nobjects_;
230  /* cout<<"Nobjects()"<<endl;
231  int Nfields = Format::getNumberOfFields();
232  return size_/(Format::getFieldLastBit(Nfields-1)+1);
233  */
234  }
235 
236  unsigned int getValue(int indfield, int indobj=0) const {
237 
238  if (indobj<nobjects_ && indfield < Format::getNumberOfFields()) {
239  std::map < int, std::vector<unsigned int> >::const_iterator it = data_.find(indobj);
240  if (it != data_.end()) return ((*it).second)[indfield];
241  else {
242  cout<<"DaqData - Strange: object should exist but was not found "<<endl;
243  return 0;
244  }
245  }
246  else cout<<"DaqData - Non existent field or object"<<endl;
247  return 0;
248 
249  }
250 
251  private:
252 
253  void uncompressObject(const unsigned char * ptr,
254  std::vector<unsigned int> & objdata,
255  int & bitsalreadyfilled) {
256 
257  int Nfields = Format::getNumberOfFields();
258 
259  int bitstoaccomodate=Format::getFieldLastBit(0)+1; // of current field
260 
261  int ifield = 0;
262  unsigned int value = 0;
263 
264  while (ifield < Nfields) {
265 
266  if(bitstoaccomodate > 8 - bitsalreadyfilled ) {
267 
268  // cout<<"can't complete value from current byte"<<endl;
269  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
270 
271  //1)The syntax below could be faster.
272  // To be checked as soon as time available(check started with prog test4.C) .
273  //2)check if all cast to unsigned int are really necessary(done, they are not).
274  //3)Instead of using pow(2,1;2;3;4;5..), a faster enum could be used
275  //Lower all bits but those not yet read
276  //value += ( (*ptr & ((unsigned int)pow(2.,8-bitsalreadyfilled)-1)) << bitstoaccomodate + bitsalreadyfilled - 8 ) ;
277  // if(bitstoaccomodate > 8) value += ( ((((unsigned int)(*ptr)) << bitsalreadyfilled) & 0xff) << (bitstoaccomodate - 8) );
278  // else value += ( ((((unsigned int)(*ptr)) << bitsalreadyfilled) & 0xff) >> (8 - bitstoaccomodate) );
279 
280 
281  if(bitstoaccomodate > 8) value += ( ( (*ptr << bitsalreadyfilled) & 0xff ) << (bitstoaccomodate - 8) );
282  else value += ( ( (*ptr << bitsalreadyfilled) & 0xff) >> (8 - bitstoaccomodate) );
283 
284 
285  // cout<< "value: "<< hex << value << " - " << dec << value<< endl;
286  // cout<< "byte: "<< hex << (unsigned int)(*ptr) << " - " << dec << (unsigned int)(*ptr) << endl;
287 
288 
289  ptr++;
290  bitstoaccomodate -= (8-bitsalreadyfilled);
291  bitsalreadyfilled = 0;
292 
293  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
294 
295  }
296 
297  else if(bitstoaccomodate < (8 - bitsalreadyfilled) && bitstoaccomodate >0){
298  // cout<<"value can be completed from current byte, which still contain info"<<endl;
299 
300  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
301 
302  //1)The syntax below could be faster.
303  // To be checked as soon as time available.
304  //2)check if all cast to unsigned int are really necessary.
305  //3)Instead of using pow(2,1;2;3;4;5..), a faster enum could be used
306  //Lower all bits but those not yet read
307  //value += (*ptr & ((unsigned int)pow(2.,8-bitsalreadyfilled)-1)) >> (8 - bitstoaccomodate - bitsalreadyfilled);
308 
309  value += ( ( (*ptr << bitsalreadyfilled) & 0xff ) >> (8 - bitstoaccomodate) ) ;
310 
311  // cout<< "value: "<< hex << value << " - " << dec << value<< endl;
312  // cout<< "byte: "<< hex << (unsigned int)(*ptr) << " - " << dec << (unsigned int)(*ptr) << endl;
313 
314 
315  objdata.push_back(value);
316  value = 0;
317  bitsalreadyfilled+=bitstoaccomodate;
318 
319  // cout<<"Field completed"<<endl;
320 
321  if(ifield==Nfields-1) return;
322 
323  // cout<<"Uncompressing new Field"<<endl;
324 
325  ifield++;
326  bitstoaccomodate=Format::getFieldLastBit(ifield)-Format::getFieldLastBit(ifield-1);
327 
328  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
329 
330  }
331 
332  else if(bitstoaccomodate == (8 - bitsalreadyfilled) && bitstoaccomodate >0){
333  // cout<<"value can be completed from what left in current byte"<<endl;
334  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
335 
336  //1)The syntax below could be faster.
337  // To be checked as soon as time available.
338  //2)check if all cast to unsigned int are really necessary.
339  //3)Instead of using pow(2,1;2;3;4;5..), a faster enum could be used
340  //Lower all bits but those not yet read
341  // value += *ptr & ((unsigned int)pow(2.,8-bitsalreadyfilled)-1);
342 
343  value += ( ( (*ptr << bitsalreadyfilled) & 0xff ) >> (8 - bitstoaccomodate) ) ;
344 
345  // cout<< "value: "<< hex << value << " - " << dec << value<< endl;
346  // cout<< "byte: "<< hex << (unsigned int)(*ptr) << " - " << dec << (unsigned int)(*ptr) << endl;
347 
348 
349  objdata.push_back(value);
350  value = 0;
351  bitsalreadyfilled=0;
352 
353  // cout<<"Field completed"<<endl;
354 
355  if(ifield==Nfields-1) return;
356 
357  // cout<<"Uncompressing new Field"<<endl;
358 
359  ptr++;
360  ifield++;
361  bitstoaccomodate=Format::getFieldLastBit(ifield)-Format::getFieldLastBit(ifield-1);
362 
363  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
364 
365  }
366  else throw std::string(" unexpected situation during uncompression");
367 
368  } //end of cycle over fields
369 
370  }
371 
372 
373 
374 
375  void compressObject(const unsigned char * ptr, std::vector<unsigned int>::iterator & vit, int & bitsalreadyfilled) {
376 
377  int Nfields = Format::getNumberOfFields();
378 
379  int bitstoaccomodate=Format::getFieldLastBit(0)+1; // of current field
380 
381  if (*vit > pow(2.,bitstoaccomodate)-1) throw string("The value is too large to fit in the field ");
382 
383  int ifield = 0;
384 
385  //Lower all bits but those already filled
386  *ptr &= 0xff + 1 - (unsigned int)pow(2.,8-bitsalreadyfilled);
387 
388  while (ifield < Nfields) {
389 
390 
391  if(bitstoaccomodate > 8 - bitsalreadyfilled ) {
392 
393  // cout<<"Field cannot be compressed from what left in current byte"<<endl;
394  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
395 
396  *ptr += (((*vit) >> (bitstoaccomodate - (8 - bitsalreadyfilled))) & 0xff);
397  // cout<< "value: "<< hex << *vit <<" - " << dec << *vit<< endl;
398  // cout<< "byte: "<< hex << (unsigned int)(*ptr) <<" - "<< dec << (unsigned int)(*ptr) << endl;
399 
400 
401  bitstoaccomodate -= (8-bitsalreadyfilled);
402  bitsalreadyfilled = 0;
403  ptr++;
404  *ptr &= 0xff + 1 - (unsigned int)pow(2.,8-bitsalreadyfilled);
405 
406  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
407 
408  }
409 
410  else if(bitstoaccomodate < (8 - bitsalreadyfilled) && bitstoaccomodate >0){
411 
412  // cout<<"Field can be compressed in the current byte, which will not be completely filled"<<endl;
413 
414  *ptr += ( (((*vit) << 8-bitstoaccomodate) & 0xff) >> (bitsalreadyfilled) );
415 
416  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
417  // cout<< "value: "<< hex << *vit <<" - " << dec << *vit<< endl;
418  // cout<< "byte: "<< hex << (unsigned int)(*ptr) <<" - "<< dec << (unsigned int)(*ptr) << endl;
419 
420  vit++;
421  bitsalreadyfilled+=bitstoaccomodate;
422 
423  // cout<<"Field completed"<<endl;
424 
425  if(ifield==Nfields-1) return;
426 
427  // cout<<"Compressing new Field"<<endl;
428 
429  ifield++;
430  bitstoaccomodate=Format::getFieldLastBit(ifield)-Format::getFieldLastBit(ifield-1);
431  if (*vit > pow(2.,bitstoaccomodate)-1) throw string("The value is too large to fit in the field ");
432 
433  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
434 
435  }
436 
437  else if(bitstoaccomodate == (8 - bitsalreadyfilled) && bitstoaccomodate >0){
438 
439  // cout<<"Field can be compressed in the current byte, which will be completely filled"<<endl;
440 
441 
442  *ptr += ( (((*vit) << 8-bitstoaccomodate) & 0xff) >> (bitsalreadyfilled) );
443 
444  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
445  // cout<< "value: "<< hex << *vit <<" - " << dec << *vit<< endl;
446  // cout<< "byte: "<< hex << (unsigned int)(*ptr) <<" - "<< dec << (unsigned int)(*ptr) << endl;
447 
448  vit++;
449  bitsalreadyfilled=0;
450 
451  // cout<<"Field completed"<<endl;
452 
453  if(ifield==Nfields-1) return;
454 
455  // cout<<"Compressing new Field"<<endl;
456 
457  ptr++;
458  *ptr &= 0xff + 1 - (unsigned int)pow(2.,8-bitsalreadyfilled);
459 
460  ifield++;
461  bitstoaccomodate=Format::getFieldLastBit(ifield)-Format::getFieldLastBit(ifield-1);
462 
463  if (*vit > pow(2.,bitstoaccomodate)-1) throw string("The value is too large to fit in the field ");
464 
465  // cout <<"bitstoaccomodate= "<<bitstoaccomodate<<" bitsalreadyfilled= "<<bitsalreadyfilled<<" ifield="<< ifield<<" Nfields="<<Nfields<<endl;
466 
467  }
468  else throw string(" unexpected situation during compression");
469 
470  } //end of cycle over fields
471 
472  }
473 
474 
475  private:
476 
477  std::map < int, std::vector<unsigned int> > data_;
478 
479  int size_;
480  unsigned char * buffer_;
482 
483  /* Old implementation of compress
484 
485  //assumes a correct number of objects has been sent. Alignment to the byte
486  int compressObject(unsigned char * p, vector<unsigned int>::iterator & vit, int & bitsalreadyfilled){
487 
488  int Nfields = Format::getNumberOfFields();
489  int Nbytes = (int) (ceil((double)(Format::getFieldLastBit(Nfields-1)+1)/8));
490 
491  unsigned int indfield=0; // index of current field
492  unsigned int bitstoaccomodate=Format::getFieldLastBit(indfield)+1; // of current field
493 
494  //Here there should be a check on the size of the first value against the available bits
495 
496  for (int ibyte = 0; ibyte < Nbytes ; ibyte++){
497 
498  // int bitsalreadyfilled = 0; // of current byte
499 
500  if(bitstoaccomodate>8-bitsalreadyfilled) {
501  cout<<"More than available bits to accomodate"<<endl;
502 
503  *p = ( (*vit) >> (bitstoaccomodate - 8) ) & 0xff;
504  cout<< "value: "<< hex << *vit << dec << *vit<< endl;
505  cout<< "byte: "<< hex << *p << dec << *p << endl;
506 
507  bitstoaccomodate -= 8;
508  p++;
509  bitsalreadyfilled = 0;
510  }
511 
512  else if(bitstoaccomodate<=8-bitsalreadyfilled && bitstoaccomodate>0){
513 
514  cout<<"bits to accomodate less than available"<<endl;
515 
516  unsigned int bytevalue=0;
517 
518  // First, put the bits of the current object in the current byte
519 
520  bytevalue += ( (*vit) << ( 8 - bitstoaccomodate ) ) & 0xff;
521  cout<< "value: "<< hex << *vit << dec << *vit<< endl;
522  cout<< "byte: "<< hex << bytevalue << dec << bytevalue << endl;
523 
524 
525  bitsalreadyfilled = bitstoaccomodate;
526  indfield++;
527 
528  if (indfield>=Nfields) return 0;
529 
530  vit++;
531 
532  //Here there should be a check on the size of the current value against the left available bits
533 
534  if(bitsalreadyfilled==8) {
535  bitstoaccomodate=Format::getFieldLastBit(indfield)-Format::getFieldLastBit(indfield-1);
536  p++;
537  continue;
538  }
539 
540  //This is the case of remaining fields and space left in the byte
541 
542  //Compute the last field that can be treated for this byte
543  int lastfield=indfield;
544  int ntotbits=bitsalreadyfilled+Format::getFieldLastBit(indfield)-Format::getFieldLastBit(indfield-1);
545  while(ntotbits < 8 && lastfield<Nfields ) {
546  lastfield++;
547  ntotbits+=Format::getFieldLastBit(lastfield)-Format::getFieldLastBit(lastfield-1);
548  }
549 
550  // First, fit fields, if there are, that for sure fully fit into the current byte leaving at least one free bit
551  for(; indfield < lastfield ; indfield++) {
552  bitsalreadyfilled += Format::getFieldLastBit(indfield)-Format::getFieldLastBit(indfield-1);
553 
554  bytevalue += ((*vit)<<(8-bitsalreadyfilled)) ;
555  cout<< "value: "<< hex << *vit << dec << *vit<< endl;
556  cout<< "byte: "<< hex << bytevalue << dec << bytevalue << endl;
557 
558  if(indfield<Nfields-1) {
559  vit++;
560  //Here there should be a check on the size of the current value against the left available bits.
561  }
562  else return 0;
563  }
564 
565  //Special treatment of last field having at least some space in the byte. At this point it should always be indfield==lastfield
566 
567  int lastfieldbits=Format::getFieldLastBit(indfield)-Format::getFieldLastBit(indfield-1);
568  bitstoaccomodate = lastfieldbits - (8-bitsalreadyfilled);
569 
570  bytevalue += ((*vit) >> (lastfieldbits - (8-bitsalreadyfilled))) ;
571  cout<< "value: "<< hex << *vit << dec << *vit<< endl;
572  cout<< "byte: "<< hex << bytevalue << dec << bytevalue << endl;
573 
574  *p=bytevalue;
575 
576  //Treatment of the case in which the last field fits too in the current byte
577  if (bitstoaccomodate==0) {
578 
579  if (indfield < Nfields-1) {
580 
581  indfield++;
582  vit++;
583 
584  //Here there should be a check on the size of the current value against the left available bits.
585 
586  bitstoaccomodate=Format::getFieldLastBit(indfield)-Format::getFieldLastBit(indfield-1);
587  }
588  else return 0;
589  }
590  p++;
591  }
592  else{
593  cout<<"DaqData - ERROR: unexpected situation"<<endl;
594  }
595  } //end of cycle over bytes
596 
597  return 0;
598 
599  }
600 
601 */
602 
603 
604 
605 };
606 
607 
608 #endif
int Nobjects() const
Definition: DaqData.h:228
int i
Definition: DBlmapReader.cc:9
int Size() const
Definition: DaqData.h:226
int nobjects_
Definition: DaqData.h:481
int size_
Definition: DaqData.h:479
void uncompressObject(const unsigned char *ptr, std::vector< unsigned int > &objdata, int &bitsalreadyfilled)
Definition: DaqData.h:253
int j
Definition: DBlmapReader.cc:9
char * Buffer() const
Definition: DaqData.h:224
DaqData(const DaqData &a)
Definition: DaqData.h:200
~DaqData()
Definition: DaqData.h:216
std::map< int, std::vector< unsigned int > > data_
Definition: DaqData.h:477
double a
Definition: hdecay.h:121
DaqData(std::vector< unsigned int > &v)
Definition: DaqData.h:60
tuple cout
Definition: gather_cfg.py:121
unsigned char * buffer_
Definition: DaqData.h:480
unsigned int getValue(int indfield, int indobj=0) const
Definition: DaqData.h:236
mathSSE::Vec4< T > v
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void compressObject(const unsigned char *ptr, std::vector< unsigned int >::iterator &vit, int &bitsalreadyfilled)
Definition: DaqData.h:375
DaqData(const unsigned char *ptr, int sizeinbytes)
Definition: DaqData.h:125