ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::AnyVertexSkimmingTool Class Reference

#include <AnyVertexSkimmingTool.h>

Inheritance diagram for DerivationFramework::AnyVertexSkimmingTool:
Collaboration diagram for DerivationFramework::AnyVertexSkimmingTool:

Public Member Functions

 AnyVertexSkimmingTool (const std::string &, const std::string &, const IInterface *)
StatusCode initialize () override
virtual bool eventPassesFilter (const EventContext &ctx) const override
 ~AnyVertexSkimmingTool ()

Private Attributes

SG::ReadHandleKeyArray< xAOD::VertexContainerm_keyArray {this, "VertexContainerNames", {} }

Detailed Description

Definition at line 14 of file AnyVertexSkimmingTool.h.

Constructor & Destructor Documentation

◆ AnyVertexSkimmingTool()

DerivationFramework::AnyVertexSkimmingTool::AnyVertexSkimmingTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 11 of file AnyVertexSkimmingTool.cxx.

11 : base_class(t,n,p)
12{}

◆ ~AnyVertexSkimmingTool()

DerivationFramework::AnyVertexSkimmingTool::~AnyVertexSkimmingTool ( )
default

Member Function Documentation

◆ eventPassesFilter()

bool DerivationFramework::AnyVertexSkimmingTool::eventPassesFilter ( const EventContext & ctx) const
overridevirtual

Definition at line 21 of file AnyVertexSkimmingTool.cxx.

21 {
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}
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKeyArray< xAOD::VertexContainer > m_keyArray
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)

◆ initialize()

StatusCode DerivationFramework::AnyVertexSkimmingTool::initialize ( )
override

Definition at line 16 of file AnyVertexSkimmingTool.cxx.

16 {
17 ATH_CHECK(m_keyArray.initialize());
18 return StatusCode::SUCCESS;
19}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_keyArray

SG::ReadHandleKeyArray<xAOD::VertexContainer> DerivationFramework::AnyVertexSkimmingTool::m_keyArray {this, "VertexContainerNames", {} }
private

Definition at line 21 of file AnyVertexSkimmingTool.h.

21{this, "VertexContainerNames", {} };

The documentation for this class was generated from the following files: