ATLAS Offline Software
|
Abstract interface for tool to fill a block in the D3PD. More...
#include <IBlockFillerTool.h>
Public Types | |
enum | { AGAIN = 1001, EMPTY = 1002 } |
Special status code to indicate that we want fillAgainUntyped to be called; see below. More... | |
Public Member Functions | |
DeclareInterfaceID (IBlockFillerTool, 1, 0) | |
Gaudi interface definition. More... | |
virtual StatusCode | configureD3PD (IAddVariable *tree, const std::type_info &ti)=0 |
Configure during initialization: type-check. More... | |
virtual StatusCode | book ()=0 |
Declare tuple variables. More... | |
virtual StatusCode | fillUntyped (const void *p, bool again=false)=0 |
Fill one block. More... | |
Static Public Member Functions | |
static StatusCode | againok (StatusCode sc) |
StatusCode check helper: change AGAIN or EMPTY to SUCCESS . More... | |
static StatusCode | againok (StatusCode sc, StatusCode &scout) |
StatusCode check helper: change AGAIN or EMPTY to SUCCESS . More... | |
Abstract interface for tool to fill a block in the D3PD.
Each object consists of a set of blocks. A block is a small set of related tuple variables for some object. Blocks represent the intended granularity for enabling or disabling variables (though it should be possible to control individual variables through the remapping mechanism). Blocks are filled by tools of type IBlockFillerTool
. Blocks (and the associated tools) will generally be specific for a particular object type (i.e., fill the egamma PID variables) A few, however, will be more generic: for example, there should be one block tool for filling 4-vector information that's used by all object types (that implement 4-vectors).
Each block is associated with a specific ‘level of detail’ in job configuration. This allows enabling a preselected set of blocks.
Each block has a default variable name for each leaf filled. This is concatenated with the object prefix (if any) to produce the full name for the leaf. It will be possible to configure the filler tools to change the names of the tuple leaves (this should be implemented with generic code in a base class). The same mechanism may be used to disable specific leaves entirely by remapping to a null name. (Remapping is not yet implemented.)
User-written code will generally not implement this interface directly, but will instead use the type-safe wrappers provided by BlockFillerTool
.
Definition at line 59 of file IBlockFillerTool.h.
anonymous enum |
Special status code to indicate that we want fillAgainUntyped
to be called; see below.
Enumerator | |
---|---|
AGAIN | |
EMPTY |
Definition at line 69 of file IBlockFillerTool.h.
|
static |
StatusCode check helper: change AGAIN
or EMPTY
to SUCCESS
.
sc | The StatusCode to check. |
If sc is AGAIN
or EMPTY
, then return SUCCESS
. Otherwise, return sc.
|
static |
StatusCode check helper: change AGAIN
or EMPTY
to SUCCESS
.
sc | The StatusCode to check. |
scout[out] | Accumulated status code. |
If sc is AGAIN
or EMPTY
, then return SUCCESS
. Otherwise, return sc.
If sc is AGAIN
, then scout will be set to AGAIN
. Otherwise, if sc is not EMPTY
, then scout
will be set to sc
.
|
pure virtual |
Declare tuple variables.
This is called at the start of the first event.
|
pure virtual |
Configure during initialization: type-check.
tree | Our parent for tuple making. |
ti | Gives the type of the object being passed to fillUntyped . |
configureD3PD
should check that the type of the object coming as input is compatible with what it expects, and raise an error otherwise.
D3PD::IBlockFillerTool::DeclareInterfaceID | ( | IBlockFillerTool | , |
1 | , | ||
0 | |||
) |
Gaudi interface definition.
|
pure virtual |
Fill one block.
p | The input object. |
again | Set if this is a subsequent call requested by an AGAIN return |
This is called once per object. The type of the object at which p
points is given by the ti
argument to configure
. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.
If the return status is the special code AGAIN
(defined above), then this filler tool wants to make multiple entries. The parent should set up to capture a new ‘row’ and run through the list of block filler tools again, but for this tool call fillAgainUntyped
instead of fillUntyped
. This should be repeated as long as fillAgainUntyped
returns AGAIN
.
Once fillUntyped
returns AGAIN
, the parent should call fillUntyped
with the same p argument and again
set to true
. This continues until fillUntyped
returns something other than AGAIN
.
Not all parents may support this. In that case, returning AGAIN
will be treated as an error.
The return code may also be EMPTY if this tool did not fill in anything. If all tools return empty, the parent may omit the row.