ATLAS Offline Software
Loading...
Searching...
No Matches
LArSimpleShapeDumper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8#include "GaudiKernel/MsgStream.h"
11
12
13LArSimpleShapeDumper::LArSimpleShapeDumper(const std::string & name, ISvcLocator * pSvcLocator) :
14 AthAlgorithm(name, pSvcLocator),
15 m_onlineHelper(nullptr)
16{
17}
18
19
23
24
26{
27 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
28 return StatusCode::SUCCESS;
29}
30
31
33{
34 static bool first = true;
35 if (first) {
36 first = false;
37 const ILArShape* shape = nullptr;
38 ATH_CHECK( detStore()->retrieve (shape, "LArShape") );
39 const LArShapeComplete* shapeObj = dynamic_cast<const LArShapeComplete*>(shape);
40 if (!shapeObj) {
41 ATH_MSG_FATAL ( "Shape object is not of type LArShapeComplete ?!" );
42 return StatusCode::FAILURE;
43 }
44 for (unsigned int k = 0; k < 195073; k++) {
45 HWIdentifier channelID = m_onlineHelper->channel_Id(IdentifierHash(k));
46 for (int g = 0; g < 3; g++) {
48 if (shapeObj->nTimeBins(channelID, gain) == 0) {
50 ( "Shape object for channel " << k
51 << " (" << (m_onlineHelper->barrel_ec(channelID) ? "EMEC" : "EMB")
52 << "_" << (m_onlineHelper->pos_neg(channelID) ? "C" : "A")
53 << " FT = " << m_onlineHelper->feedthrough(channelID)
54 << ", slot = " << m_onlineHelper->slot(channelID)
55 << ", channel = " << m_onlineHelper->channel(channelID)
56 << ") and gain " << g << " has no shape data!" );
57 }
58 }
59 }
60 }
61 return StatusCode::SUCCESS;
62}
63
64
66{
67 return StatusCode::SUCCESS;
68}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
This class implements the ILArShape interface.
virtual unsigned nTimeBins(const HWIdentifier &CellID, int gain) const
LArSimpleShapeDumper(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
virtual StatusCode finalize() override
virtual StatusCode execute() override
const LArOnlineID * m_onlineHelper