2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5/// @author Nils Krumnack
8#include <AsgMessaging/StatusCode.h>
9#include <AsgTools/AsgTool.h>
10#include <ColumnarCore/ContainerId.h>
11#include <ColumnarCore/ObjectRange.h>
25 template<> class ColumnarTool<ColumnarModeXAOD>
27 /// Common Public Members
28 /// =====================
31 static constexpr bool singleEvent = true;
34 explicit ColumnarTool (ColumnarTool<ColumnarModeXAOD>* val_parent);
35 ColumnarTool (const ColumnarTool<ColumnarModeXAOD>&) = delete;
36 ColumnarTool& operator = (const ColumnarTool<ColumnarModeXAOD>&) = delete;
37 virtual ~ColumnarTool ();
40 /// @brief initialize the columns/column handles
42 /// This should be called at the end of initialize after all data handles
43 /// have been declared.
44 StatusCode initializeColumns ();
47 /// @brief add the given sub-tool
48 void addSubtool (ColumnarTool<ColumnarModeXAOD>& subtool);
51 /// @brief call the tool for the given event range
52 virtual void callEvents (ObjectRange<ContainerId::eventContext,ColumnarModeXAOD> events) const;
56 /// Mode-Specific Public Members
57 /// ============================
60 auto& eventStore () const noexcept {
62 return m_sharedData->m_event;
64 return *m_sharedData->m_evtStore;
68 void internalAddKey (std::weak_ptr<SG::VarHandleKey> key, bool addMTDependency);
76 struct SharedData final
79 mutable asg::SgTEvent m_event;
81 using StoreGateSvc_t = ServiceHandle<StoreGateSvc>;
82 /// Pointer to StoreGate (event store by default)
83 StoreGateSvc_t m_evtStore {"StoreGateSvc/StoreGateSvc", "ColumnarToolXAOD"};
85 std::vector<std::pair<std::weak_ptr<SG::VarHandleKey>,bool>> m_keys;
86 std::unordered_set<ColumnarTool<ColumnarModeXAOD>*> m_subtools;
87 std::unordered_set<asg::AsgTool*> m_fulltools;
88 SharedData (ColumnarTool<ColumnarModeXAOD>* self);
90 std::shared_ptr<SharedData> m_sharedData;