#include <iostream>
#include <typeinfo>
#include "EventFilter/CSCRawToDigi/src/bitset_append.h"
Go to the source code of this file.
Functions | |
template<class T > | |
bool | cscClassPackerCompare (T &t) |
template<class T > | |
T | cscPackAndUnpack (T &t) |
template<class T > | |
bool | cscPackerCompare (const T &t1, const T &t2) |
bool cscClassPackerCompare | ( | T & | t | ) |
Definition at line 33 of file cscPackerCompare.h.
References bitset_utilities::bitsetToChar(), benchmark_cfg::cerr, runTheMatrix::data, mergeVDriftHistosByStation::name, bitset_utilities::printWords(), and matplotRender::t.
Referenced by CSCTMBData::selfTest().
{ boost::dynamic_bitset<> firstPack = t.pack(); unsigned char data[1000]; bitset_utilities::bitsetToChar(firstPack, data); T newObject((unsigned short int *)data); boost::dynamic_bitset<> secondPack = newObject.pack(); if(firstPack != secondPack) { std::cerr << "Mismatch in " << typeid(t).name() << "\n"; bitset_utilities::printWords(firstPack); bitset_utilities::printWords(secondPack); return false; } return true; }
Definition at line 22 of file cscPackerCompare.h.
References bitset_utilities::bitsetToChar(), and runTheMatrix::data.
Referenced by CSCEventData::selfTest().
{ boost::dynamic_bitset<> firstPack = t.pack(); unsigned char data[10000]; bitset_utilities::bitsetToChar(firstPack, data); return T((unsigned short int *)data); }
Compares two objects, and prints them out if they differ
Definition at line 10 of file cscPackerCompare.h.
References benchmark_cfg::cerr, and query::result.
Referenced by CSCTMBHeader::selfTest(), and CSCEventData::selfTest().