ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimNNMap.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
9
11
12#include <string>
13#include <sstream>
14#include <exception>
16
17using namespace std;
18using namespace asg::msgUserCode;
19
21// Constructor/Desctructor
23
24
25
26FPGATrackSimNNMap::FPGATrackSimNNMap(const std::string & filepath) :
27 m_weightsFileName(filepath)
28{
29 // Open file with NN weights
30 std::ifstream input_cfg(m_weightsFileName.c_str());
31 if (input_cfg.is_open())
32 ANA_MSG_INFO("Opened file: " << m_weightsFileName);
33 else {
34 ANA_MSG_FATAL("Unable to open file: " << m_weightsFileName);
35 throw ("FPGATrackSimNNMap could not open " + m_weightsFileName);
36 }
37
38}
39
40
41const std::string& FPGATrackSimNNMap::getNNMap() const {return m_weightsFileName;}
macros for messaging and checking status codes
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_FATAL(xmsg)
Macro printing fatal messages.
Map for NN tracking.
FPGATrackSimNNMap(const std::string &filepath)
std::string m_weightsFileName
const std::string & getNNMap() const
STL namespace.