ATLAS Offline Software
SelectionReadHandle.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 #ifndef SELECTION_HELPERS_SELECTION_READ_HANDLE_H
9 #define SELECTION_HELPERS_SELECTION_READ_HANDLE_H
10 
12 #include <memory>
13 
14 class StatusCode;
15 
16 namespace CP
17 {
18  class ISelectionReadAccessor;
19 
27 
28  class SelectionReadHandle final
29  {
30  //
31  // public interface
32  //
33 
35  public:
36  template<typename T2>
37  SelectionReadHandle (T2 *owner, const std::string& propertyName,
38  const std::string& propertyValue,
39  const std::string& propertyDescription);
40 
41 
43  public:
44  bool empty () const noexcept;
45 
47  public:
48  explicit operator bool () const noexcept;
49 
50 
52  public:
54 
55 
57  public:
58  bool getBool (const SG::AuxElement& element) const;
59 
60 
61 
62  //
63  // private interface
64  //
65 
67  private:
68  std::string m_selection;
69 
71  private:
73 
74  };
75 }
76 
77 #include "SelectionReadHandle.icc"
78 
79 #endif
CP::SelectionReadHandle::initialize
StatusCode initialize()
initialize the accessor
Definition: SelectionReadHandle.cxx:39
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::SelectionReadHandle::SelectionReadHandle
SelectionReadHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
standard constructor
CP::SelectionReadHandle::m_accessor
std::unique_ptr< ISelectionReadAccessor > m_accessor
the accessor we use
Definition: SelectionReadHandle.h:72
CP::SelectionReadHandle::empty
bool empty() const noexcept
whether we have a name configured
Definition: SelectionReadHandle.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SelectionReadHandle::getBool
bool getBool(const SG::AuxElement &element) const
get the selection as a bool
CP::SelectionReadHandle
a data handle for reading selection properties from objects
Definition: SelectionReadHandle.h:29
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
CP::ISelectionReadAccessor
a specialized accessor to read a selection decoration from/to an xAOD object
Definition: ISelectionReadAccessor.h:39
CP::SelectionReadHandle::m_selection
std::string m_selection
the selection we use
Definition: SelectionReadHandle.h:68
AuxElement.h
Base class for elements of a container that can have aux data.