TIOFeatures
provides the end-user with the ability to change the IO behavior of data written via a TTree
.
This class allows access to experimental and non-default features.
When one of these features are activated, forward compatibility breaks may occur. That is, older versions of ROOT may not be able to read files written by this version of ROOT that have enabled these non-default features.
To utilize TIOFeatures
, create the object, set the desired feature flags, then attach it to a TTree
. All subsequently created branches (and their baskets) will be serialized using those particular features.
Example usage:
The method TTree::SetIOFeatures
creates a copy of the feature set; subsequent changes to the TIOFeatures
object do not propagate to the TTree
.
Definition at line 69 of file TIOFeatures.hxx.
Public Member Functions | |
TIOFeatures () | |
void | Clear (EIOFeatures bits) |
Clear a specific IO feature from this set. | |
void | Clear (Experimental::EIOFeatures bits) |
Clear a specific IO feature from this set. | |
void | Clear (Experimental::EIOUnsupportedFeatures bits) |
Clear a specific IO feature from this set. | |
void | Print () const |
Print a human-readable representation of the TIOFeatures to stdout. | |
bool | Set (const std::string &) |
Given a IO feature string, set the corresponding feature. | |
bool | Set (EIOFeatures bits) |
Set a specific IO feature. | |
bool | Set (Experimental::EIOFeatures bits) |
Set a specific IO feature. | |
bool | Test (EIOFeatures bits) const |
Test to see if a given feature is set. | |
bool | Test (Experimental::EIOFeatures bits) const |
Test to see if a given feature is set. | |
bool | Test (Experimental::EIOUnsupportedFeatures bits) const |
Static Public Attributes | |
static constexpr int | kIOFeatureCount = 1 |
Private Member Functions | |
TIOFeatures (UChar_t IOBits) | |
UChar_t | GetFeatures () const |
void | Set (UChar_t newBits) |
Private Attributes | |
UChar_t | fIOBits {0} |
Friends | |
class | ::TBasket |
class | ::TBranch |
class | ::TTree |
#include <ROOT/TIOFeatures.hxx>
|
inline |
Definition at line 75 of file TIOFeatures.hxx.
|
inlineprivate |
Definition at line 96 of file TIOFeatures.hxx.
void TIOFeatures::Clear | ( | EIOFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | input_bits | The specific feature to disable. |
Removes a feature from the TIOFeatures
object; emits an Error message if the IO feature is not supported by this version of ROOT.
Definition at line 80 of file TIOFeatures.cxx.
void TIOFeatures::Clear | ( | Experimental::EIOFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | input_bits | The specific feature to disable. |
Removes a feature from the TIOFeatures
object; emits an Error message if the IO feature is not supported by this version of ROOT.
Definition at line 58 of file TIOFeatures.cxx.
void TIOFeatures::Clear | ( | Experimental::EIOUnsupportedFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | input_bits | The specific feature to disable. |
Removes a feature from the TIOFeatures
object; emits an Error message if the IO feature is not supported by this version of ROOT.
Definition at line 69 of file TIOFeatures.cxx.
|
private |
Definition at line 250 of file TIOFeatures.cxx.
void TIOFeatures::Print | ( | ) | const |
Print a human-readable representation of the TIOFeatures to stdout.
Prints a string with the names of all enabled IO features.
Definition at line 197 of file TIOFeatures.cxx.
bool TIOFeatures::Set | ( | const std::string & | value | ) |
Given a IO feature string, set the corresponding feature.
[in] | value | Feature name to test. |
This allows one to set a feature given a specific string from the TBasket::EIOBits enum.
NOTE this function is quite slow and users are strongly encouraged to use the type-safe Set
version instead. This has been added for better CLI interfaces.
Returns kTRUE only if a new feature was set; otherwise emits an error message and returns kFALSE.
Definition at line 172 of file TIOFeatures.cxx.
bool TIOFeatures::Set | ( | EIOFeatures | input_bits | ) |
Set a specific IO feature.
[in] | input_bits | The specific feature to enable. |
Sets a feature in the TIOFeatures
object; emits an Error message if the IO feature is not supported by this version of ROOT.
If the feature is supported by ROOT, this function returns kTRUE; otherwise, it returns kFALSE.
Definition at line 139 of file TIOFeatures.cxx.
bool TIOFeatures::Set | ( | Experimental::EIOFeatures | input_bits | ) |
Set a specific IO feature.
[in] | input_bits | The specific feature to enable. |
Sets a feature in the TIOFeatures
object; emits an Error message if the IO feature is not supported by this version of ROOT.
If the feature is supported by ROOT, this function returns kTRUE; otherwise, it returns kFALSE.
Definition at line 125 of file TIOFeatures.cxx.
|
inlineprivate |
Definition at line 98 of file TIOFeatures.hxx.
bool TIOFeatures::Test | ( | EIOFeatures | input_bits | ) | const |
Test to see if a given feature is set.
[in] | input_bits | The specific feature to test. |
Returns kTRUE if the feature is enables in this object and supported by this version of ROOT.
Definition at line 239 of file TIOFeatures.cxx.
bool TIOFeatures::Test | ( | Experimental::EIOFeatures | input_bits | ) | const |
Test to see if a given feature is set.
[in] | input_bits | The specific feature to test. |
Returns kTRUE if the feature is enables in this object and supported by this version of ROOT.
Definition at line 228 of file TIOFeatures.cxx.
bool ROOT::TIOFeatures::Test | ( | Experimental::EIOUnsupportedFeatures | bits | ) | const |
|
friend |
Definition at line 72 of file TIOFeatures.hxx.
|
friend |
Definition at line 71 of file TIOFeatures.hxx.
|
friend |
Definition at line 70 of file TIOFeatures.hxx.
|
private |
Definition at line 100 of file TIOFeatures.hxx.
|
staticconstexpr |
Definition at line 89 of file TIOFeatures.hxx.