ATLAS Offline Software
MBTSTimeFillerTool.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$
14 #include "MBTSTimeFillerTool.h"
17 
18 
19 namespace D3PD {
20 
21 
29  (const std::string& type,
30  const std::string& name,
31  const IInterface* parent)
32  : BlockFillerTool<void> (type, name, parent),
33  m_timetool ("MBTSTimeFilterTool")
34 {
35  declareProperty ("TimeTool", m_timetool,
36  "Tool to calculate MBTS times.");
37 
38  book().ignore(); // Avoid coverity warnings
39 }
40 
41 
46 {
47  CHECK( m_timetool.retrieve() );
48  return StatusCode::SUCCESS;
49 }
50 
51 
56 {
57  CHECK( addVariable ("timeDiff", m_timeDiff,
58  "MBTS A-C time difference.") );
59  CHECK( addVariable ("timeA", m_timeA,
60  "MBTS A-side time.") );
61  CHECK( addVariable ("timeC", m_timeC,
62  "MBTS C-side time.") );
63  CHECK( addVariable ("countA", m_countA,
64  "Number of A-side MBTS counters used for time.") );
65  CHECK( addVariable ("countC", m_countC,
66  "Number of C-side MBTS counters used for time.") );
67 
68  return StatusCode::SUCCESS;
69 }
70 
71 
76 {
77  TimingFilterInformation time_info;
78  CHECK( m_timetool->getTimeDifference (time_info) );
79  *m_timeDiff = time_info.timeDiff;
80  *m_timeA = time_info.timeA;
81  *m_timeC = time_info.timeC;
82  *m_countA = time_info.ncellA;
83  *m_countC = time_info.ncellC;
84  return StatusCode::SUCCESS;
85 }
86 
87 
88 } // namespace D3PD
D3PD::MBTSTimeFillerTool::m_timetool
ToolHandle< MBTSTimeFilterTool > m_timetool
Property: The tool to calculate the time information.
Definition: MBTSTimeFillerTool.h:58
TimingFilterInformation
Simple helper struct used to obtain the timing information by the IMBTSTimeFilter and ICaloTimerFilte...
Definition: TimingFilterInformation.h:10
TimingFilterInformation::ncellA
int ncellA
Definition: TimingFilterInformation.h:20
D3PD::MBTSTimeFillerTool::m_timeC
float * m_timeC
Variable: MBTS C-side time.
Definition: MBTSTimeFillerTool.h:67
MBTSTimeFilterTool.h
D3PD::MBTSTimeFillerTool::MBTSTimeFillerTool
MBTSTimeFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: MBTSTimeFillerTool.cxx:29
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
D3PD::MBTSTimeFillerTool::m_timeA
float * m_timeA
Variable: MBTS A-side time.
Definition: MBTSTimeFillerTool.h:64
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
TimingFilterInformation::ncellC
int ncellC
Definition: TimingFilterInformation.h:21
TimingFilterInformation::timeDiff
double timeDiff
Definition: TimingFilterInformation.h:14
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:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::MBTSTimeFillerTool::m_countC
int * m_countC
Variable: Number of C-side MBTS counters used for time.
Definition: MBTSTimeFillerTool.h:73
D3PD::MBTSTimeFillerTool::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: MBTSTimeFillerTool.cxx:45
D3PD::MBTSTimeFillerTool::m_timeDiff
float * m_timeDiff
Variable: MBTS A-C time difference.
Definition: MBTSTimeFillerTool.h:61
D3PD::MBTSTimeFillerTool::m_countA
int * m_countA
Variable: Number of A-side MBTS counters used for time.
Definition: MBTSTimeFillerTool.h:70
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
D3PD::MBTSTimeFillerTool::fill
virtual StatusCode fill() override
Fill one block — type-safe version.
Definition: MBTSTimeFillerTool.cxx:75
D3PD::MBTSTimeFillerTool::book
virtual StatusCode book() final
Book variables for this block.
Definition: MBTSTimeFillerTool.cxx:55
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TimingFilterInformation::timeA
double timeA
Definition: TimingFilterInformation.h:16
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
MBTSTimeFillerTool.h
TimingFilterInformation::timeC
double timeC
Definition: TimingFilterInformation.h:18