ATLAS Offline Software
NeuralNetworkToHistoTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // -*-c++-*-
6 #ifndef TRKNEURALNETWORKUTILS_NEURALNETWORKTOHISTOTOOL_H
7 #define TRKNEURALNETWORKUTILS_NEURALNETWORKTOHISTOTOOL_H
8 
9 /******************************************************
10  @class NeuralNetworkToHistoTool
11 
12  Created 19-2-2008
13  @author Giacinto Piacquadio (giacinto.piacquadio AT physik.uni-freiburg.de)
14 ********************************************************/
15 
16 #include <TString.h>
17 #include <vector>
18 #include <map>
19 #include <string>
21 
22 class TH1;
23 class TTrainedNetwork;
24 
25 static const InterfaceID IID_NeuralNetworkToHistoTool("Trk::NeuralNetworkToHistoTool", 1, 0);
26 
27 namespace Trk
28 {
29 
30 
32 {
33 public:
34 
36  static const InterfaceID& interfaceID() { return IID_NeuralNetworkToHistoTool; };
37 
38  NeuralNetworkToHistoTool(const std::string& name,
39  const std::string& n, const IInterface* p);
40 
41  virtual StatusCode initialize();
42  virtual StatusCode finalize();
43 
45 
46  // old style wrappers
47  static std::vector<TH1*> fromTrainedNetworkToHisto(TTrainedNetwork*) ;
48  static TTrainedNetwork* fromHistoToTrainedNetwork(const std::vector<TH1*> &) ;
49  static TTrainedNetwork* fromHistoToTrainedNetwork(const std::vector<const TH1*> &) ;
50 
51  // wrappers for new NN converter tool
52  // note that root's internal hist names are mangled as a workarond for
53  // root's global variable problems.
54  static std::map<std::string,TH1*> histsFromNetwork(TTrainedNetwork*) ;
55  static TTrainedNetwork* networkFromHists(const std::map<std::string,const TH1*> &) ;
56 
57 
58 private:
59 
60 };
61 
62 }//end namespace Trk
63 
64 
65 #endif
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::NeuralNetworkToHistoTool::networkFromHists
static TTrainedNetwork * networkFromHists(const std::map< std::string, const TH1 * > &)
Definition: NeuralNetworkToHistoTool.cxx:72
Trk::NeuralNetworkToHistoTool::interfaceID
static const InterfaceID & interfaceID()
AlgTool interface methods.
Definition: NeuralNetworkToHistoTool.h:36
Trk::NeuralNetworkToHistoTool::fromHistoToTrainedNetwork
static TTrainedNetwork * fromHistoToTrainedNetwork(const std::vector< TH1 * > &)
Definition: NeuralNetworkToHistoTool.cxx:50
Trk::NeuralNetworkToHistoTool::initialize
virtual StatusCode initialize()
Definition: NeuralNetworkToHistoTool.cxx:29
Trk::NeuralNetworkToHistoTool::NeuralNetworkToHistoTool
NeuralNetworkToHistoTool(const std::string &name, const std::string &n, const IInterface *p)
Definition: NeuralNetworkToHistoTool.cxx:19
Trk::NeuralNetworkToHistoTool::~NeuralNetworkToHistoTool
~NeuralNetworkToHistoTool()
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::NeuralNetworkToHistoTool::fromTrainedNetworkToHisto
static std::vector< TH1 * > fromTrainedNetworkToHisto(TTrainedNetwork *)
Definition: NeuralNetworkToHistoTool.cxx:43
TTrainedNetwork
Definition: InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h:21
Trk::NeuralNetworkToHistoTool
Definition: NeuralNetworkToHistoTool.h:32
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::NeuralNetworkToHistoTool::finalize
virtual StatusCode finalize()
Definition: NeuralNetworkToHistoTool.cxx:35
TH1
Definition: rootspy.cxx:268
AthAlgTool
Definition: AthAlgTool.h:26
Trk::NeuralNetworkToHistoTool::histsFromNetwork
static std::map< std::string, TH1 * > histsFromNetwork(TTrainedNetwork *)
Definition: NeuralNetworkToHistoTool.cxx:64