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