diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx index e225e256a0e58e1f3be5ca1de9afa4114a7eb729..5583f602f6d506436579d257d5ba205f2f8a7b91 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx @@ -55,12 +55,18 @@ StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const { if ( roiCollection->size() > 1 ) ATH_MSG_INFO ( "roiMode but multiple rois found, will only use the first one"); - SG::WriteHandle<ConstDataVector<CaloCellContainer> > cellContainer = SG::WriteHandle<ConstDataVector<CaloCellContainer> > ( m_cellContainerKey, context ); - auto cdv = CxxUtils::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + //SG::WriteHandle<ConstDataVector<CaloCellContainer> > cellContainer = SG::WriteHandle<ConstDataVector<CaloCellContainer> > ( m_cellContainerKey, context ); + SG::WriteHandle<CaloConstCellContainer > cellContainer = SG::WriteHandle< CaloConstCellContainer > ( m_cellContainerKey, context ); + auto cdv = CxxUtils::make_unique<CaloConstCellContainer>(SG::VIEW_ELEMENTS); for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { ATH_MSG_INFO ( "Running on RoI " << *roiDescriptor<< " FS="<<roiDescriptor->isFullscan()); if ( roiDescriptor->isFullscan() ) { ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *cdv )); + cdv->setHasCalo(CaloCell_ID::LAREM); + cdv->setHasCalo(CaloCell_ID::LARHEC); + cdv->setHasCalo(CaloCell_ID::LARFCAL); + cdv->setHasCalo(CaloCell_ID::TILE); + cdv->updateCaloIterators(); } else { LArTT_Selector<LArCellCont> sel; @@ -80,14 +86,14 @@ StatusCode HLTCaloCellMaker::execute_r( const EventContext& context ) const { ATH_CHECK( cellContainerV.record( std::move(cdv) ) ); for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) { if ( roiDescriptor->isFullscan() ) { - auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS); ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *c )); cellContainerV->push_back( c.release()->asDataVector() ); } else { LArTT_Selector<LArCellCont> sel; ATH_CHECK(m_dataAccessSvc->loadCollections( context, *roiDescriptor, TTEM, 2, sel )); - auto c = std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS); + auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS); int cc(0); for( const auto cell : sel ) {c->push_back( cell ); cc++;} cellContainerV->push_back( c.release()->asDataVector() ); diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h index 066be31f2ef336c0311490bd4de83f51787004bb..8bc57f09856657a5cb1d15efaeb6b0ea7ef07bf3 100644 --- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h +++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h @@ -25,6 +25,7 @@ #include "StoreGate/ReadCondHandleKey.h" #include "CaloEvent/CaloCellContainerVector.h" #include "AthContainers/ConstDataVector.h" +#include "CaloEvent/CaloConstCellContainer.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "TileConditions/TileEMScale.h" @@ -44,7 +45,7 @@ class HLTCaloCellMaker: public AthReentrantAlgorithm { SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey; SG::WriteHandleKey<ConstDataVector<CaloCellContainerVector> > m_cellContainerVKey; - SG::WriteHandleKey<ConstDataVector<CaloCellContainer> > m_cellContainerKey; + SG::WriteHandleKey<CaloConstCellContainer > m_cellContainerKey; /// FIXME: Temporary (i hope) to get dependency needed by BS converter. SG::ReadCondHandleKey<TileEMScale> m_tileEMScaleKey;