2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
6 * @file AsgDataHandles/WriteHandleKey.icc
7 * @author Nils Krumnack <Nils.Erik.Krumnack@cern.h>
8 * @author scott snyder <snyder@bnl.gov> (for original version)
9 * @brief Property holding a SG store/key/clid from which a WriteHandle is made.
18 * @param key The StoreGate key for the object.
19 * @param storeName Name to use for the store, if it's not encoded in sgkey.
21 * The provided key may actually start with the name of the store,
22 * separated by a "+": "MyStore+Obj". If no "+" is present
23 * the store named by @c storeName is used.
26 WriteHandleKey<T>::WriteHandleKey (const std::string& key /*= ""*/)
27 // const std::string& storeName /*= "StoreGateSvc"*/)
29 // : VarHandleKey (ClassID_traits<T>::ID(), key,
30 // Gaudi::DataHandle::Writer,
37 * @brief auto-declaring Property Constructor.
38 * @param owner Owning component.
39 * @param name name of the Property
40 * @param key default StoreGate key for the object.
41 * @param doc Documentation string.
43 * will associate the named Property with this WHK via declareProperty
45 * The provided key may actually start with the name of the store,
46 * separated by a "+": "MyStore+Obj". If no "+" is present
47 * the store named by @c storeName is used.
50 template <class OWNER, class K>
52 WriteHandleKey<T>::WriteHandleKey( OWNER* owner,
54 const K& key /*= {}*/,
55 std::string doc /*= ""*/)
56 : WriteHandleKey<T> (key)
58 owner->declareProperty(std::move(name), *this, std::move(doc));
63 * @brief Change the key of the object to which we're referring.
64 * @param sgkey The StoreGate key for the object.
66 * The provided key may actually start with the name of the store,
67 * separated by a "+": "MyStore+Obj". If no "+" is present,
68 * the store is not changed.
71 WriteHandleKey<T>& WriteHandleKey<T>::operator= (const std::string& sgkey)
73 VarHandleKey::operator= (sgkey);