28 StatusCode SelectionNameSvc ::
32 return StatusCode::SUCCESS;
37 StatusCode SelectionNameSvc ::
38 addAcceptInfo (
const std::string& objectName,
const std::string& decorName,
41 ANA_MSG_DEBUG (
"adding selection " << decorName <<
" for object " << objectName);
43 if (subMap.find (objectName) != subMap.end())
45 ANA_MSG_ERROR (
"object " << objectName <<
" already has a selection named " << decorName);
46 return StatusCode::FAILURE;
48 subMap[objectName] = acceptInfo;
51 ANA_MSG_ERROR (
"failed to add selection " << decorName <<
" for object " << objectName);
52 return StatusCode::FAILURE;
54 return StatusCode::SUCCESS;
60 getAcceptInfo (
const std::string& objectName,
61 const std::string& decorName)
const
63 ANA_MSG_DEBUG (
"querying selection " << decorName <<
" for object " << objectName);
67 std::string myObjectName = objectName;
68 while (!myObjectName.empty())
70 auto result = subMap->second.find (myObjectName);
71 if (
result != subMap->second.end())
73 ANA_MSG_DEBUG (
"found selection " << decorName <<
" for object " << objectName <<
" using name " << myObjectName);
76 myObjectName =
m_sysSvc->getCopySource (myObjectName);
std::unordered_map< std::string, std::unordered_map< std::string, asg::AcceptInfo > > m_acceptInfoMap
the map of AcceptInfo objects
ServiceHandle< ISystematicsSvc > m_sysSvc
the ISystematicsSvc we use
virtual const asg::AcceptInfo * getAcceptInfo(const std::string &objectName, const std::string &decorName) const override
Select isolated Photons, Electrons and Muons.