1 #ifndef UTIL_BitField64_H
2 #define UTIL_BitField64_H 1
66 unsigned offset,
int signedWidth ) ;
142 for(
unsigned i=0;i<
_fields.size();i++){
181 return *
_fields.at( theIndex ) ;
187 return *
_fields.at( theIndex ) ;
BitFieldValue & operator=(lcio::long64 in)
Assignment operator for user convenience.
LCTokenizer(std::vector< std::string > &tokens, char del)
Only c'tor, give (empty) token vector and delimeter character.
unsigned highestBit() const
Highest bit used in fields [0-63].
std::ostream & operator<<(std::ostream &os, const BitField64 &b)
Operator for dumping BitField64 to streams.
unsigned width() const
The field's width.
unsigned long long ulong64
64 bit unsigned integer,e.g.to be used for masks
std::vector< std::string > & _tokens
std::vector< BitFieldValue * > _fields
bool isSigned() const
True if field is interpreted as signed.
BitFieldValue(lcio::long64 &bitfield, const std::string &name, unsigned offset, int signedWidth)
The default c'tor.
std::string fieldDescription() const
Return a valid description string of all fields.
size_t index(const std::string &name) const
Index for field named 'name'.
A bit field of 64bits that allows convenient declaration and manipulation of sub fields of various wi...
Helper class for BitField64 that corresponds to one field value.
lcio::ulong64 mask() const
The field's mask.
std::string valueString() const
Return a string with a comma separated list of the current sub field values.
const std::string & name() const
fg: removed because it causes ambiguities with operator lcio::long64().
BitFieldValue & operator[](size_t theIndex)
Acces to field through index.
BitFieldValue & operator[](const std::string &name)
Access to field through name .
lcio::long64 value() const
Returns the current field value.
BitField64(const std::string &initString)
The c'tor takes an initialization string of the form: <fieldDesc>[,<fieldDesc>...] fieldDesc = name:[start]:[-]length where: name: The name of the field start: The start bit of the field.
void addField(const std::string &name, unsigned offset, int width)
Add an additional field to the list.
void operator()(const char &c)
Operator for use with algorithms, e.g.
friend std::ostream & operator<<(std::ostream &os, const BitField64 &b)
Operator for dumping BitField64 to streams.
unsigned offset() const
The field's offset.
unsigned highWord() const
The high word, bits 32-63.
std::map< std::string, unsigned int > IndexMap
void reset()
Reset - same as setValue(0) - useful if the same encoder is used for many objects.
void setValue(lcio::long64 value)
Set a new 64bit value.
lcio::long64 getValue() const
Returns the current 64bit value.
Helper class for string tokenization.
BitField64()
No default c'tor.
unsigned lowWord() const
The low word, bits 0-31.
size_t size() const
Number of values.
const BitFieldValue & operator[](const std::string &name) const
Const Access to field through name .
void init(const std::string &initString)
Decode the initialization string as described in the constructor.
const BitFieldValue & operator[](size_t theIndex) const
Const acces to field through index.