2 template< class CONTAINER >
3 StatusCode FTAGValidationAlgorithm::retrieveCollectionfromStoreGate( const EventContext& context,
4 const CONTAINER*& Collection,
5 const SG::ReadHandleKey< CONTAINER >& inputKey ) const {
7 ATH_MSG_DEBUG( "Retrieving collection from StoreGate with key '" << inputKey.key() << "' ..." );
9 if ( Collection != nullptr ) {
10 ATH_MSG_ERROR( "Input Collection is not empty. We are overwriting objects!" );
11 return StatusCode::FAILURE;
14 SG::ReadHandle< CONTAINER > ContainerHandle = SG::makeHandle( inputKey,context );
15 CHECK( ContainerHandle.isValid() );
17 Collection = ContainerHandle.get();
18 ATH_MSG_DEBUG( "Found a total of " << Collection->size() << " objects inside the collection ['" << inputKey.key() << "']" );
20 return StatusCode::SUCCESS;