ATLAS Offline Software
Loading...
Searching...
No Matches
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
15using namespace std;
16using namespace D3PD;
17
18//====================================================================
19TileAssocFillerTool::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//=====================================================
35//=====================================================
36 /* Initialize the tool by calling the parent */
38
39 /* Create the object that will contain the association */
41
42 return StatusCode::SUCCESS;
43}
44
45//=====================================================
47//=====================================================
48
49 /* Register the association object in the D3PD */
51
52 return StatusCode::SUCCESS;
53}
54
55//=====================================================================
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
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< std::vector< int > > ASSOCCONTAINER
#define ASSOCCONTAINER_CONSTRUCTOR(size)
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
BlockFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual StatusCode book()
Declare tuple variables.
TileAssocFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode fill()
Fill one block — type-safe version.
Block filler tool for noisy FEB information.
STL namespace.