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

Merge branch 'AsgSelectionToolWrapper_moveto_ISelectionTool' into 'master'

use  ISelectionTool rather than IAsgSelectionTool

See merge request atlas/athena!16563

Former-commit-id: 3c741127
parents 95d76a2c e93f2885
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,8 @@ atlas_depends_on_subdirs( PUBLIC ...@@ -11,7 +11,8 @@ atlas_depends_on_subdirs( PUBLIC
Event/xAOD/xAODBase Event/xAOD/xAODBase
GaudiKernel GaudiKernel
PhysicsAnalysis/AnalysisCommon/PATCore PhysicsAnalysis/AnalysisCommon/PATCore
PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
Trigger/TrigAnalysis/TrigDecisionTool Trigger/TrigAnalysis/TrigDecisionTool
PRIVATE PRIVATE
Control/AthenaKernel Control/AthenaKernel
...@@ -25,11 +26,12 @@ atlas_add_library( DerivationFrameworkToolsLib ...@@ -25,11 +26,12 @@ atlas_add_library( DerivationFrameworkToolsLib
src/*.cxx src/*.cxx
PUBLIC_HEADERS DerivationFrameworkTools PUBLIC_HEADERS DerivationFrameworkTools
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib ExpressionEvaluationLib LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel PATCoreLib AsgAnalysisInterfaces TrigDecisionToolLib ExpressionEvaluationLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel ) PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
atlas_add_component( DerivationFrameworkTools atlas_add_component( DerivationFrameworkTools
src/components/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib AthenaKernel ExpressionEvaluationLib DerivationFrameworkToolsLib ) LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODBase GaudiKernel AsgAnalysisInterfaces PATCoreLib TrigDecisionToolLib AthenaKernel
ExpressionEvaluationLib DerivationFrameworkToolsLib )
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "AthenaBaseComps/AthAlgTool.h" #include "AthenaBaseComps/AthAlgTool.h"
#include "DerivationFrameworkInterfaces/IAugmentationTool.h" #include "DerivationFrameworkInterfaces/IAugmentationTool.h"
#include "PATCore/IAsgSelectionTool.h" #include "AsgAnalysisInterfaces/ISelectionTool.h"
#include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ToolHandle.h"
namespace DerivationFramework { namespace DerivationFramework {
...@@ -27,7 +27,7 @@ namespace DerivationFramework { ...@@ -27,7 +27,7 @@ namespace DerivationFramework {
virtual StatusCode addBranches() const; virtual StatusCode addBranches() const;
private: private:
ToolHandle<IAsgSelectionTool> m_tool; ToolHandle<CP::ISelectionTool> m_tool;
std::string m_cut; std::string m_cut;
std::string m_sgName; std::string m_sgName;
std::string m_containerName; std::string m_containerName;
......
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "DerivationFrameworkTools/AsgSelectionToolWrapper.h" #include "DerivationFrameworkTools/AsgSelectionToolWrapper.h"
#include "xAODBase/IParticleContainer.h" #include "xAODBase/IParticleContainer.h"
#include "PATCore/TAccept.h" #include "PATCore/AcceptData.h"
#include <vector> #include <vector>
#include <string> #include <string>
...@@ -59,18 +59,18 @@ namespace DerivationFramework { ...@@ -59,18 +59,18 @@ namespace DerivationFramework {
// Write mask for each element and record to SG for subsequent selection // Write mask for each element and record to SG for subsequent selection
for (xAOD::IParticleContainer::const_iterator pItr = particles->begin(); pItr!=particles->end(); ++pItr) { for (xAOD::IParticleContainer::const_iterator pItr = particles->begin(); pItr!=particles->end(); ++pItr) {
Root::TAccept theAccept(m_tool->accept(*pItr)); asg::AcceptData theAccept=m_tool->accept(*pItr);
if(m_cut==""){ if(m_cut==""){
bool pass_selection = (bool) theAccept; bool pass_selection = static_cast<bool>(theAccept);
if(pass_selection) decorator(**pItr) = 1; if(pass_selection) decorator(**pItr) = 1;
else decorator(**pItr) = 0; else decorator(**pItr) = 0;
} }
else{ else{
if (theAccept.getCutResult(m_cut)) { if (theAccept.getCutResult(m_cut)) {
decorator(**pItr) = 1; decorator(**pItr) = 1;
} else { } else {
decorator(**pItr) = 0; decorator(**pItr) = 0;
} }
} }
} }
......
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