Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ColumnarToolXAOD.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /// @author Nils Krumnack
6 
7 
8 #include <AsgMessaging/StatusCode.h>
9 #include <AsgTools/AsgTool.h>
10 #include <ColumnarCore/ContainerId.h>
11 #include <ColumnarCore/ObjectRange.h>
12 
13 namespace columnar
14 {
15  template<> class ColumnarTool<ColumnarModeXAOD>
16  {
17  /// Common Public Members
18  /// =====================
19  public:
20 
21  static constexpr bool singleEvent = true;
22 
23  ColumnarTool ();
24  explicit ColumnarTool (ColumnarTool<ColumnarModeXAOD>* val_parent);
25  ColumnarTool (const ColumnarTool<ColumnarModeXAOD>&) = delete;
26  ColumnarTool& operator = (const ColumnarTool<ColumnarModeXAOD>&) = delete;
27  virtual ~ColumnarTool ();
28 
29 
30  /// @brief initialize the columns/column handles
31  ///
32  /// This should be called at the end of initialize after all data handles
33  /// have been declared.
34  StatusCode initializeColumns ();
35 
36 
37  /// @brief add the given sub-tool
38  void addSubtool (ColumnarTool<ColumnarModeXAOD>& /*subtool*/) {};
39 
40 
41  /// @brief call the tool for the given event range
42  virtual void callEvents (ObjectRange<ContainerId::eventContext,ColumnarModeXAOD> events) const;
43 
44 
45 
46  /// Mode-Specific Public Members
47  /// ============================
48  public:
49 
50  auto& eventStore () const noexcept {
51 #ifdef XAOD_STANDALONE
52  return m_event;
53 #else
54  return *m_evtStore;
55 #endif
56  }
57 
58 
59 
60  /// Private Members
61  /// ===============
62  private:
63 
64 #ifdef XAOD_STANDALONE
65  mutable asg::SgTEvent m_event;
66 #else
67  using StoreGateSvc_t = ServiceHandle<StoreGateSvc>;
68  /// Pointer to StoreGate (event store by default)
69  StoreGateSvc_t m_evtStore {"StoreGateSvc/StoreGateSvc", "ColumnarToolXAOD"};
70 #endif
71  };
72 }