ATLAS Offline Software
|
Event format metadata for xAOD files. More...
#include <EventFormat_v1.h>
Public Types | |
typedef KeyedData_t::const_iterator | const_iterator |
Iterator for looping over the elements of the object. More... | |
Public Member Functions | |
EventFormat_v1 () | |
Default constructor. More... | |
void | add (const EventFormatElement &element, bool updatePersistent=true) |
Add the description of a new branch. More... | |
bool | exists (const std::string &key) const |
Check if a description exists about a given branch. More... | |
bool | exists (uint32_t hash) const |
Check if a description exists about a given branch. More... | |
const EventFormatElement * | get (const std::string &key, bool quiet=false) const |
Get the description of a given branch. More... | |
const EventFormatElement * | get (uint32_t hash, bool quiet=false) const |
Get the description of a given branch. More... | |
void | clear () |
Clear the object. More... | |
const_iterator | begin () const |
STL-like function for getting the beginning of the container. More... | |
const_iterator | end () const |
STL-like function for getting the end of the container. More... | |
void | toTransient () |
Interpret the persistent members of the object. More... | |
void | dump () const |
Dump the contents of this object. More... | |
Private Types | |
typedef std::map< std::string, EventFormatElement > | KeyedData_t |
Type of the key->data in-memory object. More... | |
typedef std::map< uint32_t, EventFormatElement > | HashedData_t |
Type of the hash->data in-memory object. More... | |
Private Attributes | |
KeyedData_t | m_keyedData |
Object associating string keys with the descriptions. More... | |
HashedData_t | m_hashedData |
Object associating hash keys with the descriptions. More... | |
std::vector< std::string > | m_branchNames |
Names of the branches that we are describing. More... | |
std::vector< std::string > | m_classNames |
Names of the transient objects belonging to the branch names. More... | |
std::vector< std::string > | m_parentNames |
Names of the auxiliary parents of the branches. More... | |
std::vector< uint32_t > | m_branchHashes |
Hashed versions of the branch names. More... | |
Event format metadata for xAOD files.
This class is used to save file-level metadata about the format of xAOD files. It is not meant to be used directly by analysers, but just by the code that they use, behind the scenes.
Definition at line 38 of file EventFormat_v1.h.
typedef KeyedData_t::const_iterator xAOD::EventFormat_v1::const_iterator |
Iterator for looping over the elements of the object.
Definition at line 67 of file EventFormat_v1.h.
|
private |
Type of the hash->data in-memory object.
Definition at line 43 of file EventFormat_v1.h.
|
private |
Type of the key->data in-memory object.
Definition at line 41 of file EventFormat_v1.h.
xAOD::EventFormat_v1::EventFormat_v1 | ( | ) |
Default constructor.
Definition at line 35 of file EventFormat_v1.cxx.
void xAOD::EventFormat_v1::add | ( | const EventFormatElement & | element, |
bool | updatePersistent = true |
||
) |
Add the description of a new branch.
This function can be used to extend the object with a new element.
element | The element to add to the object |
Definition at line 43 of file EventFormat_v1.cxx.
EventFormat_v1::const_iterator xAOD::EventFormat_v1::begin | ( | ) | const |
STL-like function for getting the beginning of the container.
Definition at line 158 of file EventFormat_v1.cxx.
void xAOD::EventFormat_v1::clear | ( | ) |
void xAOD::EventFormat_v1::dump | ( | ) | const |
Dump the contents of this object.
Definition at line 223 of file EventFormat_v1.cxx.
EventFormat_v1::const_iterator xAOD::EventFormat_v1::end | ( | ) | const |
STL-like function for getting the end of the container.
Definition at line 163 of file EventFormat_v1.cxx.
Check if a description exists about a given branch.
key | The name of the branch to check |
true
if the branch is knows, false
if not Definition at line 65 of file EventFormat_v1.cxx.
Check if a description exists about a given branch.
hash | Hashed version of the branch name to check |
true
if the branch is knows, false
if not Definition at line 75 of file EventFormat_v1.cxx.
const EventFormatElement * xAOD::EventFormat_v1::get | ( | const std::string & | key, |
bool | quiet = false |
||
) | const |
Get the description of a given branch.
This function can be used to get access to one element in the object.
Notice that the user code should first check if an element exists, and only use this function if it does.
key | The name of the branch to get the information for |
quiet | If true, silently return 0 if the hash isn't found; otherwise, print an error. |
Definition at line 91 of file EventFormat_v1.cxx.
const EventFormatElement * xAOD::EventFormat_v1::get | ( | uint32_t | hash, |
bool | quiet = false |
||
) | const |
Get the description of a given branch.
This function can return the element describing a given branch.
Notice that the user code should first check if an element exists, and only use this function if it does.
hash | The hashed version of the name of the branch |
quiet | If true, silently return 0 if the hash isn't found; otherwise, print an error. |
Definition at line 116 of file EventFormat_v1.cxx.
void xAOD::EventFormat_v1::toTransient | ( | ) |
|
private |
Hashed versions of the branch names.
Definition at line 92 of file EventFormat_v1.h.
|
private |
Names of the branches that we are describing.
Definition at line 86 of file EventFormat_v1.h.
|
private |
Names of the transient objects belonging to the branch names.
Definition at line 88 of file EventFormat_v1.h.
|
private |
Object associating hash keys with the descriptions.
Definition at line 83 of file EventFormat_v1.h.
|
private |
Object associating string keys with the descriptions.
Definition at line 81 of file EventFormat_v1.h.
|
private |
Names of the auxiliary parents of the branches.
Definition at line 90 of file EventFormat_v1.h.