81 auto bits =
static_cast<UChar_t>(enum_bits);
83 Error(
"TestFeature",
"A feature is being cleared that is not supported.");
93 std::string retval =
"unknown";
101 if (eUnsupportedIOBits ==
nullptr) {
106 if (constant->GetValue() == flag) {
140 auto bits =
static_cast<UChar_t>(enum_bits);
144 Error(
"SetFeature",
"A feature was request (%s) but this feature is no longer supported.",
147 Error(
"SetFeature",
"An unknown feature was requested (flag=%s); cannot enable it.",
148 std::bitset<32>(unsupported).to_string().c_str());
174 Error(
"Set",
"Could not retrieve TBasket's class");
178 if (eIOBits ==
nullptr) {
179 Error(
"Set",
"Could not locate TBasket::EIOBits enum");
183 if (!strcmp(constant->GetName(), value.c_str())) {
187 Error(
"Set",
"Could not locate %s in TBasket::EIOBits", value.c_str());
199 Error(
"Print",
"Could not retrieve TBasket's class");
203 if (eIOBits ==
nullptr) {
204 Error(
"Print",
"Could not locate TBasket::EIOBits enum");
207 std::stringstream ss;
208 bool hasFeatures =
false;
209 ss <<
"TIOFeatures{";
211 if ((constant->GetValue() &
fIOBits) == constant->GetValue()) {
212 ss << (hasFeatures ?
", " :
"") << constant->GetName();
217 Printf(
"%s", ss.str().c_str());
240 auto bits =
static_cast<UChar_t>(enum_bits);
242 Error(
"TestFeature",
"A feature is being tested for that is not supported or known.");
245 return (
fIOBits & bits) == bits;
#define R__unlikely(expr)
void Error(const char *location, const char *msgfmt,...)
static std::string GetUnsupportedName(TBasket::EUnsupportedIOBits enum_flag)
void Printf(const char *fmt,...)
TRangeStaticCast is an adaptater class that allows the typed iteration through a TCollection.
UChar_t GetFeatures() const
void Print() const
Print a human-readable representation of the TIOFeatures to stdout.
bool Set(EIOFeatures bits)
Set a specific IO feature.
bool Test(EIOFeatures bits) const
Test to see if a given feature is set.
void Clear(EIOFeatures bits)
Clear a specific IO feature from this set.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfEnums(Bool_t load=kTRUE)
Return a list containing the TEnums of a class.
The TEnum class implements the enum type.
const TSeqCollection * GetConstants() const
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual const char * GetName() const
Returns name of object.
Namespace for new ROOT classes and functions.