ATLAS Offline Software
|
Class writing all variables from one standalone object. More...
Classes | |
class | BranchProcessor |
Class writing one variable from an xAOD object into a branch. More... | |
Public Member Functions | |
ElementProcessor () | |
Default constructor. More... | |
StatusCode | process (const SG::AuxElement &element) |
Process the object. More... | |
StatusCode | addBranch (TTree &tree, const std::string &auxName, const std::string &branchName, bool allowMissing, bool &created) |
Add one branch to the output tree. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
std::list< BranchProcessor > | m_branches |
List of branch processors set up for this xAOD object. More... | |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
Class writing all variables from one standalone object.
It is designed to work with any type inheriting from SG::AuxElement
. Like xAOD::EventInfo
. Which is its main user at the moment...
Definition at line 103 of file AsgxAODNTupleMakerAlg.h.
CP::AsgxAODNTupleMakerAlg::ElementProcessor::ElementProcessor | ( | ) |
Default constructor.
We have to have a default constructor to initialise the asg::AsgMessaging
base class correctly. Members of this class would not need an explicit constructor themselves.
Definition at line 614 of file AsgxAODNTupleMakerAlg.cxx.
StatusCode CP::AsgxAODNTupleMakerAlg::ElementProcessor::addBranch | ( | TTree & | tree, |
const std::string & | auxName, | ||
const std::string & | branchName, | ||
bool | allowMissing, | ||
bool & | created | ||
) |
Add one branch to the output tree.
This function is used during the setup of the output tree to create one branch in it, from one specific auxiliary variable. The type of the variable is figured out at runtime using the auxiliary store infrastructure.
tree | The tree to create the branch in |
auxName | Name of the auxiliary variable to create the branch from |
branchName | The name of the branch to create in the tree |
allowMissing | Set to true to print an error message in case of a failure |
created | Used to store if the branch was actually created |
StatusCode
values Helper class for finding an already existing branch processor.
Type of the predicate's argument
Constructor with key/name
Operator evaluating whether this is the branch we're looking for
< Name of the branch
Definition at line 631 of file AsgxAODNTupleMakerAlg.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inherited |
The standard message stream.
Definition at line 49 of file AsgMessaging.cxx.
|
inherited |
The standard message stream.
lvl | The message level to set the stream to |
Definition at line 57 of file AsgMessaging.cxx.
|
inherited |
Test the output level of the object.
lvl | The message level to test against |
true
If messages at level "lvl" will be printed Definition at line 41 of file AsgMessaging.cxx.
StatusCode CP::AsgxAODNTupleMakerAlg::ElementProcessor::process | ( | const SG::AuxElement & | element | ) |
Process the object.
This function is called during the event processing to extract all configured variables from a standalone xAOD object into the output variables set up using ElementProcessor::addBranch
.
element | The xAOD (interface) object to process |
StatusCode
values Definition at line 619 of file AsgxAODNTupleMakerAlg.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
List of branch processors set up for this xAOD object.
Note that when we set up a branch, we tell TTree
to remember a physical address in memory. To make sure that the address of the object held by the branch processors are not moved in memory after their construction, we have to use an std::list
container here. std::vector
would not work. (As it can relocate objects when increasing the size of the container.)
Definition at line 220 of file AsgxAODNTupleMakerAlg.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.