ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkBPhys
src
AnyVertexSkimmingTool.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
#include "
AnyVertexSkimmingTool.h
"
6
#include "
xAODTracking/VertexContainer.h
"
7
#include "Gaudi/Property.h"
8
namespace
DerivationFramework
{
9
10
11
AnyVertexSkimmingTool::AnyVertexSkimmingTool
(
const
std::string& t,
const
std::string& n,
const
IInterface* p) : base_class(t,n,p)
12
{}
13
14
AnyVertexSkimmingTool::~AnyVertexSkimmingTool
() =
default
;
15
16
StatusCode
AnyVertexSkimmingTool::initialize
(){
17
ATH_CHECK
(
m_keyArray
.initialize());
18
return
StatusCode::SUCCESS;
19
}
20
21
bool
AnyVertexSkimmingTool::eventPassesFilter
(
const
EventContext& ctx)
const
{
22
bool
pass =
false
;
23
for
(
auto
key :
m_keyArray
){
24
ATH_MSG_DEBUG
(
"Key Checking: "
<< key.key());
25
SG::ReadHandle<xAOD::VertexContainer>
read
(key, ctx);
26
if
(!
read
.isValid()){
27
std::string
error
(
"AnyVertexSkimmingTool - Failed to retrieve : "
);
28
error
+= key.key();
29
throw
std::runtime_error(
error
);
30
}
31
if
(not
read
->empty()) pass |=
true
;
32
}
33
return
pass;
34
}
35
36
}
AnyVertexSkimmingTool.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
VertexContainer.h
DerivationFramework::AnyVertexSkimmingTool::AnyVertexSkimmingTool
AnyVertexSkimmingTool(const std::string &, const std::string &, const IInterface *)
Definition
AnyVertexSkimmingTool.cxx:11
DerivationFramework::AnyVertexSkimmingTool::m_keyArray
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_keyArray
Definition
AnyVertexSkimmingTool.h:21
DerivationFramework::AnyVertexSkimmingTool::initialize
StatusCode initialize() override
Definition
AnyVertexSkimmingTool.cxx:16
DerivationFramework::AnyVertexSkimmingTool::~AnyVertexSkimmingTool
~AnyVertexSkimmingTool()
DerivationFramework::AnyVertexSkimmingTool::eventPassesFilter
virtual bool eventPassesFilter(const EventContext &ctx) const override
Definition
AnyVertexSkimmingTool.cxx:21
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
DerivationFramework
THE reconstruction tool.
Definition
ParticleSortingAlg.h:24
error
Definition
IImpactPoint3dEstimator.h:70
read
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
Definition
openCoraCool.cxx:569
Generated on
for ATLAS Offline Software by
1.16.1