ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
size
size_t size() const
Number of registered mappings.
TileAssocFillerTool.h
ASSOCCONTAINER
std::vector< std::vector< int > > ASSOCCONTAINER
Definition
TileAssocFillerTool.h:22
ASSOCCONTAINER_CONSTRUCTOR
#define ASSOCCONTAINER_CONSTRUCTOR(size)
Definition
TileAssocFillerTool.h:23
D3PD::BlockFillerTool< void >::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Definition
AddVariable.cxx:85
D3PD::BlockFillerTool< void >::BlockFillerTool
BlockFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
VoidBlockFillerTool.cxx:26
D3PD::TileAssocFillerTool::m_branchName
std::string m_branchName
Definition
TileAssocFillerTool.h:38
D3PD::TileAssocFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition
TileAssocFillerTool.cxx:46
D3PD::TileAssocFillerTool::TileAssocFillerTool
TileAssocFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TileAssocFillerTool.cxx:19
D3PD::TileAssocFillerTool::fill
virtual StatusCode fill()
Fill one block.
Definition
TileAssocFillerTool.cxx:56
D3PD::TileAssocFillerTool::m_containerName
std::string m_containerName
Definition
TileAssocFillerTool.h:39
D3PD::TileAssocFillerTool::m_container
ASSOCCONTAINER * m_container
Definition
TileAssocFillerTool.h:40
D3PD::TileAssocFillerTool::initialize
StatusCode initialize()
Definition
TileAssocFillerTool.cxx:34
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
std
STL namespace.
type
Generated on
for ATLAS Offline Software by
1.17.0