|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef INDETSECVTXTRACKSELECTIONTOOL_INDETTRACKCUT_H
10 #define INDETSECVTXTRACKSELECTIONTOOL_INDETTRACKCUT_H
21 class InDetSecVtxTrackSelectionTool;
36 template <
class AccessorType>
40 std::unordered_map< std::string, std::shared_ptr<SecVtxTrackAccessor> >*
m_trackAccessors;
50 virtual bool result()
const;
62 virtual bool result()
const;
64 std::function<
bool(
const std::array<uint8_t,N>&)>
m_func;
71 template <
class AccessorType>
73 std::shared_ptr<AccessorType>&
accessor)
78 std::unordered_map< std::string, std::shared_ptr<SecVtxTrackAccessor> >::const_iterator
it =
80 [&] (std::pair< std::string, std::shared_ptr<SecVtxTrackAccessor> >
acc)
81 {return acc.first == accessorName;} );
85 ATH_MSG_ERROR(
"Must initialize SecVtxTrackCut with pointer to the selection tool before adding accessors." );
86 return StatusCode::FAILURE;
89 (*m_trackAccessors)[accessorName] =
accessor;
92 accessor = std::dynamic_pointer_cast<AccessorType>(
it->second);
94 ATH_MSG_ERROR(
"Logic error: could not cast accessor to type " <<
typeid(AccessorType).
name() );
95 return StatusCode::FAILURE;
102 " accessor. Pointer to accessor is to type " <<
103 typeid(AccessorType).
name() <<
". Is this correct?" );
104 return StatusCode::FAILURE;
106 return StatusCode::SUCCESS;
110 #endif // INDETTRACKSELECTIONTOOL_INDETTRACKCUT_H
std::array< xAOD::SummaryType, N > m_summaryTypes
virtual StatusCode initialize()
D0minCut(InDetSecVtxTrackSelectionTool *, Double_t min=-99.)
FuncSummaryValueCut(InDetSecVtxTrackSelectionTool *, const std::array< xAOD::SummaryType, N > &&)
virtual StatusCode initialize()
InDetSecVtxTrackSelectionTool * m_selectionTool
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual bool result() const
std::shared_ptr< svParamAccessor< 0 > > m_paramAccessor
virtual bool result() const =0
SecVtxTrackCut(InDetSecVtxTrackSelectionTool *)
virtual bool result() const
void setFunction(std::function< bool(const std::array< uint8_t, N > &)> func)
std::unordered_map< std::string, std::shared_ptr< SecVtxTrackAccessor > > * m_trackAccessors
Class mimicking the AthMessaging class from the offline software.
void setMinValue(Double_t min)
std::function< bool(const std::array< uint8_t, N > &)> m_func
StatusCode getAccessor(const std::string &name, std::shared_ptr< AccessorType > &accessor)
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
std::array< std::shared_ptr< SummaryAccessor >, N > m_summaryAccessors
virtual ~SecVtxTrackCut()=0
virtual StatusCode initialize()
setBGCode setTAP setLVL2ErrorBits bool