ATLAS Offline Software
Loading...
Searching...
No Matches
D3PD::VectorFillerToolBase Class Reference

Common code for wrapping filled variables up into a vector. More...

#include <VectorFillerToolBase.h>

Inheritance diagram for D3PD::VectorFillerToolBase:
Collaboration diagram for D3PD::VectorFillerToolBase:

Classes

class  Var
 Description for a single variable. More...
struct  Vars
 Description for the list of variables. More...

Public Member Functions

 VectorFillerToolBase (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Gaudi tool constructor.
virtual StatusCode initialize ()
 Standard Gaudi initialize method.
virtual StatusCode finalize ()
 Standard Gaudi finalize method.
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.
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.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
template<class T>
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring="")
 Add a variable to the tuple.
template<class T, class U>
StatusCode addVariable (const std::string &name, T *&ptr, const std::string &docstring, const U &defval)
 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 Member Functions

StatusCode doConfigure (IAddVariable *tree, IIteration &it)
 Configure the tool.
StatusCode doBook ()
 Declare tuple variables.
StatusCode doFill (IIteration &it, size_t sizeHint)
 Fill objects from an IIteration.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

ObjectMetadata m_metadata
 Metadata about the variables created by this tool.
std::string m_prefix
 Property: Variable prefix for this block.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void maybeExtend (size_t &n, size_t &sz)
 Extend vectors if needed.
StatusCode fillOnce (const void *obj, size_t objndx, size_t &n, size_t &sz, const std::vector< unsigned long > &codes_in, std::vector< unsigned long > &codes_out)
 Make one loop over block filler tools.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandleArray< IBlockFillerToolm_blockFillers
 Property: The list of block filler tools.
std::string m_nrowName
 Property: Name of the variable for the count of rows.
std::string m_nobjName
 Property: Name of the variable for the count of objects.
std::string m_objIndexName
 Property: Name of the variable for the object index.
IAddVariablem_tree
 The parent tree.
int * m_nrow
 Variable for the row count.
int * m_nobj
 Variable for the object count.
int * m_objIndex
 Variable for the object index.
Vars m_vars
 All booked variables.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Common code for wrapping filled variables up into a vector.

In several places we want to be able to run a set of block filler tools over a set of objects and wrap the results up in vectors. This is used at least in VectorFillerTool and ContainedVectorMultiAssociationFillerTool. This class factors out the common behavior involved in wrapping results up in vectors.

The actual iteration over a set of objects is expressed by the interface IIteration. The way this class is used is as follows:

  • Call doConfigure from your configureD3PD method. Pass in the IIteration instance.
  • Call doBook from your book method.
  • To do a fill, first do whatever's needed to prepare the IIteration instance to iterate over the desired object set. Then pass it to doFill.

    doFill will iterate over the objects in the IIteration; for each of these, it will loop over the block filler tools.

    The results will be collected inside of vectors.

This tool has the following properties:

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 77 of file VectorFillerToolBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ VectorFillerToolBase()

D3PD::VectorFillerToolBase::VectorFillerToolBase ( 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 56 of file VectorFillerToolBase.cxx.

59 : AthAlgTool (type, name, parent),
60 m_metadata (),
61 m_prefix (),
62 m_blockFillers (this),
63 m_tree (0),
64 m_nrow (0),
65 m_nobj (0),
66 m_objIndex (0)
67{
68 declareProperty ("BlockFillers", m_blockFillers,
69 "List of contained block filler tools.");
70 declareProperty ("Prefix", m_prefix = "",
71 "Variable name prefix for the contained blocks.");
72 declareProperty ("NrowName", m_nrowName = "n",
73 "Name of the variable for the count of rows. "
74 "Omitted if empty.");
75 declareProperty ("NobjName", m_nobjName = "",
76 "Name of the variable for the count of objects. "
77 "Omitted if empty.");
78 declareProperty ("ObjIndexName", m_objIndexName = "",
79 "Name of the variable for the object index. "
80 "Omitted if empty.");
81}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
IAddVariable * m_tree
The parent tree.
int * m_objIndex
Variable for the object index.
std::string m_nrowName
Property: Name of the variable for the count of rows.
int * m_nobj
Variable for the object count.
ObjectMetadata m_metadata
Metadata about the variables created by this 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_objIndexName
Property: Name of the variable for the object index.
std::string m_nobjName
Property: Name of the variable for the count of objects.
int * m_nrow
Variable for the row count.

Member Function Documentation

◆ addDimensionedVariable() [1/3]

template<class T, class U>
StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
T *& ptr,
const std::string & dim,
const std::string & docstring,
const U & defval )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer 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.

