7 #ifndef __MRFDATA_8b_H__ 8 #define __MRFDATA_8b_H__ 18 #include <boost/archive/archive_exception.hpp> 19 #include <boost/serialization/access.hpp> 20 #include <boost/serialization/base_object.hpp> 21 #include <boost/serialization/vector.hpp> 39 TMrfData_8b(UInt_t _reglengthbits, UInt_t _reglengthwords, UInt_t _lastreglengthbits, std::vector<UChar_t> _regdata);
49 void setNumBits(
const UInt_t &length);
55 const UInt_t &getNumBits()
const;
61 void setNumWords(
const UInt_t &length);
67 const UInt_t &getNumWords()
const;
74 void setBit(
const UInt_t &position,
const bool &state);
81 bool getBit(
const UInt_t &position)
const;
88 const UInt_t &appendBit(
const bool &state);
100 void setWord(
const UInt_t &position,
const UChar_t &dataword,
const bool &truncate_ok =
false);
113 void setWordMasked(
const UInt_t &position,
const UChar_t &dataword,
const UChar_t &mask = ~0,
const bool &truncate_ok =
false);
120 const UChar_t &getWord(
const UInt_t &position)
const;
122 const UChar_t &appendWord(
const UChar_t &dataword);
132 void setBitBlock(
const UInt_t &position,
const UInt_t &length,
const UChar_t &value,
const UInt_t &offset = 0,
const bool &reverse =
false);
134 const UInt_t &getBitBlock(
const UInt_t &position,
const UInt_t &length,
const UInt_t &offset = 0,
const bool &reverse =
false)
const;
144 UInt_t bitInBlock(
const UInt_t &position)
const;
153 void clearDataStream();
156 bool sameDataStream(
const TMrfData_8b &other)
const;
163 void importBinString(
const std::string &data,
const UInt_t &offset = 0);
176 const std::string &exportBinString()
const;
185 void resample(
const UInt_t &offset,
const UInt_t &factor,
const bool &reverse =
false,
const UInt_t &cutoff = 0);
197 const UInt_t &getLastError()
const;
203 bool lastActionSuccessful()
const;
208 static const UInt_t zeroval = 0;
214 friend class boost::serialization::access;
216 template <
class Archive>
221 ar &lastreglengthbits;
233 static const UInt_t bitsinablock =
sizeof(UChar_t) * CHAR_BIT;
243 #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.