Skip to content
Snippets Groups Projects
Commit d997e670 authored by Scott Snyder's avatar Scott Snyder Committed by Walter Lampl
Browse files

DataModelTestDataCommon: Add DummyDecisionWriter.

Add an algorithm to record a dummy xAOD::TrigDecision object.
To be used to avoid warnings from the BS output conversion.
parent e9053505
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,14 @@ bswrite = ['DMTest::CVec#cvec.-dVar2.-dtest',
from TrigNavigation.TrigNavigationConf import HLT__Navigation
from DataModelTestDataCommon.DataModelTestDataCommonConf import \
DMTest__xAODTestDecor
DMTest__xAODTestDecor, \
DMTest__DummyDecisionWriter
from DataModelTestDataWrite.DataModelTestDataWriteConf import \
DMTest__xAODTestWriteCVec, \
DMTest__xAODTestWriteHVec, \
DMTest__xAODTestWriteCView, \
DMTest__HLTResultWriter
topSequence += DMTest__DummyDecisionWriter ("DummyDecisionWriter")
topSequence += DMTest__xAODTestWriteCVec ("xAODTestWriteCVec",
CVecKey = 'HLT_DMTest__CVec_cvec')
topSequence += DMTest__xAODTestWriteCView ("xAODTestWriteCView",
......
/*
* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
*/
/**
* @file DataModelTestDataCommon/src/DummyDecisionWriter.cxx
* @author scott snyder <snyder@bnl.gov>
* @date Jul, 2019
* @brief Make a dummy xAOD::TrigDecision to avoid warnings
* when writing bytestream.
*/
#include "DummyDecisionWriter.h"
#include "xAODTrigger/TrigDecisionAuxInfo.h"
#include "StoreGate/WriteHandle.h"
namespace DMTest {
/**
* @brief Algorithm initialization; called at the beginning of the job.
*/
StatusCode DummyDecisionWriter::initialize()
{
ATH_CHECK( m_decisionKey.initialize() );
return StatusCode::SUCCESS;
}
/**
* @brief Algorithm event processing.
*/
StatusCode DummyDecisionWriter::execute (const EventContext& ctx) const
{
SG::WriteHandle<xAOD::TrigDecision> decH (m_decisionKey, ctx);
ATH_CHECK( decH.record (std::make_unique<xAOD::TrigDecision>(),
std::make_unique<xAOD::TrigDecisionAuxInfo>()) );
return StatusCode::SUCCESS;
}
} // namespace DMTest
// This file's extension implies that it's C, but it's really -*- C++ -*-.
/*
* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
*/
/**
* @file DataModelTestDataCommon/src/DummyDecisionWriter.h
* @author scott snyder <snyder@bnl.gov>
* @date Jul, 2019
* @brief Make a dummy xAOD::TrigDecision to avoid warnings
* when writing bytestream.
*/
#ifndef DATAMODELTESTDATACOMMON_DUMMYDECISIONWRITER_H
#define DATAMODELTESTDATACOMMON_DUMMYDECISIONWRITER_H
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "xAODTrigger/TrigDecision.h"
#include "StoreGate/WriteHandleKey.h"
namespace DMTest {
/**
* @brief Make a dummy xAOD::TrigDecision to avoid warnings
* when writing bytestream.
*/
class DummyDecisionWriter
: public AthReentrantAlgorithm
{
public:
using AthReentrantAlgorithm::AthReentrantAlgorithm;
/**
* @brief Algorithm initialization; called at the beginning of the job.
*/
virtual StatusCode initialize() override;
/**
* @brief Algorithm event processing.
*/
virtual StatusCode execute (const EventContext& ctx) const override;
private:
SG::WriteHandleKey<xAOD::TrigDecision> m_decisionKey
{ this, "DecisionKey", "decisions", "" };
};
} // namespace DMTest
#endif // not DATAMODELTESTDATACOMMON_DUMMYDECISIONWRITER_H
/*
* Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
*/
// $Id$
......@@ -24,6 +24,7 @@
#include "../CondAlg2.h"
#include "../MetaWriterAlg.h"
#include "../MetaReaderAlg.h"
#include "../DummyDecisionWriter.h"
DECLARE_COMPONENT( DMTest::xAODTestReadSymlink )
DECLARE_COMPONENT( DMTest::xAODTestReadDecor )
......@@ -37,6 +38,7 @@ DECLARE_COMPONENT( DMTest::CondAlg1 )
DECLARE_COMPONENT( DMTest::CondAlg2 )
DECLARE_COMPONENT( DMTest::MetaWriterAlg )
DECLARE_COMPONENT( DMTest::MetaReaderAlg )
DECLARE_COMPONENT( DMTest::DummyDecisionWriter )
DECLARE_COMPONENT( DMTest::xAODTestReadSymlinkTool )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment