ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArGeoFcal
src
FCALChannelMapBuilder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArGeoFcal/FCALChannelMapBuilder.h
"
6
#include "LArReadoutGeometry/FCAL_ChannelMap.h"
7
8
#include "
RDBAccessSvc/IRDBRecord.h
"
9
#include "
RDBAccessSvc/IRDBRecordset.h
"
10
#include "
RDBAccessSvc/IRDBAccessSvc.h
"
11
12
#include "
StoreGate/StoreGateSvc.h
"
13
14
StatusCode
LArGeo::buildFcalChannelMap
(
StoreGateSvc
* detStore
15
,
IRDBAccessSvc
* paramSvc
16
, IMessageSvc* msgSvc)
17
{
18
MsgStream log(msgSvc,
"buildFcalChannelMap"
);
19
FCAL_ChannelMap
* cmap =
new
FCAL_ChannelMap
(0);
20
21
std::vector<IRDBRecordset_ptr> recordsets { paramSvc->
getRecordsetPtr
(
"FCalElecMod1"
,
""
)
22
, paramSvc->
getRecordsetPtr
(
"FCalElecMod2"
,
""
)
23
, paramSvc->
getRecordsetPtr
(
"FCalElecMod3"
,
""
) };
24
25
for
(
const
IRDBRecordset_ptr
& recordset : recordsets) {
26
for
(
const
IRDBRecord_ptr
& rec : *recordset) {
27
cmap->
add_tube
(rec->getString(
"TILENAME"
)
28
, rec->getInt(
"MODNUMBER"
)
29
, rec->getInt(
"IDENTIFIER"
)
30
, rec->getInt(
"I"
)
31
, rec->getInt(
"J"
)
32
, rec->getDouble(
"X"
)
33
, rec->getDouble(
"Y"
)
34
, rec->getString(
"HVFEEDTHROUGHID"
));
35
}
36
}
37
38
cmap->
finish
();
39
40
StatusCode
sc
= detStore->
record
(cmap,
"FCAL_ChannelMap"
);
41
if
(
sc
.isFailure()) {
42
log << MSG::FATAL <<
"Failed to build FCAL Channel Map"
<<
endmsg
;
43
}
44
45
return
sc
;
46
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
FCALChannelMapBuilder.h
Helper function for building FCAL Channel Map.
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition
IRDBAccessSvc.h:30
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
IRDBRecord_ptr
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
Definition
IRDBRecordset.h:23
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
StoreGateSvc.h
FCAL_ChannelMap
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.
Definition
LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h:34
FCAL_ChannelMap::add_tube
void add_tube(const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm)
Definition
LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx:69
FCAL_ChannelMap::finish
void finish()
Definition
LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx:55
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition
IRDBAccessSvc.h:45
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(std::string_view node, std::string_view tag, std::string_view tag2node="", std::string_view connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
StoreGateSvc
The Athena Transient Store API.
Definition
StoreGateSvc.h:120
StoreGateSvc::record
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
LArGeo::buildFcalChannelMap
StatusCode buildFcalChannelMap(StoreGateSvc *detStore, IRDBAccessSvc *paramSvc, IMessageSvc *msgSvc)
Definition
FCALChannelMapBuilder.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0