ATLAS Offline Software
DQAtlasReadyFilterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 DQAtlasReadyFilterTool::DQAtlasReadyFilterTool(const std::string& type,const std::string& name,const IInterface* parent)
9 , m_fallbackValue(true)
10 , m_alwaysReturnTrue(false)
11 , m_key("/TDAQ/RunCtrl/DataTakingMode")
12 {
13  declareInterface<IDQFilterTool>(this);
14  declareProperty("fallbackValue", m_fallbackValue);
15  declareProperty("alwaysReturnTrue", m_alwaysReturnTrue);
16 }
17 
19 
21 {
22  ATH_MSG_VERBOSE("ATLAS Ready initialize");
23  // don't register if we always return true anyway
24  if (m_alwaysReturnTrue) return StatusCode::SUCCESS;
25 
27  return StatusCode::SUCCESS;
28 }
29 
31  if (m_alwaysReturnTrue) {
32  return true;
33  } else {
35  const AthenaAttributeList* attrList{*rch};
36  if (attrList == 0) {
37  ATH_MSG_WARNING("Unable to retrieve DataTakingMode information; falling back to" << m_fallbackValue);
38  return m_fallbackValue;
39  }
40  ATH_MSG_DEBUG("ReadyForPhysics is: " << (*attrList)["ReadyForPhysics"].data<uint32_t>());
41  return ((*attrList)["ReadyForPhysics"].data<uint32_t>() != 0);
42  }
43 }
DQAtlasReadyFilterTool::m_alwaysReturnTrue
bool m_alwaysReturnTrue
Definition: DQAtlasReadyFilterTool.h:29
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
DQAtlasReadyFilterTool::initialize
virtual StatusCode initialize() override
Definition: DQAtlasReadyFilterTool.cxx:20
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
DQAtlasReadyFilterTool::accept
virtual bool accept() const override
Pure virtual.
Definition: DQAtlasReadyFilterTool.cxx:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DQAtlasReadyFilterTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DQAtlasReadyFilterTool::m_fallbackValue
bool m_fallbackValue
Definition: DQAtlasReadyFilterTool.h:28
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
DQAtlasReadyFilterTool::m_key
SG::ReadCondHandleKey< AthenaAttributeList > m_key
Definition: DQAtlasReadyFilterTool.h:30
DQAtlasReadyFilterTool::DQAtlasReadyFilterTool
DQAtlasReadyFilterTool(const std::string &, const std::string &, const IInterface *)
Definition: DQAtlasReadyFilterTool.cxx:7
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DQAtlasReadyFilterTool::~DQAtlasReadyFilterTool
virtual ~DQAtlasReadyFilterTool() override
Definition: DQAtlasReadyFilterTool.cxx:18
AthAlgTool
Definition: AthAlgTool.h:26