◆ addDimensionedVariable() [2/3]

template<class T>
StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
T *& ptr,
const std::string & dim,
const std::string & docstring = "" )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [3/3]

StatusCode D3PD::VectorFillerToolBase::addDimensionedVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & dim,
const std::string & docstring = "",
const void * defval = 0 )
virtual

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer 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.

Implements D3PD::IAddVariable.

Definition at line 383 of file VectorFillerToolBase.cxx.

389{
390 REPORT_MESSAGE(MSG::ERROR) << "addDimensionedVariable not yet implemented.";
391 return StatusCode::FAILURE;
392}
#define REPORT_MESSAGE(LVL)
Report a message.

◆ addVariable() [1/3]

template<class T, class U>
StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
T *& ptr,
const std::string & docstring,
const U & defval )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer 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.

◆ addVariable() [2/3]

template<class T>
StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
T *& ptr,
const std::string & docstring = "" )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addVariable() [3/3]

StatusCode D3PD::VectorFillerToolBase::addVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & docstring = "",
const void * defval = 0 )
virtual

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer 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.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer 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.

Implements D3PD::IAddVariable.

Definition at line 306 of file VectorFillerToolBase.cxx.

311{
312 if (!m_tree) {
313 // Called from constructor --- just initialize pointer.
314 ptr = 0;
315 return StatusCode::SUCCESS;
316 }
317
318 // Default value handling.
319 size_t defsize = 0;
320 char* defcopied = 0;
321 if (defval) {
322 EDataType dt = TDataType::GetType (ti);
323 switch (dt) {
324 case kChar_t:
325 case kUChar_t:
326 case kShort_t:
327 case kUShort_t:
328 case kInt_t:
329 case kUInt_t:
330 case kLong_t:
331 case kULong_t:
332 case kFloat_t:
333 case kDouble_t:
334 case kDouble32_t:
335 case kchar:
336 case kBool_t:
337 case kLong64_t:
338 case kULong64_t:
339 case kFloat16_t:
340 // ok
341 break;
342
343 default:
344 REPORT_MESSAGE (MSG::ERROR)
345 << "Requested a default value for variable " << name
346 << " of type " << System::typeinfoName (ti)
347 << "; but default values are only supported for basic types.";
348 return StatusCode::FAILURE;
349 }
350
351 TDataType* tdt = gROOT->GetType (TDataType::GetTypeName (dt));
352 assert (tdt != 0);
353 defsize = tdt->Size();
354 defcopied = new char[defsize];
355 std::memcpy (defcopied, defval, defsize);
356 }
357
358 m_vars.push_back (Var (name, ti, ptr, docstring, defcopied, defsize));
359 CHECK( m_vars.back().init (&m_metadata, m_prefix) );
360 CHECK( m_vars.back().init (m_tree, m_prefix) );
361
362 return StatusCode::SUCCESS;
363}
#define CHECK(...)
Evaluate an expression and check for errors.
Description for a single variable.
Vars m_vars
All booked variables.
void * ptr(T *p)
Definition SGImplSvc.cxx:74

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ doBook()

StatusCode D3PD::VectorFillerToolBase::doBook ( )
protected

Declare tuple variables.

This is called at the start of the first event.

Definition at line 112 of file VectorFillerToolBase.cxx.

113{
114 // Create the count/index variables.
115 if (!m_nrowName.empty()) {
116 CHECK( m_metadata.addVariable (m_prefix + m_nrowName, m_nrow,
117 "Number of ntuple rows.") );
118 CHECK( m_tree->addVariable (m_prefix + m_nrowName, m_nrow,
119 "Number of ntuple rows.") );
120 }
121 if (!m_nobjName.empty()) {
122 CHECK( m_metadata.addVariable (m_prefix + m_nobjName, m_nobj,
123 "Number of objects.") );
124 CHECK( m_tree->addVariable (m_prefix + m_nobjName, m_nobj,
125 "Number of objects.") );
126 }
127 if (!m_objIndexName.empty())
129 "Index of this object.") );
130
131 // Book child variables.
132 for (size_t i = 0; i < m_blockFillers.size(); i++)
133 CHECK( m_blockFillers[i]->book() );
134
135 return StatusCode::SUCCESS;
136}
StatusCode addVariable(const std::string &name, T *&ptr, const std::string &docstring="")
Add a variable to the tuple.

