![]() |
ATLAS Offline Software
|
Object filler tool for a single object. More...
#include <ObjFillerTool.h>
Public Member Functions | |
| ObjFillerTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard Gaudi tool constructor. | |
| virtual StatusCode | initialize () |
Standard Gaudi initialize method. | |
| virtual StatusCode | configureD3PD (IAddVariable *tree) |
| Configure the tool. | |
| virtual StatusCode | book () |
| Declare tuple variables. | |
| virtual StatusCode | fill () |
| Fill one object. | |
| virtual bool | isContainerFiller () const |
| Find out if the filler handles containers or single objects. | |
| virtual void | handle (const Incident &inc) |
| Handle end of run incidents to save the metadata at that point. | |
| virtual StatusCode | addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0) |
| Add a variable to the tuple. | |
| template<class T> | |
| StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring="") |
Make the template implementation from IAddVariable visible. | |
| template<class T, class U> | |
| StatusCode | addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval) |
Make the template implementation from IAddVariable visible. | |
| virtual StatusCode | addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0) |
| Add a variable to the tuple. | |
| template<class T> | |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring="") |
| Add a variable to the tuple. | |
| template<class T, class U> | |
| StatusCode | addDimensionedVariable (const std::string &name, T *&ptr, const std::string &dim, const std::string &docstring, const U &defval) |
| Add a variable to the tuple. | |
Protected Attributes | |
| ObjectMetadata | m_metadata |
| Metadata about the variables created by this object. | |
Private Attributes | |
| ToolHandle< IObjGetterTool > | m_getter |
| Property: The object getter tool. | |
| ToolHandleArray< IBlockFillerTool > | m_blockFillers |
| Property: The list of block filler tools. | |
| std::string | m_prefix |
| Property: Variable prefix for this block. | |
| std::string | m_blockName |
| Property: the name of this block. | |
| std::string | m_objectName |
| Property: the name of the D3PDObject that created this tool. | |
| bool | m_allowMissing |
| Property: If true, the input object is allowed to be missing. | |
| bool | m_saveMetadata |
| Property: If true, the metadata about the variables is saved. | |
| ID3PD * | m_tree |
| Pointer to the ID3PD object used. | |
| const std::string & | m_suffix |
| Reference to the variable suffix. | |
Static Private Attributes | |
| static const std::string | s_emptyString |
| Used to provide a default value for blockName. | |
Object filler tool for a single object.
This is an object filler tool for a single object. It has the following properties:
Getter - IObjGetterTool instance. BlockFillers - List of IBlockFillerTool instances. Prefix - Prefix to add to variable names for this block.
For each event, we call the getter to retrieve the object. Then we loop over all block filler tools, passing the object to each.
Definition at line 49 of file ObjFillerTool.h.
| D3PD::ObjFillerTool::ObjFillerTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Standard Gaudi tool constructor.
| type | The name of the tool type. |
| name | The tool name. |
| parent | The tool's Gaudi parent. |
Definition at line 30 of file ObjFillerTool.cxx.
|
virtualinherited |
Add a variable to the tuple.
| name | The name of the variable. |
| type | The type of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
Implements D3PD::IAddVariable.
Definition at line 123 of file AddVariable.cxx.
|
inherited |
Add a variable to the tuple.
| name | The name of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
|
inherited |
Add a variable to the tuple.
| name | The name of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| dim | Dimension for the variable. (Presently unimplemented!) |
| docstring | Documentation string for this variable. |
If called from the constructor, the only effect is to clear ptr.
|
virtualinherited |
Add a variable to the tuple.
| name | The name of the variable. |
| type | The type of the variable. |
| ptr | Pointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill(). |
| docstring | Documentation string for this variable. |
| defval | Pointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. |
If called from the constructor, the only effect is to clear ptr.
Implements D3PD::IAddVariable.
Definition at line 85 of file AddVariable.cxx.
|
inherited |
Make the template implementation from IAddVariable visible.
|
inherited |
Make the template implementation from IAddVariable visible.
|
virtual |
Declare tuple variables.
This is called at the start of the first event.
Definition at line 105 of file ObjFillerTool.cxx.
|
virtual |
Configure the tool.
| tree | The parent D3PD tree. |
This is called during initialization.
Definition at line 84 of file ObjFillerTool.cxx.
|
virtual |
Fill one object.
This is called once per event. It should:
Definition at line 131 of file ObjFillerTool.cxx.
|
virtual |
Handle end of run incidents to save the metadata at that point.
The metadata saving is now done when seeing an end of run incident.
This is needed because of MC11b...
Basically, we can't do this in finalize(), because the output TTree is no longer accessible by then. So it has to be done just before the event loop is finished.
Definition at line 170 of file ObjFillerTool.cxx.
|
virtual |
Standard Gaudi initialize method.
Definition at line 62 of file ObjFillerTool.cxx.
|
virtual |
Find out if the filler handles containers or single objects.
This is used by the D3PDReader code generator to know how to create the generated source files exactly.
Definition at line 156 of file ObjFillerTool.cxx.
|
private |
Property: If true, the input object is allowed to be missing.
Definition at line 129 of file ObjFillerTool.h.
|
private |
Property: The list of block filler tools.
Definition at line 117 of file ObjFillerTool.h.
|
private |
Property: the name of this block.
Definition at line 123 of file ObjFillerTool.h.
|
private |
Property: The object getter tool.
Definition at line 114 of file ObjFillerTool.h.
|
protectedinherited |
Metadata about the variables created by this object.
Definition at line 129 of file AddVariable.h.
|
private |
Property: the name of the D3PDObject that created this tool.
Definition at line 126 of file ObjFillerTool.h.
|
private |
Property: Variable prefix for this block.
Definition at line 120 of file ObjFillerTool.h.
|
private |
Property: If true, the metadata about the variables is saved.
Definition at line 132 of file ObjFillerTool.h.
|
privateinherited |
Reference to the variable suffix.
Definition at line 137 of file AddVariable.h.
|
private |
Pointer to the ID3PD object used.
Definition at line 135 of file ObjFillerTool.h.
|
staticprivateinherited |
Used to provide a default value for blockName.
Definition at line 41 of file AddVariable.h.