ATLAS Offline Software
Loading...
Searching...
No Matches
Ntup.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7// Ntup.h
8// Header file for class AthEx::Ntup
9// Author: S.Binet<binet@cern.ch>
11#ifndef ATHEXHISTNTUP_ATHEXNTUP_H
12#define ATHEXHISTNTUP_ATHEXNTUP_H 1
13
14// STL includes
15#include <string>
16#include <vector>
17
18// FrameWork includes
20#include "GaudiKernel/ITHistSvc.h"
21#include "GaudiKernel/ServiceHandle.h"
24
25// fwd declares
26class TTree;
27
28namespace AthEx {
29
30class Ntup
31 : public ::AthAlgorithm
32{
33
35 // Public methods:
37 public:
38
39 // Copy constructor:
40
42 Ntup( const std::string& name, ISvcLocator* pSvcLocator );
43
45 virtual ~Ntup();
46
47 // Assignment operator:
48 //Ntup &operator=(const Ntup &alg);
49
50 // Athena algorithm's Hooks
51 virtual StatusCode initialize();
52 virtual StatusCode execute();
53 virtual StatusCode finalize();
54
56 // Private data:
58 private:
59
62
64 ServiceHandle<ITHistSvc> m_ntSvc {this, "THistSvc", "THistSvc", "Handle to the histogram service"};
65
66 // n-tuple data members
67 unsigned int m_size;
68 unsigned int m_run;
69 unsigned int m_event;
70 std::vector<long> m_rundata;
71
73 TTree* m_ntuple;
74
76 SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EventInfo", "EventInfo",
77 "key to the event-info instance to ntuple-ize."};
78};
79
80} //> namespace AthEx
81
82#endif //> !ATHEXHISTNTUP_ATHEXNTUP_H
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Ntup()
Default constructor:
virtual StatusCode execute()
Definition Ntup.cxx:71
virtual StatusCode finalize()
Definition Ntup.cxx:64
Ntup(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition Ntup.cxx:26
SG::ReadHandleKey< xAOD::EventInfo > m_evt
key to the event-info
Definition Ntup.h:76
unsigned int m_run
Definition Ntup.h:68
TTree * m_ntuple
pointer to the n-tuple
Definition Ntup.h:73
std::vector< long > m_rundata
Definition Ntup.h:70
virtual StatusCode initialize()
Definition Ntup.cxx:42
unsigned int m_event
Definition Ntup.h:69
unsigned int m_size
Definition Ntup.h:67
virtual ~Ntup()
Destructor:
Definition Ntup.cxx:37
ServiceHandle< ITHistSvc > m_ntSvc
handle to the histogram service
Definition Ntup.h:64
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition Hist.h:27