| The Gaudi Framework v32r1 (f65d50dc)

ITHistSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_ITHISTSVC_H
2 #define GAUDIKERNEL_ITHISTSVC_H
3
4 #include <memory>
5 #include <string>
6 #include <vector>
7
8 #ifndef GAUDIKERNEL_ISERVICE_H
9 # include "GaudiKernel/IService.h"
10 #endif
11
12 #include "GaudiKernel/LockedHandle.h"
13
14 class TObject;
15 class TH1;
16 class TH2;
17 class TH3;
18 class TTree;
19 class TList;
20 class TDirectory;
21 class TGraph;
22
23 class GAUDI_API ITHistSvc : virtual public IService {
24 public:
26 DeclareInterfaceID( ITHistSvc, 3, 0 );
27
30
32 virtual StatusCode regHist( const std::string& name ) = 0;
36 virtual StatusCode regHist( const std::string& name, std::unique_ptr<TH1> hist ) = 0;
41 virtual StatusCode regHist( const std::string& name, std::unique_ptr<TH1> hist, TH1* hist_ptr ) = 0;
44 virtual StatusCode regHist( const std::string& name, TH1* ) = 0;
46 virtual StatusCode getHist( const std::string& name, TH1*&, size_t index = 0 ) const = 0;
48 virtual StatusCode getHist( const std::string& name, TH2*&, size_t index = 0 ) const = 0;
50 virtual StatusCode getHist( const std::string& name, TH3*&, size_t index = 0 ) const = 0;
51
53
56
58 virtual StatusCode regTree( const std::string& name ) = 0;
60 virtual StatusCode regTree( const std::string& name, std::unique_ptr<TTree> ) = 0;
63 virtual StatusCode regTree( const std::string& name, TTree* ) = 0;
65 virtual StatusCode getTree( const std::string& name, TTree*& ) const = 0;
66
68
71
73 virtual StatusCode regGraph( const std::string& name ) = 0;
75 virtual StatusCode regGraph( const std::string& name, std::unique_ptr<TGraph> ) = 0;
78 virtual StatusCode regGraph( const std::string& name, TGraph* ) = 0;
80 virtual StatusCode getGraph( const std::string& name, TGraph*& ) const = 0;
81
83
86
88 virtual StatusCode regShared( const std::string& name, std::unique_ptr<TH1>, LockedHandle<TH1>& ) = 0;
90 virtual StatusCode regShared( const std::string& name, std::unique_ptr<TH2>, LockedHandle<TH2>& ) = 0;
92 virtual StatusCode regShared( const std::string& name, std::unique_ptr<TH3>, LockedHandle<TH3>& ) = 0;
94 virtual StatusCode regShared( const std::string& name, std::unique_ptr<TGraph>, LockedHandle<TGraph>& ) = 0;
96 virtual StatusCode getShared( const std::string& name, LockedHandle<TH1>& ) const = 0;
98 virtual StatusCode getShared( const std::string& name, LockedHandle<TH2>& ) const = 0;
100 virtual StatusCode getShared( const std::string& name, LockedHandle<TH3>& ) const = 0;
102 virtual StatusCode getShared( const std::string& name, LockedHandle<TGraph>& ) const = 0;
103
105
108
110 virtual StatusCode deReg( const std::string& name ) = 0;
112 virtual StatusCode deReg( TObject* obj ) = 0;
113
115 virtual StatusCode merge( const std::string& id ) = 0;
117 virtual StatusCode merge( TObject* ) = 0;
118
120 virtual bool exists( const std::string& name ) const = 0;
121
123
126
127 virtual std::vector<std::string> getHists() const = 0;
128 virtual std::vector<std::string> getTrees() const = 0;
129 virtual std::vector<std::string> getGraphs() const = 0;
130
131 virtual StatusCode getTHists( TDirectory* td, TList&, bool recurse = false ) const = 0;
132 virtual StatusCode getTHists( const std::string& name, TList&, bool recurse = false ) const = 0;
133 virtual StatusCode getTHists( TDirectory* td, TList&, bool recurse = false, bool reg = false ) = 0;
134 virtual StatusCode getTHists( const std::string& name, TList&, bool recurse = false, bool reg = false ) = 0;
135
136 virtual StatusCode getTTrees( TDirectory* td, TList&, bool recurse = false ) const = 0;
137 virtual StatusCode getTTrees( const std::string& name, TList&, bool recurse = false ) const = 0;
138 virtual StatusCode getTTrees( TDirectory* td, TList&, bool recurse = false, bool reg = false ) = 0;
139 virtual StatusCode getTTrees( const std::string& name, TList&, bool recurse = false, bool reg = false ) = 0;
140
142
144 virtual ~ITHistSvc() = default;
145 };
146
147 #endif // GAUDIKERNEL_ITHISTSVC_H
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
merge
int merge(const char *target, const char *source, bool fixup=false, bool dbg=true)
Definition: merge.C:420
std::string
STL class.
IService
General service interface definition.
Definition: IService.h:18
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
LockedHandle
Provides automatic lock/unlock access to a class upon deref of ptr.
Definition: LockedHandle.h:28
LockedHandle.h
IService.h
std::vector< std::string >
std::unique_ptr
STL class.
IService::DeclareInterfaceID
DeclareInterfaceID(IService, 4, 0)
InterfaceID.
ITHistSvc
Definition: ITHistSvc.h:23
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71