ATLAS Offline Software
DQFilledBunchFilterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 DQFilledBunchFilterTool::DQFilledBunchFilterTool(const std::string& type,const std::string& name,const IInterface* parent)
10 , m_alwaysReturnTrue(false)
11 , m_invert(false)
12 {
13  declareInterface<IDQFilterTool>(this);
14  declareProperty("alwaysReturnTrue", m_alwaysReturnTrue);
15  declareProperty("invert", m_invert);
16 }
17 
19 
21  ATH_MSG_VERBOSE("ATLAS Ready initialize");
22  if (!m_alwaysReturnTrue) {
24  }
25  return StatusCode::SUCCESS;
26 }
27 
29  if (m_alwaysReturnTrue) {
30  return true;
31  } else {
32  const EventContext& ctx = Gaudi::Hive::currentContext();
33  EventIDBase::number_type bcid = ctx.eventID().bunch_crossing_id();
35  bool value = bcData->isFilled(bcid) ^ m_invert;
36  ATH_MSG_VERBOSE("Filled bunch DQ tool accept called, value " << value);
37  return value;
38  }
39 }
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
athena.value
value
Definition: athena.py:122
DQFilledBunchFilterTool::m_alwaysReturnTrue
bool m_alwaysReturnTrue
Definition: DQFilledBunchFilterTool.h:28
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
DQFilledBunchFilterTool.h
DQFilledBunchFilterTool::DQFilledBunchFilterTool
DQFilledBunchFilterTool(const std::string &, const std::string &, const IInterface *)
Definition: DQFilledBunchFilterTool.cxx:8
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DQFilledBunchFilterTool::m_bcDataKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Definition: DQFilledBunchFilterTool.h:31
DQFilledBunchFilterTool::initialize
virtual StatusCode initialize() override
Definition: DQFilledBunchFilterTool.cxx:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DQFilledBunchFilterTool::accept
virtual bool accept() const override
Pure virtual.
Definition: DQFilledBunchFilterTool.cxx:28
errorcheck.h
Helpers for checking error return status codes and reporting errors.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
DQFilledBunchFilterTool::~DQFilledBunchFilterTool
virtual ~DQFilledBunchFilterTool() override
Definition: DQFilledBunchFilterTool.cxx:18
DQFilledBunchFilterTool::m_invert
bool m_invert
Definition: DQFilledBunchFilterTool.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
BunchCrossingCondData::isFilled
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Definition: BunchCrossingCondData.h:339