◆ doConfigure()

StatusCode D3PD::VectorFillerToolBase::doConfigure ( IAddVariable * tree,
IIteration & it )
protected

Configure the tool.

Parameters
treeThe parent D3PD tree.
itThe iteration object we'll use. (Used to get the elt type.)

This is called during initialization.

Definition at line 147 of file VectorFillerToolBase.cxx.

148{
149 m_tree = tree;
150
151 // Get the type of object we'll get from the iteration.
152 const std::type_info& ti = it.elementTypeinfo();
153
154 // Configure all child tools.
155 for (size_t i = 0; i < m_blockFillers.size(); i++)
156 CHECK( m_blockFillers[i]->configureD3PD (this, ti) );
157
158 return StatusCode::SUCCESS;
159}
TChain * tree

◆ doFill()

StatusCode D3PD::VectorFillerToolBase::doFill ( IIteration & it,
size_t sizeHint )
protected

Fill objects from an IIteration.

Parameters
itIteration object. Must have already been reset.
sizeHintHint for the expected size of the iteration.

This will loop over the objects in the iteration; for each object, it will loop over the contained block filler tools.

Parameters
itIteration object. Must have already been reset.

This will loop over the objects in the iteration; for each object, it will loop over the contained block filler tools.

Definition at line 244 of file VectorFillerToolBase.cxx.

245{
246 // Set variable vectors to the expected size.
247 m_vars.resize_all (sizeHint);
248 size_t n = 0;
249 size_t nobj = 0;
250 size_t sz = sizeHint;
251
252 std::vector<unsigned long> codes_in;
253 std::vector<unsigned long> codes_out;
254
255 // Loop over objects.
256 // Note: @c nextUntyped may try to fill variables. Make sure there's space.
257 maybeExtend (n, sz);
258 while (const void* obj = it.nextUntyped() ) {
259 // AGAIN processing.
260 codes_in.clear();
261 codes_in.resize (m_blockFillers.size(), StatusCode(StatusCode::SUCCESS).getCode());
262 CHECK( fillOnce (obj, nobj, n, sz, codes_in, codes_out) );
263 codes_in = codes_out;
264 while (std::find (codes_out.begin(), codes_out.end(),
265 (unsigned long)IBlockFillerTool::AGAIN)
266 != codes_out.end())
267 {
268 CHECK( fillOnce (obj, nobj, n, sz, codes_in, codes_out) );
269 }
270
271 ++nobj;
272
273 it.releaseElementUntyped (obj);
274 maybeExtend (n, sz);
275 }
276
277 // Set vectors to the proper final size.
278 if (sz != n)
279 m_vars.resize_all (n);
280
281 // Save the counts.
282 if (m_nrow)
283 *m_nrow = n;
284 if (m_nobj)
285 *m_nobj = nobj;
286
287 return StatusCode::SUCCESS;
288}
static Double_t sz
void maybeExtend(size_t &n, size_t &sz)
Extend vectors if needed.
StatusCode fillOnce(const void *obj, size_t objndx, size_t &n, size_t &sz, const std::vector< unsigned long > &codes_in, std::vector< unsigned long > &codes_out)
Make one loop over block filler tools.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillOnce()

StatusCode D3PD::VectorFillerToolBase::fillOnce ( const void * obj,
size_t objndx,
size_t & n,
size_t & sz,
const std::vector< unsigned long > & codes_in,
std::vector< unsigned long > & codes_out )
private

Make one loop over block filler tools.

Parameters
objObject being processed.
objndxThe index of the object we're currently processing.
nNumber of entries currently made in the vectors.
szCurrent size of the vectors.
codes_inVector of status returns for each tool from the first fill call.
codes_out[out]Vector of status returns for each tool from this fill call.

This function may be called more than once for an object if AGAIN was requested.

We loop over all block filler tools. For each, we call fillUntyped with the again parameter set depending on whether codes_in for this tool is AGAIN. We collect the return codes from each tool in codes_out.

Definition at line 196 of file VectorFillerToolBase.cxx.

