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

the SelectionAccesor for standard CP algorithm selection decorations encoded as bits More...

#include <SelectionWriteAccessorBits.h>

Inheritance diagram for CP::SelectionWriteAccessorBits:
Collaboration diagram for CP::SelectionWriteAccessorBits:

Public Member Functions

 SelectionWriteAccessorBits (const std::string &name)
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, ISysObjectHandleBase &objectHandle) override
 fill the systematic variations

Private Attributes

SG::Decorator< SelectionTypem_accessor
 the underlying accessor
std::string m_label
 the label of the accessor

Detailed Description

the SelectionAccesor for standard CP algorithm selection decorations encoded as bits

Definition at line 18 of file SelectionWriteAccessorBits.h.

Constructor & Destructor Documentation

◆ SelectionWriteAccessorBits()

CP::SelectionWriteAccessorBits::SelectionWriteAccessorBits ( const std::string & name)

Definition at line 24 of file SelectionWriteAccessorBits.cxx.

27 {}
SG::Decorator< SelectionType > m_accessor
the underlying accessor
std::string m_label
the label of the accessor

Member Function Documentation

◆ fillSystematics()

StatusCode CP::SelectionWriteAccessorBits::fillSystematics ( const ISystematicsSvc & svc,
const CP::SystematicSet & fullAffecting,
const std::vector< CP::SystematicSet > & sysList,
ISysObjectHandleBase & objectHandle )
overridevirtual

fill the systematic variations

Implements CP::ISelectionWriteAccessor.

Definition at line 62 of file SelectionWriteAccessorBits.cxx.

67 {
68 using namespace msgSelectionHelpers;
69
70 ANA_CHECK (svc.setDecorSystematics (objectHandle.getNamePattern(), m_label, fullAffecting));
71 ANA_CHECK (objectHandle.addDecorationDependency (svc, m_label, true));
72 return StatusCode::SUCCESS;
73 }
#define ANA_CHECK(EXP)
check whether the given expression was successful
AthROOTErrorHandlerSvc * svc

◆ label()

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

get the label of the accessor

Implements CP::ISelectionWriteAccessor.

Definition at line 54 of file SelectionWriteAccessorBits.cxx.

56 {
57 return m_label;
58 }

◆ setBits()

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

set the selection decoration

Implements CP::ISelectionWriteAccessor.

Definition at line 31 of file SelectionWriteAccessorBits.cxx.

35 {
36 m_accessor (element) = selection;
37 }
const std::string selection

◆ setBool()

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

set the selection decoration

Implements CP::ISelectionWriteAccessor.

Definition at line 41 of file SelectionWriteAccessorBits.cxx.

45 {
46 if (selection)
47 m_accessor (element) = selectionAccept();
48 else
49 m_accessor (element) = selectionAccept() ^ 0x1;
50 }
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected

Member Data Documentation

◆ m_accessor

SG::Decorator<SelectionType> CP::SelectionWriteAccessorBits::m_accessor
private

the underlying accessor

Definition at line 54 of file SelectionWriteAccessorBits.h.

◆ m_label

std::string CP::SelectionWriteAccessorBits::m_label
private

the label of the accessor

Definition at line 58 of file SelectionWriteAccessorBits.h.


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