ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcLucrodMapRun3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8#include <fstream>
9
11{
12 static const ZdcLucrodMapRun3 map_run3;
13 return &map_run3;
14}
15
16//constructor
18{
19 msg().setLevel(MSG::INFO);
20
21 std::string filePath = PathResolverFindDataFile("ZdcConditions/ZDC_Run3_conditions.json");
22 if (!filePath.empty())
23 {
24 ATH_MSG_DEBUG( "ZdcLucrodMapRun3::found ZDC JSON at " << filePath );
25 }
26 else
27 {
28 ATH_MSG_DEBUG( "ZdcLucrodMapRun3::mapping NOT FOUND!" ) ;
29 filePath = "./ZDC_Run3_mapping.json";
30 }
31
32 std::ifstream ifs(filePath);
33
34 ifs >> m_mainJson;
35
36 m_lucrodInfo.resize(6);
37
38 for (const auto& element: m_mainJson)
39 {
40 int source_ID = element["source_ID"] ;
41 m_lucrodInfo[source_ID] = element;
42 }
43
44}
#define ATH_MSG_DEBUG(x)
std::string PathResolverFindDataFile(const std::string &logical_file_name)
static const ZdcLucrodMapRun3 * getInstance()
nlohmann::json m_mainJson
std::vector< nlohmann::json > m_lucrodInfo
MsgStream & msg() const
The standard message stream.
AsgMessaging(const std::string &name)
Constructor with a name.