202{
203 codes_out.resize (m_blockFillers.size());
204
205 // Extend vectors if needed.
206 maybeExtend (n, sz);
207
208 // Loop over block fillers.
209 bool all_empty = true;
210 for (size_t j = 0; j < m_blockFillers.size(); j++) {
211 StatusCode scode =
212 m_blockFillers[j]->fillUntyped(obj,
213 codes_in[j] == IBlockFillerTool::AGAIN);
214 codes_out[j] = scode.getCode();
215 if (codes_out[j] != IBlockFillerTool::EMPTY)
216 all_empty = false;
218 }
219
220 // If all tools returned empty, then ignore this row.
221 // But don't ignore it if there are no block fillers at all
222 // (it may be that an associator tool will be filling variables).
223 if (!all_empty || m_blockFillers.empty()) {
224 if (m_objIndex)
225 *m_objIndex = objndx;
226
227 // Count rows and update variable pointers.
228 ++n;
229 m_vars.next_all();
230 }
231
232 return StatusCode::SUCCESS;
233}
static StatusCode againok(StatusCode sc)
StatusCode check helper: change AGAIN or EMPTY to SUCCESS.

◆ finalize()

StatusCode D3PD::VectorFillerToolBase::finalize ( )
virtual

Standard Gaudi finalize method.

Definition at line 99 of file VectorFillerToolBase.cxx.

100{
101 // Don't clear the m_vars variable, because some memory will never be freed
102 // in that case...
103 return StatusCode::SUCCESS;
104}

◆ initialize()

StatusCode D3PD::VectorFillerToolBase::initialize ( )
virtual

Standard Gaudi initialize method.

Definition at line 88 of file VectorFillerToolBase.cxx.

89{
90 CHECK( AthAlgTool::initialize() );
91 CHECK( m_blockFillers.retrieve() );
92 return StatusCode::SUCCESS;
93}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ maybeExtend()

void D3PD::VectorFillerToolBase::maybeExtend ( size_t & n,
size_t & sz )
private

Extend vectors if needed.

Parameters
nNumber of entries currently made in the vectors.
szCurrent size of the vectors.

Definition at line 167 of file VectorFillerToolBase.cxx.

168{
169 if (n >= sz) {
170 sz = std::max(static_cast<size_t>(16), 2*sz);
171 m_vars.resize_all (sz, n);
172 }
173}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_blockFillers

ToolHandleArray<IBlockFillerTool> D3PD::VectorFillerToolBase::m_blockFillers
private

Property: The list of block filler tools.

Definition at line 189 of file VectorFillerToolBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_metadata

ObjectMetadata D3PD::VectorFillerToolBase::m_metadata
protected

Metadata about the variables created by this tool.

Definition at line 180 of file VectorFillerToolBase.h.

◆ m_nobj

int* D3PD::VectorFillerToolBase::m_nobj
private

Variable for the object count.

Definition at line 210 of file VectorFillerToolBase.h.

◆ m_nobjName

std::string D3PD::VectorFillerToolBase::m_nobjName
private

Property: Name of the variable for the count of objects.

Omitted if empty.

Definition at line 197 of file VectorFillerToolBase.h.

◆ m_nrow

int* D3PD::VectorFillerToolBase::m_nrow
private

Variable for the row count.

Definition at line 207 of file VectorFillerToolBase.h.

◆ m_nrowName

std::string D3PD::VectorFillerToolBase::m_nrowName
private

Property: Name of the variable for the count of rows.

Omitted if empty.

Definition at line 193 of file VectorFillerToolBase.h.

◆ m_objIndex

int* D3PD::VectorFillerToolBase::m_objIndex
private

Variable for the object index.

Definition at line 213 of file VectorFillerToolBase.h.

◆ m_objIndexName

std::string D3PD::VectorFillerToolBase::m_objIndexName
private

Property: Name of the variable for the object index.

Omitted if empty.

Definition at line 201 of file VectorFillerToolBase.h.

◆ m_prefix

std::string D3PD::VectorFillerToolBase::m_prefix
protected

Property: Variable prefix for this block.

Definition at line 184 of file VectorFillerToolBase.h.

◆ m_tree

IAddVariable* D3PD::VectorFillerToolBase::m_tree
private

The parent tree.

Definition at line 204 of file VectorFillerToolBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vars

Vars D3PD::VectorFillerToolBase::m_vars
private

All booked variables.

Definition at line 346 of file VectorFillerToolBase.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: