25 static const std::string
prefix =
"HLT_TrigRoiDescriptorCollection";
26 static const std::string newPrefix =
"HLT_xAOD__RoiDescriptorStore";
38 std::vector< std::string > keys;
42 std::vector< std::vector< uint32_t > > roiserial;
44 bool just_dandy =
true;
52 for(
const std::string& key : keys ) {
57 whk = ( ( key.find( prefix ) == 0 ) ?
58 ( newPrefix + key.substr( prefix.size() ) ) :
73 auto store = std::make_unique< xAOD::RoiDescriptorStore >();
74 auto aux = std::make_unique< xAOD::RoiDescriptorStoreAuxInfo >();
75 store->setStore(
aux.get() );
76 store->setSerialised( roiserial );
79 ATH_CHECK( wh.record( std::move( store ), std::move(
aux ) ) );
81 else just_dandy =
false;
85 return just_dandy ? StatusCode::SUCCESS : StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
ServiceHandle< StoreGateSvc > & evtStore()
An algorithm that can be simultaneously executed in multiple threads.
RoiWriter(const std::string &name, ISvcLocator *pSvcLocator)
Algorithm constructor.
virtual StatusCode execute(const EventContext &ctx) const override
Execute the conversion.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Property holding a SG store/key/clid from which a WriteHandle is made.
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())