diff --git a/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx new file mode 100644 index 0000000000000000000000000000000000000000..bb8235213dbefc3b4da7dbf8d04fad905d29003d --- /dev/null +++ b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.cxx @@ -0,0 +1,41 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +#include "CreateFullScanRoI.h" + +CreateFullScanRoI::CreateFullScanRoI(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) +{ +} + +CreateFullScanRoI::~CreateFullScanRoI() +{ +} + +StatusCode CreateFullScanRoI::initialize() +{ + //ATH_MSG_DEBUG("Use macros for logging!"); + CHECK( m_roisKey.initialize() ); + + return StatusCode::SUCCESS; +} + +StatusCode CreateFullScanRoI::finalize() +{ + return StatusCode::SUCCESS; +} + +StatusCode CreateFullScanRoI::execute_r(const EventContext& context) const +{ + + auto roisCollection = std::make_unique<TrigRoiDescriptorCollection>(); + auto roi = new TrigRoiDescriptor( true ); // this is FullScan RoI + roisCollection->push_back( roi ); + + + auto handle = SG::makeHandle( m_roisKey, context ); + CHECK( handle.record( std::move( roisCollection ) ) ); + return StatusCode::SUCCESS; +} + diff --git a/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h new file mode 100644 index 0000000000000000000000000000000000000000..884eec97ca479a306f23c6b8442baefeb6765459 --- /dev/null +++ b/Trigger/TrigSteer/L1Decoder/src/CreateFullScanRoI.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ +#ifndef L1DECODER_CREATEFULLSCANROI_H +#define L1DECODER_CREATEFULLSCANROI_H + +// Framework includes +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" + +#include <string> + +/** + * @class CreateFullScanRoI + * @brief in every event creates collection with single FullScanRoI (for testing MET, Jet and similar FS reco) + **/ +class CreateFullScanRoI : public AthReentrantAlgorithm { +public: + CreateFullScanRoI(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~CreateFullScanRoI() override; + + virtual StatusCode initialize() override; + virtual StatusCode execute_r(const EventContext& context) const override; + virtual StatusCode finalize() override; + +private: + SG::WriteHandleKey<TrigRoiDescriptorCollection> m_roisKey{ this, "RoIsKey", "FullScanRoIs", "name of the output"}; +}; + +#endif // L1DECODER_CREATEFULLSCANROI_H diff --git a/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx b/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx index 907f6e4bbe69fc247163063334108bb0ccc91105..93cdece0d64dd78d4e19333c62c2021fcc405579 100644 --- a/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/components/L1Decoder_entries.cxx @@ -15,6 +15,7 @@ #include "../MURoIsUnpackingTool.h" #include "../RerunRoIsUnpackingTool.h" #include "../PrescalingEmulationTool.h" +#include "../CreateFullScanRoI.h" DECLARE_COMPONENT( L1CaloDecoder ) @@ -34,3 +35,4 @@ DECLARE_COMPONENT( JRoIsUnpackingTool ) DECLARE_COMPONENT( TAURoIsUnpackingTool ) DECLARE_COMPONENT( PrescalingEmulationTool ) DECLARE_COMPONENT( RerunRoIsUnpackingTool ) +DECLARE_COMPONENT( CreateFullScanRoI )