ATLAS Offline Software
Classes | Typedefs | Functions | Variables
RootAuxDynIO Namespace Reference

Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple. More...

Classes

class  AuxDynAttrAccess
 
struct  AuxInfo
 
class  FactoryTool
 
class  IFactoryTool
 
class  IRNTupleAuxDynWriter
 Interface for a RNTuple-based Writer that handles AuxDyn attributes Works in conjuction with the generic writer. More...
 
class  IRootAuxDynReader
 
class  IRootAuxDynWriter
 Interface for an AuxDyn Writer - TTree based. More...
 
class  RNTupleAuxDynReader
 
class  RNTupleAuxDynWriter
 
class  TBranchAuxDynWriter
 

Typedefs

typedef std::tuple< std::string, std::string, void * > attrDataTuple
 

Functions

bool endsWithAuxPostfix (std::string_view str)
 Check if a string ends with AUX_POSTFIX. More...
 
bool removeAuxPostfix (std::string &str)
 if a string ends with AUX_POSTFIX then remove it More...
 
std::string auxBranchName (const std::string &attr_name, const std::string &baseBranchName)
 Construct branch name for a given dynamic attribute. More...
 
std::string auxFieldName (const std::string &attr_name, const std::string &baseName)
 Construct field name for a given dynamic attribute. More...
 
std::string getKeyFromBranch (TBranch *branch)
 Exctract the Aux object SG Key from the branch name. More...
 

Variables

constexpr char AUX_POSTFIX [] = "Aux."
 Common post-fix for the names of auxiliary containers in StoreGate. More...
 
constexpr size_t AUX_POSTFIX_LEN = sizeof(AUX_POSTFIX)-1
 
constexpr char AUXDYN_POSTFIX [] = "Dyn."
 
constexpr size_t AUXDYN_POSTFIX_LEN = sizeof(AUXDYN_POSTFIX)-1
 

Detailed Description

Specialization of RootAuxDynStore for reading Aux Dynamic attributes from RNTuple.

Author
Marcin Nowak

Typedef Documentation

◆ attrDataTuple

typedef std::tuple<std::string, std::string, void*> RootAuxDynIO::attrDataTuple

Definition at line 33 of file IRootAuxDynIO.h.

Function Documentation

◆ auxBranchName()

std::string RootAuxDynIO::auxBranchName ( const std::string &  attr_name,
const std::string &  baseBranchName 
)
inline

Construct branch name for a given dynamic attribute.

Parameters
attr_namethe name of the attribute
baseBranchNamebranch name for the main AuxStore object

Definition at line 60 of file RootAuxDynDefs.h.

61 {
62  std::string branch_name = baseBranchName;
63  if( !branch_name.empty() and branch_name.back() == '.' ) branch_name.pop_back();
64  branch_name += RootAuxDynIO::AUXDYN_POSTFIX + attr_name;
65  return branch_name;
66 }

◆ auxFieldName()

std::string RootAuxDynIO::auxFieldName ( const std::string &  attr_name,
const std::string &  baseName 
)
inline

Construct field name for a given dynamic attribute.

Parameters
attr_namethe name of the attribute
baseBranchNamebranch name for the main AuxStore object

Definition at line 69 of file RootAuxDynDefs.h.

70 {
71  // RNTuple field names cannot contain dot characters '.'
72  // Therefore, for now, we're using a colon instead ':'
73  // This can be changed in the future
74  std::string field_name = baseName;
75  if (field_name.ends_with(':')) {
76  field_name.pop_back();
77  }
78  field_name = std::format("{}Dyn:{}", field_name, attr_name);
79  return field_name;
80 }

◆ endsWithAuxPostfix()

bool RootAuxDynIO::endsWithAuxPostfix ( std::string_view  str)
inline

Check if a string ends with AUX_POSTFIX.

Parameters
strthe string to check

Definition at line 21 of file RootAuxDynDefs.h.

21  {
22  return str.ends_with(AUX_POSTFIX);
23  }

◆ getKeyFromBranch()

std::string RootAuxDynIO::getKeyFromBranch ( TBranch *  branch)

Exctract the Aux object SG Key from the branch name.

Parameters
branchTBranch with Key in its name

◆ removeAuxPostfix()

bool RootAuxDynIO::removeAuxPostfix ( std::string &  str)
inline

if a string ends with AUX_POSTFIX then remove it

Parameters
strthe string to modify

Definition at line 49 of file RootAuxDynDefs.h.

50 {
51  if( endsWithAuxPostfix(str) ) {
52  str.resize( str.size() - AUX_POSTFIX_LEN );
53  return true;
54  }
55  return false;
56 }

Variable Documentation

◆ AUX_POSTFIX

constexpr char RootAuxDynIO::AUX_POSTFIX[] = "Aux."
constexpr

Common post-fix for the names of auxiliary containers in StoreGate.

Definition at line 12 of file RootAuxDynDefs.h.

◆ AUX_POSTFIX_LEN

constexpr size_t RootAuxDynIO::AUX_POSTFIX_LEN = sizeof(AUX_POSTFIX)-1
constexpr

Definition at line 13 of file RootAuxDynDefs.h.

◆ AUXDYN_POSTFIX

constexpr char RootAuxDynIO::AUXDYN_POSTFIX[] = "Dyn."
constexpr

Definition at line 14 of file RootAuxDynDefs.h.

◆ AUXDYN_POSTFIX_LEN

constexpr size_t RootAuxDynIO::AUXDYN_POSTFIX_LEN = sizeof(AUXDYN_POSTFIX)-1
constexpr

Definition at line 15 of file RootAuxDynDefs.h.

RootAuxDynIO::AUX_POSTFIX
constexpr char AUX_POSTFIX[]
Common post-fix for the names of auxiliary containers in StoreGate.
Definition: RootAuxDynDefs.h:12
vtune_athena.format
format
Definition: vtune_athena.py:14
RootAuxDynIO::AUXDYN_POSTFIX
constexpr char AUXDYN_POSTFIX[]
Definition: RootAuxDynDefs.h:14
RootAuxDynIO::endsWithAuxPostfix
bool endsWithAuxPostfix(std::string_view str)
Check if a string ends with AUX_POSTFIX.
Definition: RootAuxDynDefs.h:21
str
Definition: BTagTrackIpAccessor.cxx:11
RootAuxDynIO::AUX_POSTFIX_LEN
constexpr size_t AUX_POSTFIX_LEN
Definition: RootAuxDynDefs.h:13