ATLAS Offline Software
Loading...
Searching...
No Matches
Hist.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// Hist.h
8// Header file for class AthEx::Hist
9// Author: S.Binet<binet@cern.ch>
11#ifndef ATHEXHISTNTUP_ATHEXHIST_H
12#define ATHEXHISTNTUP_ATHEXHIST_H 1
13
14// STL includes
15#include <string>
16
17// FrameWork includes
19#include "GaudiKernel/ITHistSvc.h"
20#include "GaudiKernel/ServiceHandle.h"
23
24// fwd declares
25class TH1F;
26
27namespace AthEx {
28
29class Hist
30 : public ::AthAlgorithm
31{
32
34 // Public methods:
36 public:
37
38 // Copy constructor:
39
41 Hist( const std::string& name, ISvcLocator* pSvcLocator );
42
44 virtual ~Hist();
45
46 // Assignment operator:
47 //Hist &operator=(const Hist &alg);
48
49 // Athena algorithm's Hooks
50 virtual StatusCode initialize();
51 virtual StatusCode execute();
52 virtual StatusCode finalize();
53
55 // Private data:
57 private:
58
61
63 ServiceHandle<ITHistSvc> m_histSvc {this,"THistSvc", "THistSvc", "Handle to the histogram service"};
64
66 TH1F *m_hist;
67
69 SG::ReadHandleKey<xAOD::EventInfo> m_evt {this,"EventInfo", "EventInfo", "xAOD EventInfo name"};
70};
71
72} //> namespace AthEx
73
74#endif //> !ATHEXHISTNTUP_ATHEXHIST_H
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual ~Hist()
Destructor:
Definition Hist.cxx:34
Hist()
Default constructor:
virtual StatusCode initialize()
Definition Hist.cxx:39
virtual StatusCode execute()
Definition Hist.cxx:63
Hist(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition Hist.cxx:26
virtual StatusCode finalize()
Definition Hist.cxx:56
SG::ReadHandleKey< xAOD::EventInfo > m_evt
key to the event-info
Definition Hist.h:69
TH1F * m_hist
pointer to our histogram
Definition Hist.h:66
ServiceHandle< ITHistSvc > m_histSvc
handle to the histogram service
Definition Hist.h:63
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition Hist.h:27
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)