ATLAS Offline Software
Loading...
Searching...
No Matches
TileL2FillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * File: TileL2FillerTool.cxx
7 * Author: Stephen Cole <stephen.cole@cern.ch>
8 *
9 * Created on January 12, 2012, 4:50 PM
10 */
11
12#include "TileL2FillerTool.h"
13#include "GaudiKernel/MsgStream.h"
14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/StatusCode.h"
17
18using namespace std;
19
20namespace D3PD{
21
23 const string& name, const IInterface* parent):
24 BlockFillerTool<TileL2>(type,name,parent)
25{
26 m_saveL2 = true;
27 m_saveMuROD = true;
28 TileL2FillerTool::book().ignore(); // Avoid coverity warnings
29
30 declareProperty("SaveL2Details", m_saveL2 = true);
31 declareProperty("SaveMuRODDetails", m_saveMuROD = false);
32}
33
36
38 if(m_saveL2){
39 CHECK(addVariable("Ex",m_Ex));
40 CHECK(addVariable("Ey",m_Ey));
41 CHECK(addVariable("Ez",m_Ez));
42 CHECK(addVariable("ScalarEt",m_sumEt));
43 CHECK(addVariable("ScalarEz",m_sumEz));
44 CHECK(addVariable("ScalarE",m_sumE));
45 }
46 if(m_saveMuROD){
47 CHECK(addVariable("ROD_Eta",m_eta));
48 CHECK(addVariable("ROD_Phi",m_phi));
49 CHECK(addVariable("ROD_EnergyDep0",m_energy0));
50 CHECK(addVariable("ROD_EnergyDep1",m_energy1));
51 CHECK(addVariable("ROD_EnergyDep2",m_energy2));
52 CHECK(addVariable("ROD_EnergyDepNeighbors",m_energy3));
53 CHECK(addVariable("ROD_Quality",m_quality));
54 }
55
56 return StatusCode::SUCCESS;
57}
58
59StatusCode TileL2FillerTool::fill(const TileL2& p){
60 if(m_saveL2){
61 *m_Ex=p.Ex();
62 *m_Ey=p.Ey();
63 *m_Ez=p.Ez();
64 *m_sumEt=p.sumEt();
65 *m_sumEz=p.sumEz();
66 *m_sumE=p.sumE();
67 }
68 if(m_saveMuROD){
69 for(size_t i=0;i<p.NMuons();++i){
70 m_eta->push_back(p.eta(i));
71 m_phi->push_back(p.phi(i));
72 m_energy0->push_back(p.enemu0(i));
73 m_energy1->push_back(p.enemu1(i));
74 m_energy2->push_back(p.enemu2(i));
75 m_quality->push_back(p.qual(i));
76 }
77 }
78
79 return StatusCode::SUCCESS;
80}
81
82}
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
std::vector< float > * m_energy2
std::vector< float > * m_phi
virtual StatusCode fill(const TileL2 &p)
Fill one block — type-safe version.
std::vector< float > * m_energy1
TileL2FillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
std::vector< float > * m_energy3
std::vector< float > * m_energy0
virtual StatusCode book()
Declare tuple variables.
std::vector< unsigned int > * m_quality
std::vector< float > * m_eta
Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs.
Definition TileL2.h:33
Block filler tool for noisy FEB information.
STL namespace.