Skip to content
Snippets Groups Projects
Commit cef7b0ce authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'lheinric_20_Apr_DerivationFrameworkInterfaces_to_master' into 'master'

Update packages:DerivationFrameworkInterfaces  from upstream/21.2 to...

See merge request atlas/athena!32179
parents f91c9ff8 fb4f1141
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,11 @@
atlas_subdir( DerivationFrameworkInterfaces )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel )
atlas_depends_on_subdirs(
PUBLIC
GaudiKernel
Control/StoreGate
PhysicsAnalysis/CommonTools/ExpressionEvaluation )
# Component(s) in the package:
atlas_add_library( DerivationFrameworkInterfaces
......@@ -16,7 +19,9 @@ atlas_add_library( DerivationFrameworkInterfaces
PUBLIC_HEADERS DerivationFrameworkInterfaces
LINK_LIBRARIES GaudiKernel )
atlas_add_dictionary( DerivationFrameworkInterfacesDict
DerivationFrameworkInterfaces/DerivationFrameworkInterfacesDict.h
DerivationFrameworkInterfaces/selection.xml
LINK_LIBRARIES DerivationFrameworkInterfaces )
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef DERIVATIONFRAMEWORKINTERFACES_EXPRESSIONPARSERHELPER_H
#define DERIVATIONFRAMEWORKINTERFACES_EXPRESSIONPARSERHELPER_H
// Framework include(s):
#include "GaudiKernel/ServiceHandle.h"
#include "StoreGate/StoreGateSvc.h"
// Expression parsing include(s):
#include "ExpressionEvaluation/SGxAODProxyLoader.h"
#include "ExpressionEvaluation/SGNTUPProxyLoader.h"
#include "ExpressionEvaluation/MultipleProxyLoader.h"
#include "ExpressionEvaluation/ExpressionParser.h"
namespace DerivationFramework {
/// Helper class for using @c ExpressionParsing::ExpressionParser
///
/// Since the correct memory management for
/// @c ExpressionParsing::ExpressionParser is not so trivial, instead of
/// implementing that individually in every DF class that uses it, would
/// not be a too good design. Instead each DF class should migrate to using
/// this helper class to avoid memory leaks coming from the expression
/// parsing code.
///
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
class ExpressionParserHelper {
public:
/// Default constructor
ExpressionParserHelper( ServiceHandle< StoreGateSvc >& evtStore )
: m_xaodLoader( evtStore ), m_ntupLoader( evtStore ),
m_proxyLoader({&m_xaodLoader, &m_ntupLoader}), m_parser( &m_proxyLoader ) {
}
/// Return a reference to the expression parser
ExpressionParsing::ExpressionParser& parser() {
return m_parser;
}
private:
/// The xAOD proxy loader
ExpressionParsing::SGxAODProxyLoader m_xaodLoader;
/// The ntuple variable proxy loader
ExpressionParsing::SGNTUPProxyLoader m_ntupLoader;
/// The multiple proxy loader
ExpressionParsing::MultipleProxyLoader m_proxyLoader;
/// The main expression parser object
ExpressionParsing::ExpressionParser m_parser;
}; // class ExpressionParserHelper
} // namespace DerivationFramework
#endif // DERIVATIONFRAMEWORKINTERFACES_EXPRESSIONPARSERHELPER_H
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef DerivationFrameworkInterfaces_IForwardParentThinningTool_H
#define DerivationFrameworkInterfaces_IForwardParentThinningTool_H
// athena includes
#include "GaudiKernel/IAlgTool.h"
// EDM includes
#include "xAODBase/IParticleContainer.h"
/**
* @class IForwardParentThinningTool
* @brief Interface class for tools that thin low-level objects based on a
* selection on associated high-level objects.
*
* @author Jon Burr
*/
class IForwardParentThinningTool : virtual public IAlgTool {
public:
/// AlgTool interface ID
DeclareInterfaceID(IForwardParentThinningTool, 1, 0);
/// Virtual destructor
virtual ~IForwardParentThinningTool() {}
/// Forward the thinning from the parent particles
virtual StatusCode forwardParentThinning(
const xAOD::IParticleContainer* parent,
const std::vector<bool>& mask) const = 0;
};
#endif //> !DerivationFrameworkInterfaces_IForwardParentThinningTool_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment