ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | List of all members
D3PD::IBlockFillerTool Class Referenceabstract

Abstract interface for tool to fill a block in the D3PD. More...

#include <IBlockFillerTool.h>

Inheritance diagram for D3PD::IBlockFillerTool:
Collaboration diagram for D3PD::IBlockFillerTool:

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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

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.

69  { AGAIN = 1001,
70  EMPTY = 1002
71  };

Member Function Documentation

◆ againok() [1/2]

static StatusCode D3PD::IBlockFillerTool::againok ( StatusCode  sc)
static

StatusCode check helper: change AGAIN or EMPTY to SUCCESS.

Parameters
scThe StatusCode to check.

If sc is AGAIN or EMPTY, then return SUCCESS. Otherwise, return sc.

◆ againok() [2/2]

static StatusCode D3PD::IBlockFillerTool::againok ( StatusCode  sc,
StatusCode &  scout 
)
static

StatusCode check helper: change AGAIN or EMPTY to SUCCESS.

Parameters
scThe 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.

◆ book()

virtual StatusCode D3PD::IBlockFillerTool::book ( )
pure virtual

Declare tuple variables.

This is called at the start of the first event.

◆ configureD3PD()

virtual StatusCode D3PD::IBlockFillerTool::configureD3PD ( IAddVariable tree,
const std::type_info &  ti 
)
pure virtual

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives 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.

◆ DeclareInterfaceID()

D3PD::IBlockFillerTool::DeclareInterfaceID ( IBlockFillerTool  ,
,
 
)

Gaudi interface definition.

◆ fillUntyped()

virtual StatusCode D3PD::IBlockFillerTool::fillUntyped ( const void *  p,
bool  again = false 
)
pure virtual

Fill one block.

Parameters
pThe input object.
againSet 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.


The documentation for this class was generated from the following file:
D3PD::IBlockFillerTool::EMPTY
@ EMPTY
Definition: IBlockFillerTool.h:70
D3PD::IBlockFillerTool::AGAIN
@ AGAIN
Definition: IBlockFillerTool.h:69