ATLAS Offline Software
LArRawChannelBuilderToolBadChannelTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 #include "GaudiKernel/MsgStream.h"
8 
9 #include "Identifier/Identifier.h"
10 
12  const std::string& name,
13  const IInterface* parent):
15 {
16  m_helper = new LArRawChannelBuilderStatistics( 2, // number of possible errors
17  0x01); // bit pattern special for this tool,
18  // to be stored in "int quality"
19  m_helper->setErrorString(0, "no errors");
20  m_helper->setErrorString(1, "known bad channel");
21 
22 }
23 
25 {
26  MsgStream log(msgSvc(), name());
27  ATH_CHECK(m_bcContKey.initialize());
29 
30  return StatusCode::SUCCESS;
31 }
32 
34  float /*pedestal*/,
35  const std::vector<float>& /*ramps*/,
36  MsgStream* /* pLog */ )
37 {
38  //retrieve BadChannel info:
39  const LArBadChannelCont* bcCont=nullptr;
41  bcCont=(*bcContHdl);
42 
43  // zero means channel ok
44  const HWIdentifier chid=m_parent->curr_chid;
45  if (m_bcMask.cellShouldBeMasked(bcCont,chid)) {
46  // inverse logic, true means building went ok.
48  return true;
49  }
50 
52  return false;
53 }
54 
LArRawChannelBuilderToolBadChannelTool.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArRawChannelBuilderStatistics::setErrorString
void setErrorString(unsigned int nerr, const std::string &s)
Definition: LArRawChannelBuilderStatistics.cxx:69
LArBadChannelMask::buildBitMask
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
Definition: LArBadChannelMask.cxx:10
LArRawChannelBuilderStatistics
Returns various counters from the LArRawChannel building.
Definition: LArRawChannelBuilderStatistics.h:21
HWIdentifier
Definition: HWIdentifier.h:13
LArBadChannelMask::cellShouldBeMasked
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
Definition: LArBadChannelMask.h:42
LArRawChannelBuilderStatistics::incrementErrorCount
void incrementErrorCount(unsigned int nerr)
Definition: LArRawChannelBuilderStatistics.cxx:34
LArRawChannelBuilderToolBadChannelTool::initTool
StatusCode initTool()
Definition: LArRawChannelBuilderToolBadChannelTool.cxx:24
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
LArRawChannelBuilderToolBadChannelTool::m_bcContKey
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Definition: LArRawChannelBuilderToolBadChannelTool.h:44
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRawChannelBuilderToolBadChannelTool::buildRawChannel
bool buildRawChannel(const LArDigit *digit, float pedestal, const std::vector< float > &ramps, MsgStream *pLog)
Definition: LArRawChannelBuilderToolBadChannelTool.cxx:33
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArRawChannelBuilderToolBase
Base tool to make the interface with the driver.
Definition: LArRawChannelBuilderToolBase.h:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArRawChannelBuilderToolBaseClass::m_helper
LArRawChannelBuilderStatistics * m_helper
Definition: LArRawChannelBuilderToolBaseClass.h:82
LArRawChannelBuilderToolBadChannelTool::LArRawChannelBuilderToolBadChannelTool
LArRawChannelBuilderToolBadChannelTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArRawChannelBuilderToolBadChannelTool.cxx:11
LArRawChannelBuilderToolBadChannelTool::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArRawChannelBuilderToolBadChannelTool.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArRawChannelBuilderParams::curr_chid
HWIdentifier curr_chid
Definition: LArRawChannelBuilderParams.h:24
LArRawChannelBuilderToolBaseClass::m_parent
LArRawChannelBuilderParams * m_parent
Definition: LArRawChannelBuilderToolBaseClass.h:80
LArRawChannelBuilderToolBadChannelTool::m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Definition: LArRawChannelBuilderToolBadChannelTool.h:43