|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "TDictAttributeMap.h"
22 #include <ROOT/RNTuple.hxx>
33 or ( tc and ( tc->GetBaseClass(
"SG::IAuxStore")
35 or
RootType(tc).Properties().HasProperty(
"IAuxStore") ));
44 if(
branch->GetExpectedType(tc,
type) == 0 && tc !=
nullptr) {
45 const char* brname =
branch->GetName();
46 const char* clname = tc->GetName();
47 size_t namelen = strlen (clname);
48 std::string
key = brname;
49 if( strncmp(brname, clname, namelen) == 0 && brname[namelen] ==
'_' ) {
50 key.erase (0, namelen+1);
62 const std::string bname =
branch->GetName();
68 msg <<
"GetExpectedType() failed for branch: " << bname;
72 return tc->GetBaseClass(
"SG::IAuxStoreHolder") !=
nullptr;
79 std::unique_ptr<RootAuxDynIO::IRootAuxDynReader>
81 return std::make_unique<TBranchAuxDynReader>(
tree,
branch);
84 std::unique_ptr<RootAuxDynIO::IRootAuxDynReader>
86 return std::make_unique<RNTupleAuxDynReader>(field_name, field_type,
reader);
94 std::unique_ptr<RootAuxDynIO::IRootAuxDynWriter>
96 return std::make_unique<TBranchAuxDynWriter>(
tree, bufferSize, splitLevel, offsettab_len, do_branch_fill);
99 std::unique_ptr<RootAuxDynIO::IRNTupleAuxDynWriter>
101 return std::make_unique<RNTupleAuxDynWriter>();
std::unique_ptr< IRNTupleAuxDynWriter > getNTupleAuxDynWriter()
ROOT::Experimental::RNTupleModel RNTupleModel
Exceptions that can be thrown from AthContainers.
ROOT::Experimental::RNTupleReader RNTupleReader
bool removeAuxPostfix(std::string &str)
if a string ends with AUX_POSTFIX then remove it
Helper class to use to report a message.
std::unique_ptr< IRootAuxDynReader > getNTupleAuxDynReader(const std::string &field_name, const std::string &field_type, RNTupleReader *reader)
std::string getKeyFromBranch(TBranch *branch)
Exctract the Aux object SG Key from the branch name.
Helper for emitting error messages.
std::unique_ptr< IRootAuxDynReader > getBranchAuxDynReader(TTree *, TBranch *)
bool endsWithAuxPostfix(std::string_view str)
Check if a string ends with AUX_POSTFIX.
bool hasAuxStore(std::string_view fieldname, TClass *tc)
check if a field/branch with fieldname and type tc has IAuxStore interface
Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.
bool isAuxDynBranch(TBranch *branch)
Check is a branch holds AuxStore objects.
std::unique_ptr< IRootAuxDynWriter > getBranchAuxDynWriter(TTree *, int bufferSize, int splitLevel, int offsettab_len, bool do_branch_fill)
generate TBranchAuxDynWriter tree -> destination tree do_branch_fill -> flag telling to Fill each TBr...
reader
read the goodrunslist xml file(s)