ATLAS Offline Software
Loading...
Searching...
No Matches
HistoDefinitionTool.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef JETMONITORING_HISTODEFINITIONTOOL_H
8#define JETMONITORING_HISTODEFINITIONTOOL_H
18
19#include <vector>
20#include <string>
21#include "AsgTools/AsgTool.h"
22
23class TH1F;
24class TH2F;
25class TProfile;
26class TProfile2D;
27
28// temporary, we should define a proper interface
29static const InterfaceID IID_HistoDefinitionTool("HistoDefinitionTool", 1, 0);
30
32
34
35 public:
36
37
38 HistoDefinitionTool(const std::string & t);
40
41
42 virtual StatusCode initialize() ;
43
44 const std::string& attributeName(){return m_attname;}
45
46
48 TH1F* buildTH1F();
49 TH2F* buildTH2F();
50 TProfile* buildTProfile(bool useYLimits=false);
51
52 // for convenience a templated method doing the same as above:
53 template<typename T>
54 T* build(){return NULL;}
55
56
57 static const InterfaceID& interfaceID( ){return IID_HistoDefinitionTool;}
58
59protected:
60
61 std::string m_attname;
62 std::string m_htitle;
63
64 int m_nbinsx = 10;
65 float m_xlow = 0.0;
66 float m_xup = 1.0;
67
68 int m_nbinsy = 10;
69 float m_ylow = 0.0;
70 float m_yup = 1.0;
71
72};
73
77
78
79#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
static const InterfaceID IID_HistoDefinitionTool("HistoDefinitionTool", 1, 0)
const std::string & attributeName()
HistoDefinitionTool(const std::string &t)
TH1F * buildTH1F()
Build histos according to properties.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
TProfile * buildTProfile(bool useYLimits=false)
static const InterfaceID & interfaceID()
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)