Commit 49dba52b authored by Tim Martin's avatar Tim Martin
Browse files

More AthenaMT migration for the legacy offline trigger reconstruction path

parent 6ae35b53
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigDecisionCnvAlg.cxx 688265 2015-08-08 16:31:45Z stelzer $
......@@ -7,14 +7,6 @@
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// EDM include(s):
#include "TrigDecisionEvent/TrigDecision.h"
#include "xAODTrigger/TrigDecision.h"
#include "xAODTrigger/TrigDecisionAuxInfo.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/TriggerInfo.h"
// Local include(s):
#include "TrigDecisionCnvAlg.h"
......@@ -22,15 +14,16 @@ namespace xAODMaker {
TrigDecisionCnvAlg::TrigDecisionCnvAlg( const std::string& name,
ISvcLocator* svcLoc )
: AthAlgorithm( name, svcLoc ),
: AthReentrantAlgorithm( name, svcLoc ),
m_cnvTool( "xAODMaker::TrigDecisionCnvTool/TrigDecisionCnvTool",
this ) {
}
declareProperty( "AODKey", m_aodKey = "TrigDecision" );
declareProperty( "xAODKey", m_xaodKey = "TrigDecision" );
declareProperty( "CnvTool", m_cnvTool );
TrigDecisionCnvAlg::~TrigDecisionCnvAlg() {
}
StatusCode TrigDecisionCnvAlg::initialize() {
// Greet the user:
......@@ -38,6 +31,10 @@ namespace xAODMaker {
ATH_MSG_DEBUG( " AOD Key: " << m_aodKey );
ATH_MSG_DEBUG( "xAOD Key: " << m_xaodKey );
CHECK( m_eventInfoKey.initialize() );
CHECK( m_aodKey.initialize() );
CHECK( m_xaodKey.initialize() );
// Retrieve the converter tool:
CHECK( m_cnvTool.retrieve() );
......@@ -45,28 +42,28 @@ namespace xAODMaker {
return StatusCode::SUCCESS;
}
StatusCode TrigDecisionCnvAlg::execute() {
StatusCode TrigDecisionCnvAlg::execute(const EventContext& ctx) const {
// Retrieve the AOD object:
const TrigDec::TrigDecision* aod = 0;
CHECK( evtStore()->retrieve( aod, m_aodKey ) );
SG::ReadHandle<TrigDec::TrigDecision> aodRH{m_aodKey, ctx};
CHECK( aodRH.isValid() );
const TrigDec::TrigDecision* aod = aodRH.cptr();
// trigger Info
const EventInfo * evtInfo ( nullptr );
CHECK( evtStore()->retrieve( evtInfo ) );
const TriggerInfo * trigInfo = evtInfo ? evtInfo->trigger_info() : nullptr ;
SG::ReadHandle<EventInfo> eiRH{m_eventInfoKey, ctx};
const TriggerInfo* trigInfo = eiRH.isValid() ? eiRH.cptr()->trigger_info() : nullptr;
// Create the xAOD object and its auxiliary store:
xAOD::TrigDecisionAuxInfo* aux = new xAOD::TrigDecisionAuxInfo();
xAOD::TrigDecision* xaod = new xAOD::TrigDecision();
xaod->setStore( aux );
std::unique_ptr<xAOD::TrigDecisionAuxInfo> aux = std::make_unique<xAOD::TrigDecisionAuxInfo>();
std::unique_ptr<xAOD::TrigDecision> xaod = std::make_unique<xAOD::TrigDecision>();
xaod->setStore( aux.get() );
// Fill the xAOD object:
CHECK( m_cnvTool->convert( aod, xaod, trigInfo ) );
CHECK( m_cnvTool->convert( aod, xaod.get(), trigInfo ) );
// Record the xAOD objects:
CHECK( evtStore()->record( aux, m_xaodKey + "Aux." ) );
CHECK( evtStore()->record( xaod, m_xaodKey ) );
SG::WriteHandle<xAOD::TrigDecision> writeHandle{m_xaodKey, ctx};
CHECK( writeHandle.record(std::move(xaod), std::move(aux)));
// Return gracefully:
return StatusCode::SUCCESS;
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigDecisionCnvAlg.h 578517 2014-01-15 13:48:04Z krasznaa $
......@@ -12,9 +12,17 @@
#include <string>
// Gaudi/Athena include(s):
#include "AthenaBaseComps/AthAlgorithm.h"
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
// EDM include(s):
#include "TrigDecisionEvent/TrigDecision.h"
#include "xAODTrigger/TrigDecision.h"
#include "xAODTrigger/TrigDecisionAuxInfo.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/TriggerInfo.h"
// Local include(s):
#include "xAODTriggerCnv/ITrigDecisionCnvTool.h"
......@@ -31,25 +39,25 @@ namespace xAODMaker {
* $Revision: 578517 $
* $Date: 2014-01-15 14:48:04 +0100 (Wed, 15 Jan 2014) $
*/
class TrigDecisionCnvAlg : public AthAlgorithm {
class TrigDecisionCnvAlg : public AthReentrantAlgorithm {
public:
/// Regular Algorithm constructor
TrigDecisionCnvAlg( const std::string& name, ISvcLocator* svcLoc );
virtual ~TrigDecisionCnvAlg();
/// Function initialising the algorithm
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/// Function executing the algorithm
virtual StatusCode execute();
virtual StatusCode execute(const EventContext& ctx) const override;
private:
/// StoreGate key of the input object
std::string m_aodKey;
/// StoreGate key for the output object
std::string m_xaodKey;
/// Handle to the converter tool
ToolHandle< ITrigDecisionCnvTool > m_cnvTool;
SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo", "StoreGate key of the legacy event info object"};
SG::ReadHandleKey<TrigDec::TrigDecision> m_aodKey{this, "AODKey", "TrigDecision", "StoreGate key of the input object"};
SG::WriteHandleKey<xAOD::TrigDecision> m_xaodKey{this, "xAODKey", "xTrigDecision", "StoreGate key for the output object"};
ToolHandle< ITrigDecisionCnvTool > m_cnvTool{this, "CnvTool", "xAODMaker::TrigDecisionCnvTool/TrigDecisionCnvTool", "Handle to the converter tool"};
}; // class TrigDecisionCnvAlg
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigDecisionCnvTool.cxx 688265 2015-08-08 16:31:45Z stelzer $
......@@ -81,6 +81,11 @@ namespace xAODMaker {
declareProperty ("TrigDecisionTool", m_tdt);
}
TrigDecisionCnvTool::~TrigDecisionCnvTool() {
}
StatusCode TrigDecisionCnvTool::initialize() {
// Greet the user:
......@@ -105,7 +110,7 @@ namespace xAODMaker {
* something else if not
*/
StatusCode TrigDecisionCnvTool::convert( const TrigDec::TrigDecision* aod,
xAOD::TrigDecision* xaod, const TriggerInfo * triggerInfo) {
xAOD::TrigDecision* xaod, const TriggerInfo * triggerInfo) const {
ATH_MSG_DEBUG( "converting TrigDecision to xAOD::TrigDecision" );
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigDecisionCnvTool.h 688265 2015-08-08 16:31:45Z stelzer $
......@@ -48,13 +48,15 @@ namespace xAODMaker {
TrigDecisionCnvTool( const std::string& type, const std::string& name,
const IInterface* parent );
virtual ~TrigDecisionCnvTool();
/// Function initialising the tool
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/// Function filling an xAOD::TrigDecision object with information
virtual StatusCode convert( const TrigDec::TrigDecision* aod,
xAOD::TrigDecision* xaod,
const TriggerInfo* level1TriggerInfo );
const TriggerInfo* level1TriggerInfo ) const final;
private:
/// Function setting the status of one bit in a bitset
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: $
......@@ -7,11 +7,6 @@
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// EDM include(s):
#include "TrigSteeringEvent/HLTResult.h"
#include "xAODTrigger/TrigNavigation.h"
#include "xAODTrigger/TrigNavigationAuxInfo.h"
// Local include(s):
#include "TrigNavigationCnvAlg.h"
......@@ -21,40 +16,43 @@ using namespace xAODMaker;
TrigNavigationCnvAlg::TrigNavigationCnvAlg( const std::string& name,
ISvcLocator* svcLoc )
: AthAlgorithm( name, svcLoc ),
: AthReentrantAlgorithm( name, svcLoc ),
m_cnvTool( "xAODMaker::TrigNavigationCnvTool/TrigNavigationCnvTool",
this ) {
declareProperty( "AODKeys", m_aodKeys = {"HLTResult_HLT", "HLTResult_EF", "HLTResult_L2"}, "Copy content from this HLT results in order, stop wiht the first present" );
declareProperty( "xAODKey", m_xaodKey = "TrigNavigation" );
declareProperty( "CnvTool", m_cnvTool );
}
StatusCode TrigNavigationCnvAlg::initialize() {
ATH_MSG_DEBUG( " AOD Key: " << m_aodKeys );
ATH_MSG_DEBUG( " AOD Key L2: " << m_aodKeyL2 << " doL2:" << m_doL2 );
ATH_MSG_DEBUG( " AOD Key EF: " << m_aodKeyEF << " doEF:" << m_doEF );
ATH_MSG_DEBUG( " AOD Key HLT: " << m_aodKeyHLT << " doHLT:" << m_doHLT );
ATH_MSG_DEBUG( "xAOD Key: " << m_xaodKey );
CHECK( m_cnvTool.retrieve() );
return StatusCode::SUCCESS;
}
StatusCode TrigNavigationCnvAlg::execute() {
for ( auto key: m_aodKeys ) {
if ( evtStore()->contains(ClassID_traits<HLT::HLTResult>::ID(), key) ) {
ATH_MSG_DEBUG("Using the HLTResult#" << key << " other keys: " << m_aodKeys << " absent or skipped " );
const HLT::HLTResult* aod;
CHECK( evtStore()->retrieve( aod, key ) );
xAOD::TrigNavigationAuxInfo* aux = new xAOD::TrigNavigationAuxInfo();
xAOD::TrigNavigation* xaod = new xAOD::TrigNavigation();
xaod->setStore(aux);
CHECK( m_cnvTool->convert( aod, xaod ) );
CHECK( evtStore()->record( aux, m_xaodKey + "Aux." ) );
CHECK( evtStore()->record( xaod, m_xaodKey ) );
break;
}
if ((size_t)m_doL2 + (size_t)m_doEF + (size_t)m_doHLT > 1) {
ATH_MSG_ERROR("Cannot convert more than one level. Asked for doL2:" << m_doL2 << " doEF:" << m_doEF << " doHLT:" << m_doHLT);
return StatusCode::FAILURE;
}
CHECK( m_aodKeyL2.initialize(m_doL2) );
CHECK( m_aodKeyEF.initialize(m_doEF) );
CHECK( m_aodKeyHLT.initialize(m_doHLT) );
CHECK( m_xaodKey.initialize() );
return StatusCode::SUCCESS;
}
StatusCode TrigNavigationCnvAlg::execute(const EventContext& ctx) const {
const SG::ReadHandleKey<HLT::HLTResult>& key = (m_doL2 ? m_aodKeyL2 : (m_doEF ? m_aodKeyEF : m_aodKeyHLT));
SG::ReadHandle<HLT::HLTResult> hltRH{key, ctx};
CHECK( hltRH.isValid() );
const HLT::HLTResult* aod = hltRH.cptr();
std::unique_ptr<xAOD::TrigNavigationAuxInfo> aux = std::make_unique<xAOD::TrigNavigationAuxInfo>();
std::unique_ptr<xAOD::TrigNavigation> xaod = std::make_unique<xAOD::TrigNavigation>();
xaod->setStore(aux.get());
CHECK( m_cnvTool->convert( aod, xaod.get() ) );
SG::WriteHandle<xAOD::TrigNavigation> navWH{m_xaodKey, ctx};
CHECK( navWH.record( std::move(xaod), std::move(aux)) );
return StatusCode::SUCCESS;
}
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: $
......@@ -12,9 +12,14 @@
#include <string>
// Gaudi/Athena include(s):
#include "AthenaBaseComps/AthAlgorithm.h"
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
// EDM include(s):
#include "TrigSteeringEvent/HLTResult.h"
#include "xAODTrigger/TrigNavigation.h"
#include "xAODTrigger/TrigNavigationAuxInfo.h"
// Local include(s):
#include "xAODTriggerCnv/ITrigNavigationCnvTool.h"
......@@ -31,25 +36,31 @@ namespace xAODMaker {
* $Revision: $
* $Date: $
*/
class TrigNavigationCnvAlg : public AthAlgorithm {
class TrigNavigationCnvAlg : public AthReentrantAlgorithm {
public:
/// Regular Algorithm constructor
TrigNavigationCnvAlg( const std::string& name, ISvcLocator* svcLoc );
/// Function initialising the algorithm
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/// Function executing the algorithm
virtual StatusCode execute();
virtual StatusCode execute(const EventContext& ctx) const override;
private:
Gaudi::Property<bool> m_doL2{this, "doL2", true, "flag whether or not to consider L2 trigger information"};
Gaudi::Property<bool> m_doEF{this, "doEF", true, "flag whether or not to consider L3 (EF) trigger information"};
Gaudi::Property<bool> m_doHLT{this, "doHLT", true, "flag whether or not to consider merged L2EF=HLT trigger information"};
/// StoreGate key of the input object
std::vector<std::string> m_aodKeys;
SG::ReadHandleKey<HLT::HLTResult> m_aodKeyL2{this, "AODKeyL2", "HLTResult_L2", "Input L2 HLTResult"};
SG::ReadHandleKey<HLT::HLTResult> m_aodKeyEF{this, "AODKeyEF", "HLTResult_EF", "Input EF HLTResult"};
SG::ReadHandleKey<HLT::HLTResult> m_aodKeyHLT{this, "AODKeyHLT", "HLTResult_HLT", "Input HLT (single level) HLTResult"};
/// StoreGate key for the output object
std::string m_xaodKey;
SG::WriteHandleKey<xAOD::TrigNavigation> m_xaodKey{this, "xAODKey", "TrigNavigation", "Input HLT (single level) HLTResult"};
/// Handle to the converter tool
ToolHandle< ITrigNavigationCnvTool > m_cnvTool;
ToolHandle< ITrigNavigationCnvTool > m_cnvTool{this, "CnvTool", "xAODMaker::TrigNavigationCnvTool/TrigNavigationCnvTool", "Handle to the converter tool"};
}; // class TrigNavigationCnvAlg
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigNavigationCnvTool.h"
......@@ -8,12 +8,16 @@ xAODMaker::TrigNavigationCnvTool::TrigNavigationCnvTool( const std::string& type
: AthAlgTool(type, name, parent) {
declareInterface< ITrigNavigationCnvTool >( this );
}
xAODMaker::TrigNavigationCnvTool::~TrigNavigationCnvTool() {
}
StatusCode xAODMaker::TrigNavigationCnvTool::initialize() {
return StatusCode::SUCCESS;
}
StatusCode xAODMaker::TrigNavigationCnvTool::convert( const HLT::HLTResult* aod,
xAOD::TrigNavigation* xaod ) {
xAOD::TrigNavigation* xaod ) const {
xaod->setSerialized(aod->getNavigationResult());
return StatusCode::SUCCESS;
}
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: $
......@@ -46,13 +46,15 @@ namespace xAODMaker {
/// Regular AlgTool constructor
TrigNavigationCnvTool( const std::string& type, const std::string& name,
const IInterface* parent );
virtual ~TrigNavigationCnvTool();
/// Function initialising the tool
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/// Function filling an xAOD::TrigNavigation object with information
virtual StatusCode convert( const HLT::HLTResult* aod,
xAOD::TrigNavigation* xaod );
xAOD::TrigNavigation* xaod ) const final;
private:
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: ITrigDecisionCnvTool.h 688265 2015-08-08 16:31:45Z stelzer $
......@@ -45,7 +45,7 @@ namespace xAODMaker {
/// Function filling an xAOD::TrigDecision object with information
virtual StatusCode convert( const TrigDec::TrigDecision* aod,
xAOD::TrigDecision* xaod,
const TriggerInfo* level1TriggerInfo ) = 0;
const TriggerInfo* level1TriggerInfo ) const = 0;
/// Gaudi interface definition
static const InterfaceID& interfaceID() {
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: $
......@@ -42,7 +42,7 @@ namespace xAODMaker {
public:
/// Function filling an xAOD::TrigNavigation object with information
virtual StatusCode convert( const HLT::HLTResult* aod,
xAOD::TrigNavigation* xaod ) = 0;
xAOD::TrigNavigation* xaod ) const = 0;
/// Gaudi interface definition
static const InterfaceID& interfaceID() {
......
......@@ -126,7 +126,6 @@ class WritexAODTrigDecision ( object ) :
from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigDecisionCnvAlg
alg = xAODMaker__TrigDecisionCnvAlg()
alg.ExtraOutputs = [('xAOD::TrigDecision','StoreGateSvc+xTrigDecision')]
# In order for the conversion to work we need to setup the TrigDecisionTool such that it uses the old decision
ToolSvc.TrigDecisionTool.UseAODDecision = True
......@@ -140,8 +139,7 @@ class WritexAODTrigDecision ( object ) :
TopAlg += alg
from xAODTriggerCnv.xAODTriggerCnvConf import xAODMaker__TrigNavigationCnvAlg
navAlg = xAODMaker__TrigNavigationCnvAlg()
navAlg.ExtraOutputs = [('xAOD::TrigNavigation','StoreGateSvc+TrigNavigation')]
navAlg = xAODMaker__TrigNavigationCnvAlg('TrigNavigationCnvAlg')
TopAlg += navAlg
log.info('TrigDecision writing to xAOD enabled')
......@@ -155,7 +153,6 @@ class WriteTrigDecision ( object ) :
TopAlg = AlgSequence()
self.TrigDecMaker = TrigDecisionMaker('TrigDecMaker')
self.TrigDecMaker.ExtraOutputs = [('TrigDec::TrigDecision', 'StoreGateSvc+TrigDecision')]
TopAlg += self.TrigDecMaker
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**************************************************************************
......@@ -26,8 +26,6 @@
#include "EventInfo/EventID.h"
#include "EventInfo/EventType.h"
#include "TrigT1Result/RoIBResult.h"
#include "TrigSteeringEvent/Lvl1Result.h"
#include "TrigSteering/Lvl1ResultAccessTool.h"
......@@ -41,7 +39,7 @@
using namespace TrigDec;
TrigDecisionMaker::TrigDecisionMaker(const std::string &name, ISvcLocator *pSvcLocator)
: AthAlgorithm(name, pSvcLocator),
: AthReentrantAlgorithm(name, pSvcLocator),
m_trigConfigSvc("TrigConf::TrigConfigSvc/TrigConfigSvc", name),
m_lvl1Tool("HLT::Lvl1ResultAccessTool/Lvl1ResultAccessTool", this),
m_nEvents(0),
......@@ -56,20 +54,6 @@ TrigDecisionMaker::TrigDecisionMaker(const std::string &name, ISvcLocator *pSvcL
m_hlt_passed(0)
{
declareProperty("TrigConfigSvc", m_trigConfigSvc, "Trigger config service");
declareProperty("doL1", m_doL1 = true);
declareProperty("doL2", m_doL2 = true);
declareProperty("doEF", m_doEF = true);
declareProperty("doHLT", m_doHLT = true);
// declareProperty("doEvtInfo", m_doEvtInfo = false);
declareProperty("TrigDecisionKey", m_trigDecisionKey = "TrigDecision");
declareProperty("L1ResultKey", m_l1ResultKey = "");
declareProperty("L2ResultKey", m_l2ResultKey = "HLTResult_L2");
declareProperty("EFResultKey", m_efResultKey = "HLTResult_EF");
declareProperty("HLTResultKey", m_hltResultKey = "HLTResult_HLT");
// declareProperty("EventInfoKey", m_evtInfoKey = "McEventInfo");
// declareProperty("TrigDecisionTool", m_trigDec, "The tool to access TrigDecision");
}
......@@ -106,6 +90,7 @@ StatusCode TrigDecisionMaker::initialize()
ATH_MSG_DEBUG ( " doHLT = " << (m_doHLT ? "True":"False") ) ;
ATH_MSG_DEBUG ( " TrigDecisionKey = " << m_trigDecisionKey ) ;
ATH_MSG_DEBUG ( " TrigL1ResultKey = " << m_l1ResultKey ) ;
ATH_MSG_DEBUG ( " TrigROIBL1ResultKey = " << m_l1roibResultKey ) ;
ATH_MSG_DEBUG ( " TrigL2ResultKey = " << m_l2ResultKey ) ;
ATH_MSG_DEBUG ( " TrigEFResultKey = " << m_efResultKey ) ;
ATH_MSG_DEBUG ( " TrigHLTResultKey= " << m_hltResultKey ) ;
......@@ -113,6 +98,13 @@ StatusCode TrigDecisionMaker::initialize()
ATH_CHECK( m_lvl1Tool.retrieve() );
ATH_CHECK( m_trigConfigSvc.retrieve() );
ATH_CHECK( m_trigDecisionKey.initialize() );
ATH_CHECK( m_l1ResultKey.initialize(m_doL1) );
ATH_CHECK( m_l1roibResultKey.initialize(m_doL1) );
ATH_CHECK( m_l2ResultKey.initialize(m_doL2) );
ATH_CHECK( m_efResultKey.initialize(m_doEF) );
ATH_CHECK( m_hltResultKey.initialize(m_doHLT) );
return StatusCode::SUCCESS;
}
......@@ -153,7 +145,7 @@ StatusCode TrigDecisionMaker::finalize()
}
StatusCode TrigDecisionMaker::execute()
StatusCode TrigDecisionMaker::execute(const EventContext& ctx) const
{
// increment event counter
m_nEvents++;
......@@ -164,7 +156,7 @@ StatusCode TrigDecisionMaker::execute()
const HLT::HLTResult* efResult = 0;
const HLT::HLTResult* hltResult = 0;
ResultStatus l1Stat = getL1Result(l1Result);
ResultStatus l1Stat = getL1Result(l1Result, ctx);
if (!l1Result) {
if (l1Stat == NotRequested ) m_l1_notReq++;
else if (l1Stat == SGError || l1Stat == ProcError) m_l1_error++;
......@@ -172,7 +164,7 @@ StatusCode TrigDecisionMaker::execute()
}
else if (l1Result->isAccepted()) m_l1_passed++;
ResultStatus l2Stat = getHLTResult(l2Result, L2);
ResultStatus l2Stat = getHLTResult(l2Result, L2, ctx);
if (!l2Result) {
if (l2Stat == NotRequested ) m_l2_notReq++;
else if (l2Stat == SGError || l2Stat == ProcError) m_l2_error++;
......@@ -180,7 +172,7 @@ StatusCode TrigDecisionMaker::execute()
}
else if (l2Result->isAccepted()) m_l2_passed++;
ResultStatus efStat = getHLTResult(efResult, EF);
ResultStatus efStat = getHLTResult(efResult, EF, ctx);
if (!efResult) {
if (efStat == NotRequested ) m_ef_notReq++;
else if (efStat == SGError || efStat == ProcError) m_ef_error++;
......@@ -189,7 +181,7 @@ StatusCode TrigDecisionMaker::execute()
else if (efResult->isAccepted()) m_ef_passed++;
ResultStatus hltStat = getHLTResult(hltResult, HLT);
ResultStatus hltStat = getHLTResult(hltResult, HLT, ctx);
if (!hltResult) {
if (hltStat == NotRequested ) m_hlt_notReq++;
else if (hltStat == SGError || hltStat == ProcError) m_hlt_error++;
......@@ -204,7 +196,7 @@ StatusCode TrigDecisionMaker::execute()
return StatusCode::SUCCESS;
}
TrigDecision* trigDec = new TrigDecision();
std::unique_ptr<TrigDecision> trigDec = std::make_unique<TrigDecision>();
trigDec->m_configMasterKey = m_trigConfigSvc->masterKey();
......@@ -218,65 +210,49 @@ StatusCode TrigDecisionMaker::execute()
// get the bunch crossing id
const EventInfo* eventInfo = 0;