ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
D3PDMakerUtils
src
MultiAssociationToolImpl.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id$
12
13
14
#include "
D3PDMakerUtils/MultiAssociationToolImpl.h
"
15
#include "
AthenaKernel/errorcheck.h
"
16
17
18
namespace
D3PD
{
19
20
27
MultiAssociationToolImpl::MultiAssociationToolImpl
28
(
const
std::string&
type
,
29
const
std::string& name,
30
const
IInterface* parent)
31
: base_class (
type
, name, parent),
32
AddVariable
(
m_prefix
,
m_blockName
)
33
{
34
declareProperty (
"Prefix"
,
m_prefix
=
""
,
35
"Tuple variable prefix for this block."
);
36
declareProperty (
"BlockName"
,
m_blockName
= this->name(),
37
"The name of this block."
);
38
}
39
40
50
StatusCode
51
MultiAssociationToolImpl::configureD3PD
(
IAddVariable
*
tree
,
52
const
std::type_info& ti)
53
{
54
CHECK
(
AddVariable::configureD3PD
(
tree
) );
55
CHECK
(
m_inputConverter
.init (ti,
fromTypeinfo
()) );
56
return
StatusCode::SUCCESS;
57
}
58
59
68
*
69
* @c configureMulti should check that the type of the object coming as input
70
* (to @c getUntyped)
71
* is compatible with what it expects, and raise an error otherwise.
72
*/
73
StatusCode
74
MultiAssociationToolImpl::configureMulti
(
D3PD::IAddVariable
*
tree
,
75
const
std::type_info& ti,
76
const
std::vector<const std::type_info*>& tis,
77
size_t
& which)
78
{
79
CHECK
(
AddVariable::configureD3PD
(
tree
) );
80
CHECK
(
m_inputConverter
.init (ti, tis, which) );
81
return
StatusCode::SUCCESS;
82
}
83
84
91
StatusCode
92
MultiAssociationToolImpl::book
()
93
{
94
return
StatusCode::SUCCESS;
95
}
96
97
104
const
void
*
MultiAssociationToolImpl::doConversion
(
const
void
* p)
105
{
106
if
(!p)
return
0;
107
const
void
* pp =
m_inputConverter
.convertUntyped (p);
108
if
(!pp) {
109
REPORT_MESSAGE
(MSG::WARNING)
110
<<
"Pointer conversion from "
<<
m_inputConverter
.srcName() <<
" to "
111
<<
m_inputConverter
.dstName() <<
"failed."
;
112
return
0;
113
}
114
return
pp;
115
}
116
117
118
}
// namespace D3PD
errorcheck.h
Helpers for checking error return status codes and reporting errors.
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:365
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
MultiAssociationToolImpl.h
Non-template parts of MultiAssociationTool.
D3PD::AddVariable::configureD3PD
StatusCode configureD3PD(IAddVariable *tree)
Configure the parent tree.
Definition
AddVariable.cxx:61
D3PD::AddVariable::AddVariable
AddVariable(const std::string &prefix, const std::string &blockName=s_emptyString)
Constructor.
Definition
AddVariable.cxx:29
D3PD::IAddVariable
Common interface for adding a variable to a tuple.
Definition
IAddVariable.h:70
D3PD::MultiAssociationToolImpl::doConversion
const void * doConversion(const void *p)
Helper to convert pointers to source objects.
Definition
MultiAssociationToolImpl.cxx:104
D3PD::MultiAssociationToolImpl::m_inputConverter
TypeConverter m_inputConverter
Helper to convert source object pointers.
Definition
MultiAssociationToolImpl.h:125
D3PD::MultiAssociationToolImpl::configureD3PD
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti)
Configure during initialization: type-check.
Definition
MultiAssociationToolImpl.cxx:51
D3PD::MultiAssociationToolImpl::book
virtual StatusCode book()
Create any needed tuple variables.
Definition
MultiAssociationToolImpl.cxx:92
D3PD::MultiAssociationToolImpl::configureMulti
StatusCode configureMulti(D3PD::IAddVariable *tree, const std::type_info &ti, const std::vector< const std::type_info * > &tis, size_t &which)
Configure during initialization: type-check.
Definition
MultiAssociationToolImpl.cxx:74
D3PD::MultiAssociationToolImpl::m_prefix
std::string m_prefix
Parameter: source object prefix.
Definition
MultiAssociationToolImpl.h:119
D3PD::MultiAssociationToolImpl::m_blockName
std::string m_blockName
Property: the name of this block.
Definition
MultiAssociationToolImpl.h:122
D3PD::MultiAssociationToolImpl::fromTypeinfo
virtual const std::type_info & fromTypeinfo() const =0
Return the std::type_info for the source of the association.
D3PD::MultiAssociationToolImpl::MultiAssociationToolImpl
MultiAssociationToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
MultiAssociationToolImpl.cxx:28
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
type
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0