ROOT 6.12/07 Reference Guide |
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 propogate to the TTree
.
Definition at line 62 of file TIOFeatures.hxx.
Public Member Functions | |
TIOFeatures () | |
void | Clear (EIOFeatures bits) |
Clear a specific IO feature from this set. More... | |
void | Clear (Experimental::EIOUnsupportedFeatures bits) |
Clear a specific IO feature from this set. More... | |
void | Clear (Experimental::EIOFeatures bits) |
Clear a specific IO feature from this set. More... | |
void | Print () const |
Print a human-readable representation of the TIOFeatures to stdout. More... | |
bool | Set (EIOFeatures bits) |
Set a specific IO feature. More... | |
bool | Set (Experimental::EIOFeatures bits) |
Set a specific IO feature. More... | |
bool | Set (const std::string &) |
Given a IO feature string, set the corresponding feature. More... | |
bool | Test (EIOFeatures bits) const |
Test to see if a given feature is set. More... | |
bool | Test (Experimental::EIOFeatures bits) const |
Test to see if a given feature is set. More... | |
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 68 of file TIOFeatures.hxx.
|
inlineprivate |
Definition at line 89 of file TIOFeatures.hxx.
void TIOFeatures::Clear | ( | EIOFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | enum_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 78 of file TIOFeatures.cxx.
void TIOFeatures::Clear | ( | Experimental::EIOUnsupportedFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | enum_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 67 of file TIOFeatures.cxx.
void TIOFeatures::Clear | ( | Experimental::EIOFeatures | input_bits | ) |
Clear a specific IO feature from this set.
[in] | enum_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 56 of file TIOFeatures.cxx.
|
private |
Definition at line 248 of file TIOFeatures.cxx.
Print a human-readable representation of the TIOFeatures to stdout.
Prints a string with the names of all enabled IO features.
Definition at line 195 of file TIOFeatures.cxx.
bool TIOFeatures::Set | ( | EIOFeatures | input_bits | ) |
Set a specific IO feature.
[in] | enum_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 137 of file TIOFeatures.cxx.
bool TIOFeatures::Set | ( | Experimental::EIOFeatures | input_bits | ) |
Set a specific IO feature.
[in] | enum_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 123 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 170 of file TIOFeatures.cxx.
Definition at line 91 of file TIOFeatures.hxx.
bool TIOFeatures::Test | ( | EIOFeatures | input_bits | ) | const |
Test to see if a given feature is set.
[in] | enum_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 237 of file TIOFeatures.cxx.
bool TIOFeatures::Test | ( | Experimental::EIOFeatures | input_bits | ) | const |
Test to see if a given feature is set.
[in] | enum_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 226 of file TIOFeatures.cxx.
bool ROOT::TIOFeatures::Test | ( | Experimental::EIOUnsupportedFeatures | bits | ) | const |
|
friend |
Definition at line 65 of file TIOFeatures.hxx.
|
friend |
Definition at line 64 of file TIOFeatures.hxx.
|
friend |
Definition at line 63 of file TIOFeatures.hxx.
|
private |
Definition at line 93 of file TIOFeatures.hxx.
|
static |
Definition at line 82 of file TIOFeatures.hxx.