ATLAS Offline Software
Loading...
Searching...
No Matches
CP::SelectionWriteAccessorInvert Class Referencefinal

the SelectionAccesor for inverting a selection decoration More...

#include <SelectionWriteAccessorInvert.h>

Inheritance diagram for CP::SelectionWriteAccessorInvert:
Collaboration diagram for CP::SelectionWriteAccessorInvert:

Public Member Functions

 SelectionWriteAccessorInvert (std::unique_ptr< ISelectionWriteAccessor > val_base)
virtual void setBits (const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet *sys) const override
 set the selection decoration
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
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

Private Attributes

std::unique_ptr< ISelectionWriteAccessorm_base
 the base selection accessors I invert

Detailed Description

the SelectionAccesor for inverting a selection decoration

Definition at line 20 of file SelectionWriteAccessorInvert.h.

Constructor & Destructor Documentation

◆ SelectionWriteAccessorInvert()

CP::SelectionWriteAccessorInvert::SelectionWriteAccessorInvert ( std::unique_ptr< ISelectionWriteAccessor > val_base)

Definition at line 22 of file SelectionWriteAccessorInvert.cxx.

24 : m_base (std::move (val_base))
25 {}
std::unique_ptr< ISelectionWriteAccessor > m_base
the base selection accessors I invert

Member Function Documentation

◆ fillSystematics()

StatusCode CP::SelectionWriteAccessorInvert::fillSystematics ( const ISystematicsSvc & svc,
const CP::SystematicSet & fullAffecting,
const std::vector< CP::SystematicSet > & sysList,
const std::string & objectName )
overridevirtual

fill the systematic variations

Implements CP::ISelectionWriteAccessor.

Definition at line 57 of file SelectionWriteAccessorInvert.cxx.

62 {
63 return m_base->fillSystematics (svc, fullAffecting, sysList, objectName);
64 }

◆ label()

std::string CP::SelectionWriteAccessorInvert::label ( ) const
overridevirtual

get the label of the accessor

Implements CP::ISelectionWriteAccessor.

Definition at line 49 of file SelectionWriteAccessorInvert.cxx.

51 {
52 return m_base->label() + ",invert";
53 }

◆ setBits()

void CP::SelectionWriteAccessorInvert::setBits ( const SG::AuxElement & element,
SelectionType selection,
const CP::SystematicSet * sys ) const
overridevirtual

set the selection decoration

Implements CP::ISelectionWriteAccessor.

Definition at line 29 of file SelectionWriteAccessorInvert.cxx.

33 {
34 m_base->setBool (element, selection != selectionAccept(), sys);
35 }
const std::string selection
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected

◆ setBool()

void CP::SelectionWriteAccessorInvert::setBool ( const SG::AuxElement & element,
bool selection,
const CP::SystematicSet * sys ) const
overridevirtual

set the selection decoration

Implements CP::ISelectionWriteAccessor.

Definition at line 39 of file SelectionWriteAccessorInvert.cxx.

43 {
44 m_base->setBool (element, !selection, sys);
45 }

Member Data Documentation

◆ m_base

std::unique_ptr<ISelectionWriteAccessor> CP::SelectionWriteAccessorInvert::m_base
private

the base selection accessors I invert

Definition at line 56 of file SelectionWriteAccessorInvert.h.


The documentation for this class was generated from the following files: