ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ZDC
ZdcConditions
src
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
5
#include "
ZdcConditions/ZdcLucrodMapRun3.h
"
6
#include "
PathResolver/PathResolver.h
"
7
8
#include <fstream>
9
10
const
ZdcLucrodMapRun3
*
ZdcLucrodMapRun3::getInstance
()
11
{
12
static
const
ZdcLucrodMapRun3
map_run3;
13
return
&map_run3;
14
}
15
16
//constructor
17
ZdcLucrodMapRun3::ZdcLucrodMapRun3
() :
asg
::
AsgMessaging
(
"ZdcLucrodMapRun3"
)
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(7);
// 7 lucrods including LIS
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
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
PathResolver.h
PathResolverFindDataFile
std::string PathResolverFindDataFile(const std::string &logical_file_name)
Definition
PathResolver.cxx:320
ZdcLucrodMapRun3.h
ZdcLucrodMapRun3::ZdcLucrodMapRun3
ZdcLucrodMapRun3()
Definition
ZdcLucrodMapRun3.cxx:17
ZdcLucrodMapRun3::getInstance
static const ZdcLucrodMapRun3 * getInstance()
Definition
ZdcLucrodMapRun3.cxx:10
ZdcLucrodMapRun3::m_mainJson
nlohmann::json m_mainJson
Definition
ZdcLucrodMapRun3.h:17
ZdcLucrodMapRun3::m_lucrodInfo
std::vector< nlohmann::json > m_lucrodInfo
Definition
ZdcLucrodMapRun3.h:16
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition
AsgMessaging.cxx:49
asg::AsgMessaging::AsgMessaging
AsgMessaging(const std::string &name)
Constructor with a name.
Definition
AsgMessaging.cxx:17
asg
Definition
DataHandleTestTool.h:28
Generated on
for ATLAS Offline Software by
1.17.0