19 #ifndef __MRFDATA_8b_H__ 20 #define __MRFDATA_8b_H__ 30 #include <boost/archive/archive_exception.hpp> 31 #include <boost/serialization/access.hpp> 32 #include <boost/serialization/base_object.hpp> 33 #include <boost/serialization/vector.hpp> 51 TMrfData_8b(UInt_t _reglengthbits, UInt_t _reglengthwords, UInt_t _lastreglengthbits, std::vector<UChar_t> _regdata);
61 void setNumBits(
const UInt_t &length);
67 const UInt_t &getNumBits()
const;
73 void setNumWords(
const UInt_t &length);
79 const UInt_t &getNumWords()
const;
86 void setBit(
const UInt_t &position,
const bool &state);
93 bool getBit(
const UInt_t &position)
const;
100 const UInt_t &appendBit(
const bool &state);
112 void setWord(
const UInt_t &position,
const UChar_t &dataword,
const bool &truncate_ok =
false);
125 void setWordMasked(
const UInt_t &position,
const UChar_t &dataword,
const UChar_t &mask = ~0,
const bool &truncate_ok =
false);
132 const UChar_t &getWord(
const UInt_t &position)
const;
134 const UChar_t &appendWord(
const UChar_t &dataword);
144 void setBitBlock(
const UInt_t &position,
const UInt_t &length,
const UChar_t &value,
const UInt_t &offset = 0,
const bool &reverse =
false);
146 const UInt_t &getBitBlock(
const UInt_t &position,
const UInt_t &length,
const UInt_t &offset = 0,
const bool &reverse =
false)
const;
156 UInt_t bitInBlock(
const UInt_t &position)
const;
165 void clearDataStream();
168 bool sameDataStream(
const TMrfData_8b &other)
const;
175 void importBinString(
const std::string &data,
const UInt_t &offset = 0);
188 const std::string &exportBinString()
const;
197 void resample(
const UInt_t &offset,
const UInt_t &factor,
const bool &reverse =
false,
const UInt_t &cutoff = 0);
209 const UInt_t &getLastError()
const;
215 bool lastActionSuccessful()
const;
220 static const UInt_t zeroval = 0;
226 friend class boost::serialization::access;
228 template <
class Archive>
233 ar &lastreglengthbits;
245 static const UInt_t bitsinablock =
sizeof(UChar_t) * CHAR_BIT;
255 #endif // __MRFDATA_8b_H__ static const UInt_t not_found
static const UInt_t out_of_bounds
static const UInt_t success
Base interface class for data storage and manipulation. Compatible with IO classes from MRF Suite...
std::vector< UChar_t > regdata
Internal storage for data structure.
void serialize(Archive &ar, const unsigned int)
Error flags set by TMrfData_8b functions.
static const UInt_t size_mismatch
UInt_t errcode
Internal error code.