![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
29 ISvcLocator* pSvcLocator)
30 : AsgService (
name, pSvcLocator)
33 declareServiceInterface<ISelectionNameSvc>();
42 return StatusCode::SUCCESS;
48 addAcceptInfo (
const std::string& objectName,
const std::string& decorName,
51 ANA_MSG_DEBUG (
"adding selection " << decorName <<
" for object " << objectName);
53 if (subMap.find (objectName) != subMap.end())
55 ANA_MSG_ERROR (
"object " << objectName <<
" already has a selection named " << decorName);
56 return StatusCode::FAILURE;
58 subMap[objectName] = acceptInfo;
61 ANA_MSG_ERROR (
"failed to add selection " << decorName <<
" for object " << objectName);
62 return StatusCode::FAILURE;
64 return StatusCode::SUCCESS;
71 const std::string& decorName)
const
73 ANA_MSG_DEBUG (
"querying selection " << decorName <<
" for object " << objectName);
77 std::string myObjectName = objectName;
78 while (!myObjectName.empty())
80 auto result = subMap->second.find (myObjectName);
81 if (
result != subMap->second.end())
83 ANA_MSG_DEBUG (
"found selection " << decorName <<
" for object " << objectName <<
" using name " << myObjectName);
86 myObjectName =
m_sysSvc->getCopySource (myObjectName);
Select isolated Photons, Electrons and Muons.
ServiceHandle< ISystematicsSvc > m_sysSvc
the ISystematicsSvc we use
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const asg::AcceptInfo * getAcceptInfo(const std::string &objectName, const std::string &decorName) const override
std::unordered_map< std::string, std::unordered_map< std::string, asg::AcceptInfo > > m_acceptInfoMap
the map of AcceptInfo objects
virtual StatusCode addAcceptInfo(const std::string &objectName, const std::string &decorName, const asg::AcceptInfo &acceptInfo) override
virtual StatusCode initialize() override
set up/tear down functions
SelectionNameSvc(const std::string &name, ISvcLocator *pSvcLocator)
standard constructor