ATLAS Offline Software
PhysicsAnalysis
D3PDMaker
TileD3PDMaker
src
TileAssocFillerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
* File: TileAssocTrackClusters.cxx
7
* Author: Carlos.Solans@cern.ch
8
* June 2014
9
* Implementation of a VoidBlockFillerTool
10
* PhysicsAnalysis/D3PDMaker/D3PDMakerUtils
11
*/
12
13
#include "
TileAssocFillerTool.h
"
14
15
using namespace
std;
16
using namespace
D3PD
;
17
18
//====================================================================
19
TileAssocFillerTool::TileAssocFillerTool(
const
string
&
type
,
const
string
&
name
,
const
IInterface*
parent
):
20
BlockFillerTool
<void>(
type
,
name
,
parent
){
21
//====================================================================
22
23
/* ContainerName string storegate key that contains the association to be writen to D3PD
24
* BrachName string name of the branch used for the association prepended with target and prefix
25
*/
26
declareProperty(
"ContainerName"
,
m_containerName
=
"AssociationKey"
);
27
declareProperty(
"BranchName"
,
m_branchName
=
"_index"
);
28
29
/* I have no idea what is this for */
30
TileAssocFillerTool::book
().ignore();
// Avoid coverity warnings
31
}
32
33
//=====================================================
34
StatusCode
TileAssocFillerTool::initialize
(){
35
//=====================================================
36
/* Initialize the tool by calling the parent */
37
CHECK
(
BlockFillerTool<void>::initialize
() );
38
39
/* Create the object that will contain the association */
40
m_container
=
new
ASSOCCONTAINER_CONSTRUCTOR
(0);
41
42
return
StatusCode::SUCCESS;
43
}
44
45
//=====================================================
46
StatusCode
TileAssocFillerTool::book
(){
47
//=====================================================
48
49
/* Register the association object in the D3PD */
50
CHECK
(
addVariable
(
m_branchName
,
m_container
));
51
52
return
StatusCode::SUCCESS;
53
}
54
55
//=====================================================================
56
StatusCode
TileAssocFillerTool::fill
(){
57
//=====================================================================
58
59
/* Get the association from storegate */
60
ASSOCCONTAINER
* cont;
61
CHECK
( evtStore()->
retrieve
(cont,
m_containerName
));
62
63
/* Copy the association to the local variable for the D3PD */
64
m_container
->clear();
65
m_container
->resize(cont->size());
66
for
(
unsigned
int
i
=0;
i
< cont->size();
i
++){
67
//cppcheck-suppress containerOutOfBounds
68
m_container
->at(
i
).resize(cont->at(
i
).size());
69
for
(
unsigned
int
j=0; j< cont->at(
i
).
size
(); j++){
70
//cppcheck-suppress containerOutOfBounds
71
m_container
->at(
i
).at(j)=cont->at(
i
).at(j);
72
}
73
}
74
75
/* Association object will be written to the D3PD after this */
76
77
return
StatusCode::SUCCESS;
78
}
79
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition:
PyKernel.py:110
TileAssocFillerTool.h
ASSOCCONTAINER_CONSTRUCTOR
#define ASSOCCONTAINER_CONSTRUCTOR(size)
Definition:
TileAssocFillerTool.h:23
D3PD::TileAssocFillerTool::m_containerName
std::string m_containerName
Definition:
TileAssocFillerTool.h:39
D3PD::AddVariable::addVariable
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.
Definition:
AddVariable.cxx:85
python.setupRTTAlg.size
int size
Definition:
setupRTTAlg.py:39
D3PD
Block filler tool for noisy FEB information.
Definition:
CaloCellDetailsFillerTool.cxx:29
D3PD::TileAssocFillerTool::book
virtual StatusCode book()
Definition:
TileAssocFillerTool.cxx:46
D3PD::TileAssocFillerTool::m_container
ASSOCCONTAINER * m_container
Definition:
TileAssocFillerTool.h:40
lumiFormat.i
int i
Definition:
lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition:
BlockFillerTool.h:65
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition:
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::TileAssocFillerTool::m_branchName
std::string m_branchName
Definition:
TileAssocFillerTool.h:38
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
D3PD::TileAssocFillerTool::initialize
StatusCode initialize()
Definition:
TileAssocFillerTool.cxx:34
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
D3PD::TileAssocFillerTool::fill
virtual StatusCode fill()
Fill one block — type-safe version.
Definition:
TileAssocFillerTool.cxx:56
ASSOCCONTAINER
std::vector< std::vector< int > > ASSOCCONTAINER
Definition:
TileAssocFillerTool.h:22
Generated on Sun Dec 22 2024 21:19:35 for ATLAS Offline Software by
1.8.18