ATLAS Offline Software
Loading...
Searching...
No Matches
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
22class TH1;
23class TTrainedNetwork;
24
25static const InterfaceID IID_NeuralNetworkToHistoTool("Trk::NeuralNetworkToHistoTool", 1, 0);
26
27namespace Trk
28{
29
30
32{
33public:
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
58private:
59
60};
61
62}//end namespace Trk
63
64
65#endif
static const InterfaceID IID_NeuralNetworkToHistoTool("Trk::NeuralNetworkToHistoTool", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
static TTrainedNetwork * fromHistoToTrainedNetwork(const std::vector< TH1 * > &)
static std::map< std::string, TH1 * > histsFromNetwork(TTrainedNetwork *)
static TTrainedNetwork * networkFromHists(const std::map< std::string, const TH1 * > &)
static const InterfaceID & interfaceID()
AlgTool interface methods.
static std::vector< TH1 * > fromTrainedNetworkToHisto(TTrainedNetwork *)
NeuralNetworkToHistoTool(const std::string &name, const std::string &n, const IInterface *p)
Ensure that the ATLAS eigen extensions are properly loaded.