|
ATLAS Offline Software
|
Go to the documentation of this file.
25 : m_selectionName (val_selectionName)
36 throw std::logic_error (
"trying to write systematics accessor without systematic");
39 throw std::logic_error (
"unknown systematic: " +
sys->name());
40 return std::get<1>(iter->second)->setBits (element,
selection,
sys);
51 throw std::logic_error (
"trying to write systematics accessor without systematic");
54 throw std::logic_error (
"unknown systematic: " +
sys->name());
55 return std::get<1>(iter->second)->setBool (element,
selection,
sys);
71 const std::vector<CP::SystematicSet>& sysList,
72 const std::string& objectName)
74 using namespace msgSelectionHelpers;
78 if (
auto split = baseName.find (
',');
79 split != std::string::npos)
82 baseName.resize (
split);
85 for (
auto&
sys : sysList)
87 std::string decorName;
89 ANA_MSG_DEBUG (
"SelectionWriteAccessorSys: " << decorName <<
" (" <<
sys.name() <<
")");
90 std::unique_ptr<ISelectionWriteAccessor>
accessor;
94 ANA_CHECK (
svc.setDecorSystematics (objectName, baseName, fullAffecting));
95 return StatusCode::SUCCESS;
std::string m_selectionName
the selectionName for this accessor
the interface for the central systematics service
Base class for elements of a container that can have aux data.
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Class to wrap a set of SystematicVariations.
StatusCode makeSelectionWriteAccessor(const std::string &name, std::unique_ptr< ISelectionWriteAccessor > &accessor, bool defaultToChar)
Produces a simple ISelectionWriteAccessor accessing the given decoration.
Select isolated Photons, Electrons and Muons.
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList, const std::string &objectName) override
fill the systematic variations
virtual void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet *sys) const override
set the selection decoration
SelectionWriteAccessorSys(const std::string &val_selectionName)
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet *sys) const override
set the selection decoration
virtual std::string label() const override
get the label of the accessor
AthROOTErrorHandlerSvc * svc
std::unordered_map< CP::SystematicSet, std::tuple< std::string, std::unique_ptr< ISelectionWriteAccessor > > > m_dataCache
the map of accessor we use
const std::string selection
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.