ATLAS Offline Software
Loading...
Searching...
No Matches
CutTool.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// CutTool.cxx
8// Implementation file for class CutTool
9// Author: Karsten Koeneke <karsten.koeneke@cern.ch>
11
12// EventUtils includes
13#include "CutTool.h"
14
15// STL includes
16#include <vector>
17#include <string>
18
19// FrameWork includes
21
23// Public methods:
25
26// Constructors
28CutTool::CutTool( const std::string& type,
29 const std::string& name,
30 const IInterface* parent ) :
32{
33 declareInterface< DerivationFramework::ISkimmingTool >(this);
34}
35
36// Destructor
40
41
42
43// Athena algtool's Hooks
46{
47 ATH_MSG_DEBUG ("Initializing " << name() << "...");
48
49 if (!m_cut.value().empty()) {
51 }
52
53 return StatusCode::SUCCESS;
54}
55
56
57
59{
60 ATH_MSG_DEBUG ("Finalizing " << name() << "...");
61
63 return StatusCode::SUCCESS;
64}
65
66
67
68// Implement the method from the ISkimmingTool interface
70{
71 ATH_MSG_DEBUG ( "==> eventPassesFilter() " << name() );
72 ATH_MSG_VERBOSE ( "Dumping event store: " << evtStore()->dump() );
73
74 return (m_parser ? m_parser->evaluateAsBool() : true);
75}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
ServiceHandle< StoreGateSvc > & evtStore()
virtual StatusCode initialize() override
Athena algtool's initialize.
Definition CutTool.cxx:45
CutTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition CutTool.cxx:28
virtual bool eventPassesFilter() const final override
Implement the method from the ISkimmingTool interface.
Definition CutTool.cxx:69
virtual StatusCode finalize() override
Athena algtool's finalize.
Definition CutTool.cxx:58
StringProperty m_cut
The cut string.
Definition CutTool.h:58
virtual ~CutTool()
Destructor:
Definition CutTool.cxx:38
std::conditional< 1==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, 1 > >::type m_parser
StatusCode initializeParser(ExpressionParsing::SelectionArg< 1 > selection_string)
-event-from-file