ATLAS Offline Software
AsgViewFromSelectionAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef ASG_ANALYSIS_ALGORITHMS__ASG_VIEW_FROM_SELECTION_ALG_H
10 #define ASG_ANALYSIS_ALGORITHMS__ASG_VIEW_FROM_SELECTION_ALG_H
11 
19 #include <limits>
20 
21 namespace CP
22 {
30 
32  {
34  public:
36  StatusCode initialize () override;
37  StatusCode execute () override;
38 
39 
41  private:
43 
45  private:
47  this, "input", "", "the input collection to run on"};
48 
50  private:
52  this, "output", "", "the output view container to produce"};
53 
56  private:
57  Gaudi::Property<std::vector<std::string>> m_selection {this, "selection", {}, "the list of selection decorations"};
58 
59  private:
60  Gaudi::Property<std::vector<SelectionType>> m_ignore {this, "ignore", {}, "the list of cuts to *ignore* for each selection"};
61 
63  private:
64  Gaudi::Property<bool> m_sortPt {this, "sortPt", false, "whether to sort objects in pt"};
65 
67  private:
68  Gaudi::Property<bool> m_allowMissing {this, "allowMissing", false, "Allow the input container to be missing"};
69 
71  private:
72  Gaudi::Property<bool> m_deepCopy {this, "deepCopy", false, "perform a deep copy"};
73 
74  private:
75  Gaudi::Property<std::size_t> m_sizeLimit {this, "sizeLimit", std::numeric_limits<std::size_t>::max(), "the limit on the size of the output container"};
76 
78  private:
79  std::vector<std::pair<std::unique_ptr<ISelectionReadAccessor>,SelectionType> > m_accessors;
80 
82  private:
83  template<typename Type> StatusCode
85 
87  private:
89 
91  private:
93 
94  private:
96  };
97 }
98 
99 #endif
CP::AsgViewFromSelectionAlg::m_selection
Gaudi::Property< std::vector< std::string > > m_selection
Definition: AsgViewFromSelectionAlg.h:57
PropertyWrapper.h
CP::AsgViewFromSelectionAlg::m_inputHandle
SysReadHandle< xAOD::IParticleContainer > m_inputHandle
the input collection we run on
Definition: AsgViewFromSelectionAlg.h:46
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition: SysListHandle.h:33
max
#define max(a, b)
Definition: cfImp.cxx:41
CP::AsgViewFromSelectionAlg::initialize
StatusCode initialize() override
Definition: AsgViewFromSelectionAlg.cxx:178
CP::AsgViewFromSelectionAlg::m_ignore
Gaudi::Property< std::vector< SelectionType > > m_ignore
Definition: AsgViewFromSelectionAlg.h:60
CP::AsgViewFromSelectionAlg::m_allowMissing
Gaudi::Property< bool > m_allowMissing
Allow the input container to be missing.
Definition: AsgViewFromSelectionAlg.h:68
CP::SysWriteHandle
a data handle for writing systematics varied input data
Definition: SysWriteHandle.h:31
SysListHandle.h
CP::AsgViewFromSelectionAlg::executeMissing
StatusCode executeMissing(const CP::SystematicSet &sys)
The version of execute for missing input containers.
Definition: AsgViewFromSelectionAlg.cxx:169
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition: SelectionHelpers.h:26
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::AsgViewFromSelectionAlg::executeFindType
StatusCode executeFindType(const CP::SystematicSet &sys)
the version of execute to find the type
Definition: AsgViewFromSelectionAlg.cxx:105
CP::AsgViewFromSelectionAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: AsgViewFromSelectionAlg.h:42
CP::SysReadHandle
a data handle for reading systematics varied input data
Definition: SysReadHandle.h:32
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition: AnaAlgorithm.cxx:40
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
SysReadHandle.h
CP::AsgViewFromSelectionAlg::m_outputHandle
SysWriteHandle< xAOD::IParticleContainer > m_outputHandle
the output view container we produce
Definition: AsgViewFromSelectionAlg.h:51
SysWriteHandle.h
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
CP::AsgViewFromSelectionAlg::m_sortPt
Gaudi::Property< bool > m_sortPt
Sort the output (view) container by pT.
Definition: AsgViewFromSelectionAlg.h:64
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IParticleContainer.h
CP::AsgViewFromSelectionAlg::execute
StatusCode execute() override
Definition: AsgViewFromSelectionAlg.cxx:206
CP::AsgViewFromSelectionAlg::m_sizeLimit
Gaudi::Property< std::size_t > m_sizeLimit
Definition: AsgViewFromSelectionAlg.h:75
CP::AsgViewFromSelectionAlg
create a view container based on selection decorations
Definition: AsgViewFromSelectionAlg.h:32
CP::AsgViewFromSelectionAlg::m_deepCopy
Gaudi::Property< bool > m_deepCopy
Perform a deep copy for creating the output container.
Definition: AsgViewFromSelectionAlg.h:72
ISelectionReadAccessor.h
CP::AsgViewFromSelectionAlg::m_accessors
std::vector< std::pair< std::unique_ptr< ISelectionReadAccessor >, SelectionType > > m_accessors
the list of accessors and cut ignore list
Definition: AsgViewFromSelectionAlg.h:79
CP::AsgViewFromSelectionAlg::executeTemplate
StatusCode executeTemplate(const CP::SystematicSet &sys)
the templated version of execute for a single systematic
Definition: AsgViewFromSelectionAlg.cxx:34
CP::AsgViewFromSelectionAlg::m_function
StatusCode(AsgViewFromSelectionAlg::* m_function)(const CP::SystematicSet &sys)
Definition: AsgViewFromSelectionAlg.h:95