ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
D3PD::ContainedVectorMultiAssociationFillerTool Class Reference

Represent a multiple association by containment inside vectors. More...

#include <ContainedVectorMultiAssociationFillerTool.h>

Inheritance diagram for D3PD::ContainedVectorMultiAssociationFillerTool:
Collaboration diagram for D3PD::ContainedVectorMultiAssociationFillerTool:

Public Member Functions

 ContainedVectorMultiAssociationFillerTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Gaudi tool constructor. More...
 
virtual StatusCode initialize ()
 Standard Gaudi initialize method. More...
 
virtual StatusCode configureD3PD (IAddVariable *tree, const std::type_info &ti)
 Configure during initialization: type-check. More...
 
virtual StatusCode book ()
 Declare tuple variables. More...
 
virtual StatusCode fillUntyped (const void *p, bool again=false)
 Fill one block. More...
 

Private Attributes

ToolHandle< IMultiAssociationToolm_associator
 Property: The association tool instance. More...
 

Detailed Description

Represent a multiple association by containment inside vectors.

This is a block filler tool which represents a multiple association by containment; the variables in the contained blocks will appear inside of vectors. (This implies that if this block itself is used with, say, VectorFillerTool, then we'll end up with nested vectors.)

It takes as a property an IMultiAssociationTool. For each input object, it asks the association tool which objects are associated with it; the result is a collection of 0 or more objects. This tool also has a list of block filler tools; these tools are called for the result of the association.

Properties:

Associator - The IMultiAssociationTool.

Properties inherited from VectorFillerToolBase:

BlockFillers - List of IBlockFillerTool instances. Prefix - Prefix to add to variable names for this block. NrowName - Name of the variable for the count of rows. Omitted if empty. Default: ‘n’. NobjName - Name of the variable for the count of objects. (May be less than the number of rows if AGAIN is used.) Omitted if empty (default). ObjIndexName - Name of the variable for the object index. Omitted if empty (default).

Definition at line 59 of file ContainedVectorMultiAssociationFillerTool.h.

Constructor & Destructor Documentation

◆ ContainedVectorMultiAssociationFillerTool()

D3PD::ContainedVectorMultiAssociationFillerTool::ContainedVectorMultiAssociationFillerTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard Gaudi tool constructor.

Parameters
typeThe name of the tool type.
nameThe tool name.
parentThe tool's Gaudi parent.

Definition at line 27 of file ContainedVectorMultiAssociationFillerTool.cxx.

31  : base_class (type, name, parent),
32  m_associator (this)
33 {
34  declareProperty ("Associator", m_associator,
35  "The IMultiAssociationTool instance.");
36 }

Member Function Documentation

◆ book()

StatusCode D3PD::ContainedVectorMultiAssociationFillerTool::book ( )
virtual

Declare tuple variables.

This is called at the start of the first event.

Definition at line 75 of file ContainedVectorMultiAssociationFillerTool.cxx.

76 {
77  CHECK( m_associator->book () );
79 
80  return StatusCode::SUCCESS;
81 }

◆ configureD3PD()

StatusCode D3PD::ContainedVectorMultiAssociationFillerTool::configureD3PD ( IAddVariable tree,
const std::type_info &  ti 
)
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.

Definition at line 60 of file ContainedVectorMultiAssociationFillerTool.cxx.

62 {
63  CHECK( m_associator->configureD3PD (this, ti) );
65 
66  return StatusCode::SUCCESS;
67 }

◆ fillUntyped()

StatusCode D3PD::ContainedVectorMultiAssociationFillerTool::fillUntyped ( const void *  p,
bool  again = false 
)
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 configureD3PD. 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.

Definition at line 111 of file ContainedVectorMultiAssociationFillerTool.cxx.

113 {
114  // Start the association.
115  CHECK( m_associator->resetUntyped (p) );
116 
117  CHECK( doFill (*m_associator, 0) );
118 
119  return StatusCode::SUCCESS;
120 }

◆ initialize()

StatusCode D3PD::ContainedVectorMultiAssociationFillerTool::initialize ( )
virtual

Standard Gaudi initialize method.

Definition at line 43 of file ContainedVectorMultiAssociationFillerTool.cxx.

44 {
46  CHECK( m_associator.retrieve() );
47  return StatusCode::SUCCESS;
48 }

Member Data Documentation

◆ m_associator

ToolHandle<IMultiAssociationTool> D3PD::ContainedVectorMultiAssociationFillerTool::m_associator
private

Property: The association tool instance.

Definition at line 131 of file ContainedVectorMultiAssociationFillerTool.h.


The documentation for this class was generated from the following files:
D3PD::VectorFillerToolBase::doBook
StatusCode doBook()
Declare tuple variables.
Definition: VectorFillerToolBase.cxx:112
tree
TChain * tree
Definition: tile_monitor.h:30
D3PD::VectorFillerToolBase::doConfigure
StatusCode doConfigure(IAddVariable *tree, IIteration &it)
Configure the tool.
Definition: VectorFillerToolBase.cxx:147
D3PD::ContainedVectorMultiAssociationFillerTool::m_associator
ToolHandle< IMultiAssociationTool > m_associator
Property: The association tool instance.
Definition: ContainedVectorMultiAssociationFillerTool.h:131
Monitored::detail::doFill
void doFill(H *hist, W weight, size_t i, const M &m1, const Ms &... m)
Perform (arbitrary dimension) histogram fill with weight.
Definition: HistogramFillerUtils.h:164
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
D3PD::VectorFillerToolBase::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
Definition: VectorFillerToolBase.cxx:88
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78