ATLAS Offline Software
Loading...
Searching...
No Matches
LArSimpleShapeDumper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 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 ATH_CHECK( detStore()->regHandle(m_shape, "LArShape") );
29 return StatusCode::SUCCESS;
30}
31
32
34{
35 static bool first = true;
36 if (first) {
37 first = false;
38 if (!m_shape || !m_shape.cptr()) {
39 ATH_MSG_FATAL ( "Could not retrieve shape object, abort!" );
40 return StatusCode::FAILURE;
41 }
42 const LArShapeComplete* shapeObj = dynamic_cast<const LArShapeComplete*>(m_shape.cptr());
43 if (!shapeObj) {
44 ATH_MSG_FATAL ( "Shape object is not of type LArShapeComplete ?!" );
45 return StatusCode::FAILURE;
46 }
47 for (unsigned int k = 0; k < 195073; k++) {
48 HWIdentifier channelID = m_onlineHelper->channel_Id(IdentifierHash(k));
49 for (int g = 0; g < 3; g++) {
51 if (shapeObj->nTimeBins(channelID, gain) == 0) {
53 ( "Shape object for channel " << k
54 << " (" << (m_onlineHelper->barrel_ec(channelID) ? "EMEC" : "EMB")
55 << "_" << (m_onlineHelper->pos_neg(channelID) ? "C" : "A")
56 << " FT = " << m_onlineHelper->feedthrough(channelID)
57 << ", slot = " << m_onlineHelper->slot(channelID)
58 << ", channel = " << m_onlineHelper->channel(channelID)
59 << ") and gain " << g << " has no shape data!" );
60 }
61 }
62 }
63 }
64 return StatusCode::SUCCESS;
65}
66
67
69{
70 return StatusCode::SUCCESS;
71}
#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
const DataHandle< ILArShape > m_shape