ATLAS Offline Software
Loading...
Searching...
No Matches
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
10TimeBurner::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
19StatusCode 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}
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:22
HypoBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
Definition HypoBase.cxx:12
TimeBurner(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
virtual StatusCode execute(const EventContext &eventContext) const override
Gaudi::Property< unsigned int > m_sleepTimeMillisec
Definition TimeBurner.h:24
ToolHandleArray< IAlgTool > m_hypoTools
Definition TimeBurner.h:29
virtual StatusCode initialize() override
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.