ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
EventCommonD3PDMaker
src
EventErrorStateFillerTool.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$
12
13
14
#include "
EventErrorStateFillerTool.h
"
15
#include "
EventFlagNames.h
"
16
#include "
xAODEventInfo/EventInfo.h
"
17
#include "
AthenaKernel/errorcheck.h
"
18
#include <string>
19
#include <cassert>
20
21
using
xAOD::EventInfo
;
22
23
namespace
D3PD
{
24
25
32
EventErrorStateFillerTool::EventErrorStateFillerTool
33
(
const
std::string&
type
,
34
const
std::string& name,
35
const
IInterface* parent)
36
:
BlockFillerTool
<
EventInfo
> (
type
, name, parent)
37
{
38
}
39
40
44
StatusCode
EventErrorStateFillerTool::book
()
45
{
46
m_errs
.resize (
EventInfo::nDets
);
47
for
(
size_t
i = 0; i <
nEventFlagNames
; i++) {
48
unsigned
int
flag =
eventFlagNames
[i].m_flag;
49
assert (flag <
m_errs
.size());
50
std::string name =
eventFlagNames
[i].m_name;
51
name +=
"Error"
;
52
CHECK
(
addVariable
(name,
m_errs
[flag]) );
53
}
54
return
StatusCode::SUCCESS;
55
}
56
57
58
StatusCode
EventErrorStateFillerTool::fill
(
const
EventInfo
& p)
59
{
60
for
(
size_t
i = 0; i <
m_errs
.size(); i++) {
61
if
(
m_errs
[i])
62
*
m_errs
[i] = p.errorState(
static_cast<
EventInfo::EventFlagSubDet
>
(i));
63
}
64
return
StatusCode::SUCCESS;
65
}
66
67
68
}
// namespace D3PD
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EventErrorStateFillerTool.h
Block filler tool for event error state from EventInfo.
EventFlagNames.h
Assign names to subdet symbols used in EventID.
D3PD::BlockFillerTool< xAOD::EventInfo >::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
Type-safe wrapper for block filler tools.
Definition
BlockFillerTool.h:65
D3PD::EventErrorStateFillerTool::EventErrorStateFillerTool
EventErrorStateFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
EventErrorStateFillerTool.cxx:33
D3PD::EventErrorStateFillerTool::book
virtual StatusCode book()
Book variables for this block.
Definition
EventErrorStateFillerTool.cxx:44
D3PD::EventErrorStateFillerTool::m_errs
std::vector< unsigned int * > m_errs
Definition
EventErrorStateFillerTool.h:62
D3PD::EventErrorStateFillerTool::fill
virtual StatusCode fill(const xAOD::EventInfo &p)
Fill one block — type-safe version.
Definition
EventErrorStateFillerTool.cxx:58
xAOD::EventInfo_v1::EventFlagSubDet
EventFlagSubDet
Sub-detector types for which we store event-level flags.
Definition
EventInfo_v1.h:331
xAOD::EventInfo_v1::nDets
@ nDets
Number of sub-detector type in this enumeration.
Definition
EventInfo_v1.h:342
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
D3PD::eventFlagNames
static const EventFlagNames eventFlagNames[]
Definition
EventFlagNames.h:31
D3PD::nEventFlagNames
static constexpr size_t nEventFlagNames
Definition
EventFlagNames.h:42
EventInfo
Definition
EventInfo.py:1
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
type
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0