ATLAS Offline Software
Loading...
Searching...
No Matches
NeuralNetworkToHistoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "GaudiKernel/MsgStream.h"
9#include "TrkNeuralNetworkUtils/NetworkToHistoTool.hh"
10
11#include <TH1F.h>
12#include <TH2F.h>
13#include <cmath>
14
15namespace Trk
16{
17
18
20 const std::string& n, const IInterface* p):
21 AthAlgTool(name, n,p)
22{
23 declareInterface<NeuralNetworkToHistoTool>(this);
24}
25
27= default;
28
30
31 ATH_MSG_INFO(" Initialization of NeuralNetworkToHistoTool succesfull");
32 return StatusCode::SUCCESS;
33}
34
36
37 ATH_MSG_INFO(" Finalization of NeuralNetworkToHistoTool succesfull");
38 return StatusCode::SUCCESS;
39}
40
41
42std::vector<TH1*> NeuralNetworkToHistoTool
43::fromTrainedNetworkToHisto(TTrainedNetwork* trainedNetwork)
44{
45 NetworkToHistoTool tool;
46 return NetworkToHistoTool::fromTrainedNetworkToHisto(trainedNetwork);
47}
48
49TTrainedNetwork* NeuralNetworkToHistoTool
50::fromHistoToTrainedNetwork(const std::vector<TH1*> & inputHistos)
51{
52 NetworkToHistoTool tool;
53 return NetworkToHistoTool::fromHistoToTrainedNetwork(inputHistos);
54}
55
56TTrainedNetwork* NeuralNetworkToHistoTool
57::fromHistoToTrainedNetwork(const std::vector<const TH1*> & inputHistos)
58{
59 NetworkToHistoTool tool;
60 return NetworkToHistoTool::fromHistoToTrainedNetwork(inputHistos);
61}
62
63std::map<std::string,TH1*> NeuralNetworkToHistoTool
64::histsFromNetwork(TTrainedNetwork* net)
65
66{
67 NetworkToHistoTool tool;
68 return NetworkToHistoTool::histsFromNetwork(net);
69}
70
71TTrainedNetwork* NeuralNetworkToHistoTool
72::networkFromHists(const std::map<std::string,const TH1*>& hists)
73
74{
75 NetworkToHistoTool tool;
76 return NetworkToHistoTool::networkFromHists(hists);
77}
78}//end namespace Trk
79
80
#define ATH_MSG_INFO(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
NeuralNetworkToHistoTool(const std::string &name, const std::string &n, const IInterface *p)
Ensure that the ATLAS eigen extensions are properly loaded.