The Gaudi Framework  master (37c0b60a)
NTupleAlgorithm.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef HISTOGRAMS_NTupleAlgorithm_H
12 #define HISTOGRAMS_NTupleAlgorithm_H 1
13 
14 // Include files
15 #include <GaudiKernel/Algorithm.h>
16 #include <GaudiKernel/NTuple.h>
17 
18 // Forward declarations
19 
20 class NTupleAlgorithm : public Algorithm {
21 
22 public:
23  // Constructor of this form must be provided
24  NTupleAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
25 
26  // Three mandatory member functions of any algorithm
27  StatusCode initialize() override;
28  StatusCode execute() override;
29  StatusCode finalize() override;
30 
31 private:
32  NTuple::Tuple* m_tuple1 = nullptr;
33  NTuple::Tuple* m_tuple2 = nullptr;
34 
37  // Items for the column wise n-tuple
41 };
42 
43 #endif // HISTOGRAMS_NTupleAlgorithm_H
NTupleAlgorithm::m_tuple2
NTuple::Tuple * m_tuple2
Definition: NTupleAlgorithm.h:33
std::string
STL class.
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:526
NTupleAlgorithm
Definition: NTupleAlgorithm.h:20
NTupleAlgorithm::m_ntrk
NTuple::Item< long > m_ntrk
Definition: NTupleAlgorithm.h:35
NTupleAlgorithm::m_energy
NTuple::Item< float > m_energy
Definition: NTupleAlgorithm.h:36
ISvcLocator
Definition: ISvcLocator.h:46
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
NTupleAlgorithm::finalize
StatusCode finalize() override
Definition: NTupleAlgorithm.cpp:105
NTupleAlgorithm::m_n
NTuple::Item< long > m_n
Definition: NTupleAlgorithm.h:40
NTupleAlgorithm::NTupleAlgorithm
NTupleAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: NTupleAlgorithm.cpp:25
StatusCode
Definition: StatusCode.h:65
NTupleAlgorithm::initialize
StatusCode initialize() override
Definition: NTupleAlgorithm.cpp:34
NTuple.h
NTupleAlgorithm::m_iNumbers
NTuple::Array< long > m_iNumbers
Definition: NTupleAlgorithm.h:38
NTupleAlgorithm::m_tuple1
NTuple::Tuple * m_tuple1
Definition: NTupleAlgorithm.h:32
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:388
NTuple::Array< long >
NTupleAlgorithm::execute
StatusCode execute() override
Definition: NTupleAlgorithm.cpp:72
NTuple::Item< long >
NTupleAlgorithm::m_fNumbers
NTuple::Array< float > m_fNumbers
Definition: NTupleAlgorithm.h:39