ATLAS Offline Software
Loading...
Searching...
No Matches
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
6#include "LArReadoutGeometry/FCAL_ChannelMap.h"
7
11
13
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}
#define endmsg
Helper function for building FCAL Channel Map.
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
std::unique_ptr< IRDBRecord > IRDBRecord_ptr
static Double_t sc
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.
void add_tube(const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm)
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
The Athena Transient Store API.
StatusCode buildFcalChannelMap(StoreGateSvc *detStore, IRDBAccessSvc *paramSvc, IMessageSvc *msgSvc)