Skip to content
Snippets Groups Projects
Commit 8a7fc6fd authored by Nils Krumnack's avatar Nils Krumnack
Browse files

add more functionality to data handles

parent b01d04a8
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!35596add Gaudi::Property, SG::ReadHandleKeyArray for AnalysisBase
...@@ -21,6 +21,12 @@ namespace SG { ...@@ -21,6 +21,12 @@ namespace SG {
* @brief class to hold an array of ReadHandleKeys * @brief class to hold an array of ReadHandleKeys
* *
* See StoreGate/ReadHandleKeyArray for details. * See StoreGate/ReadHandleKeyArray for details.
*
* This currently (13 Aug 20) contains a commented out template
* argument that was part of the original handle implementation, but
* has not yet been implemented in the standalone version. The plan
* is to either implement or remove them, depending on what is
* needed in AnalysisBase as we add more packages.
*/ */
template <class T> template <class T>
using ReadHandleKeyArray = HandleKeyArray<ReadHandle<T>, ReadHandleKey<T>/*, Gaudi::DataHandle::Reader*/ >; using ReadHandleKeyArray = HandleKeyArray<ReadHandle<T>, ReadHandleKey<T>/*, Gaudi::DataHandle::Reader*/ >;
......
...@@ -231,22 +231,22 @@ public: ...@@ -231,22 +231,22 @@ public:
// StatusCode recordNonConst (SG::DataObjectSharedPtr<T> data); // StatusCode recordNonConst (SG::DataObjectSharedPtr<T> data);
// /** /**
// * @brief Record an object to the store. * @brief Record an object to the store.
// * @param data The object to record. * @param data The object to record.
// * @param returnExisting Allow an existing object? * @param returnExisting Allow an existing object?
// * *
// * Unlike record(), this does not change the handle object. * Unlike record(), this does not change the handle object.
// * That means that one will not be able to get the object back * That means that one will not be able to get the object back
// * by dereferencing the handle. * by dereferencing the handle.
// * Returns the object placed in the store, or nullptr if there * Returns the object placed in the store, or nullptr if there
// * was an error. * was an error.
// * If there was already an object in the store with the given key, * If there was already an object in the store with the given key,
// * then return null, unless @c returnExisting is true, in which case * then return null, unless @c returnExisting is true, in which case
// * return success. In either case, @c data is destroyed. * return success. In either case, @c data is destroyed.
// */ */
// const_pointer_type put (std::unique_ptr<T> data, const_pointer_type put (std::unique_ptr<T> data/*,
// bool returnExisting = false) const; bool returnExisting = false*/) const;
// /** // /**
......
...@@ -336,29 +336,31 @@ WriteHandle<T>::WriteHandle::record (std::unique_ptr<T> data, ...@@ -336,29 +336,31 @@ WriteHandle<T>::WriteHandle::record (std::unique_ptr<T> data,
// } // }
// /** /**
// * @brief Record an object to the store. * @brief Record an object to the store.
// * @param data The object to record. * @param data The object to record.
// * @param returnExisting Allow an existing object? * @param returnExisting Allow an existing object?
// * *
// * Unlike record(), this does not change the handle object. * Unlike record(), this does not change the handle object.
// * That means that one will not be able to get the object back * That means that one will not be able to get the object back
// * by dereferencing the handle. * by dereferencing the handle.
// * Returns the object placed in the store, or nullptr if there * Returns the object placed in the store, or nullptr if there
// * was an error. * was an error.
// * If there was already an object in the store with the given key, * If there was already an object in the store with the given key,
// * then return null, unless @c returnExisting is true, in which case * then return null, unless @c returnExisting is true, in which case
// * return success. In either case, @c data is destroyed. * return success. In either case, @c data is destroyed.
// */ */
// template <class T> template <class T>
// inline inline
// typename WriteHandle<T>::const_pointer_type typename WriteHandle<T>::const_pointer_type
// WriteHandle<T>::put (std::unique_ptr<T> data, WriteHandle<T>::put (std::unique_ptr<T> data/*,
// bool returnExisting /*= false*/) const bool returnExisting / *= false*/) const
// { {
// IProxyDict* store = nullptr; const_pointer_type result = data.get();
// return doPut (nullptr, std::move(data), returnExisting, store); if (xAOD::TActiveStore::store()->record (std::move (data), key()).isFailure())
// } throw std::runtime_error ("failed to record object: " + key());
return result;
}
// /** // /**
......
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