ATLAS Offline Software
Loading...
Searching...
No Matches
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
7#include "Gaudi/Property.h"
8namespace DerivationFramework {
9
10
11AnyVertexSkimmingTool::AnyVertexSkimmingTool(const std::string& t, const std::string& n, const IInterface* p) : base_class(t,n,p)
12{}
13
15
17 ATH_CHECK(m_keyArray.initialize());
18 return StatusCode::SUCCESS;
19}
20
21bool AnyVertexSkimmingTool::eventPassesFilter(const EventContext& ctx) const{
22 bool pass = false;
23 for(auto key : m_keyArray){
24 ATH_MSG_DEBUG("Key Checking: " << key.key());
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
AnyVertexSkimmingTool(const std::string &, const std::string &, const IInterface *)
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_keyArray
virtual bool eventPassesFilter(const EventContext &ctx) const override
THE reconstruction tool.
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)