ATLAS Offline Software
TimeBurner.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TimeBurner.h"
6 
7 #include <thread>
8 #include <chrono>
9 
10 TimeBurner::TimeBurner(const std::string& name, ISvcLocator* pSvcLocator)
11 : ::HypoBase(name, pSvcLocator) {}
12 
14  // we don't actually need the HypoTool
15  for (auto& tool : m_hypoTools) tool.disable();
16  return StatusCode::SUCCESS;
17 }
18 
19 StatusCode TimeBurner::execute(const EventContext& eventContext) const {
20  // Create a reject decision
22 
23  std::this_thread::sleep_for(std::chrono::milliseconds(m_sleepTimeMillisec.value()));
24 
25  return StatusCode::SUCCESS;
26 }
TrigCompositeUtils::createAndStore
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Definition: TrigCompositeUtilsRoot.cxx:30
HypoBase::decisionOutput
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutput() const
methods for derived classes to access handles of the base class output other read/write handles may b...
Definition: HypoBase.cxx:20
TimeBurner::TimeBurner
TimeBurner(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
Definition: TimeBurner.cxx:10
TimeBurner::initialize
virtual StatusCode initialize() override
Definition: TimeBurner.cxx:13
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TimeBurner::execute
virtual StatusCode execute(const EventContext &eventContext) const override
Definition: TimeBurner.cxx:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
HypoBase
Hypothesis algorithms take the output of reco algorithms and the decision from the preceeding InputMa...
Definition: HypoBase.h:13
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
TimeBurner.h
TimeBurner::m_hypoTools
ToolHandleArray< IAlgTool > m_hypoTools
Definition: TimeBurner.h:29
TimeBurner::m_sleepTimeMillisec
Gaudi::Property< unsigned int > m_sleepTimeMillisec
Definition: TimeBurner.h:24