Skip to content
Snippets Groups Projects
Commit 26c52313 authored by scott snyder's avatar scott snyder
Browse files

Simplify varhandle initialization for handles that are possibly ignored.

If a varhandle is used, we must call initialize on it; if it is not used,
the key must be cleared.  Combine these by extending initialize() to take
a flag.  If true, we proceed as usual; if false, we clear the key and
return success without doing anything else.

Also some small cleanups to tests.
parent 444db604
No related merge requests found
Showing
with 211 additions and 176 deletions
Sun Feb 26 19:45:14 EST 2017
WARNING: TCMALLOCDIR not defined, will use libc malloc
Sat Mar 18 00:04:33 CET 2017
Preloading tcmalloc_minimal.so
Py:Athena INFO including file "AthenaCommon/Preparation.py"
Py:Athena INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
Py:Athena INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [private/private] -- built on [2017-03-17 23:36]
Py:Athena INFO including file "AthenaCommon/Bootstrap.py"
Py:Athena INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
Py:Athena INFO executing ROOT6Setup
Py:Athena INFO including file "AthenaCommon/Execution.py"
[?1034hPy:Athena INFO including file "AthenaCommon/Execution.py"
Py:Athena INFO including file "AthExStoreGateExample/StoreGateExample_Reentrant_jobOptions.py"
Py:ConfigurableDb INFO Read module info for 409 configurables from 2 genConfDb files
Py:ConfigurableDb INFO Read module info for 5250 configurables from 26 genConfDb files
Py:ConfigurableDb INFO No duplicates have been found: that's good !
Py:Athena INFO including file "AthenaCommon/runbatch.py"
# setting LC_ALL to "C"
ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
running on karma on Sun Feb 26 19:45:17 2017
Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
running on lxplus090.cern.ch on Sat Mar 18 00:04:44 2017
====================================================================================================================================
ApplicationMgr INFO Successfully loaded modules : AthenaServices
ApplicationMgr INFO Application Manager Configured successfully
......@@ -23,13 +22,13 @@ ApplicationMgr INFO Updating Gaudi::PluginService::SetDebug(level) to leve
StatusCodeSvc INFO initialize
AthDictLoaderSvc INFO in initialize...
AthDictLoaderSvc INFO acquired Dso-registry
ClassIDSvc INFO getRegistryEntries: read 2261 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 2251 CLIDRegistry entries for module ALL
ChronoStatSvc INFO Number of skipped events for MemStat-1
CoreDumpSvc INFO install f-a-t-a-l handler... (flag = -1)
CoreDumpSvc INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
AthenaEventLoopMgr INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
AthMasterSeq INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq
ClassIDSvc INFO getRegistryEntries: read 1053 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 768 CLIDRegistry entries for module ALL
AthAlgSeq INFO Member list: WriteDataReentrant, ReadDataReentrant
WriteDataReentrant INFO in initialize()
StoreGateSvc DEBUG Property update for OutputLevel : new value = 1
......@@ -46,44 +45,41 @@ HistogramPersis...WARNING Histograms saving not required.
ApplicationMgr INFO Application Manager Initialized successfully
ApplicationMgr INFO Application Manager Started successfully
ClassIDSvc INFO getRegistryEntries: read 359 CLIDRegistry entries for module ALL
StoreGateSvc_Impl DEBUG Recorded object @0x55ec9e109130 with key of type EventInfo(CLID 2101)
in DataObject @0x55ec9e0c1f30
object modifiable when retrieved
AthenaEventLoopMgr INFO ===>>> start of run 1 <<<===
AthenaEventLoopMgr INFO ===>>> start processing event #1, run #1 0 events processed so far <<<===
WriteDataReentrant INFO in execute()
WriteDataReentrantWARNING we expect an error message here
StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key dobj and clid 8000
Pre-existing valid DataProxy @0x55ec9e0ec4a0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55ec9e0efe20
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55ec9e0bfbd0
VarHandle(Store... ERROR Control/StoreGate/src/VarHandleBase.cxx:603 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
Pre-existing valid DataProxy @0x137821b0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10b6e270
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x1378b860
VarHandle(Store... ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
WriteDataReentrantWARNING end of error message
WriteDataReentrant INFO registered all data objects
WriteDataReentrant INFO StoreGate structure before returning from execute
<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>>
SGImplSvc(StoreGateSvc_Impl)::dump():
Found 2 proxies for ClassID 1434 (BaseClass):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e108b00 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9dff1b20 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b6d0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b7c0 --- key: dobj
Found 1 proxy for ClassID 2101 (EventInfo):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0c1f30 --- key:
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c1c0 --- key:
Found 3 proxies for ClassID 8000 (MyDataObj):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e108b00 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9dff1b20 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0f4b30 --- key: dobj2
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b6d0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b7c0 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b360 --- key: dobj2
Found 1 proxy for ClassID 9967 (DataVector<MyContObj>):
flags: ( valid, locked, reset) --- data: 0x55ec9e0e5fb0 --- key: cobj
flags: ( valid, locked, reset) --- data: 0x13782300 --- key: cobj
Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e10e100 --- key: linkvec
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b0e0 --- key: linkvec
Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0ea490 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b2c0 --- key: WriteDataReentrant
Found 1 proxy for ClassID 193758082 (std::map<std::string,float>):
flags: ( valid, locked, reset) --- data: 0x55ec9de51bd0 --- key: mkey
flags: ( valid, locked, reset) --- data: 0x1378b540 --- key: mkey
Found 1 proxy for ClassID 202242136 (std::vector<float>):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0d67e0 --- key: vFloat
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b680 --- key: vFloat
Found 1 proxy for ClassID 289238765 (TestDataObject):
flags: ( valid, locked, reset) --- data: 0x55ec9e0a2580 --- key: testobj
flags: ( valid, locked, reset) --- data: 0x1378b9a0 --- key: testobj
<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

ReadDataReentrant INFO in execute()
......@@ -94,59 +90,56 @@ ReadDataReentrant INFO pVec [1] = 2
ReadDataReentrant INFO pVec [2] = 3
ReadDataReentrant INFO ListVecLinks::linked element 1
ReadDataReentrant INFO ListVecLinks::linked element 3
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55ec9e10e52c
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55ec9e10e56c
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x1376333c
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x1376337c
AthenaEventLoopMgr INFO ===>>> done processing event #1, run #1 1 events processed so far <<<===
StoreGateSvc_Impl DEBUG Clearing store with forceRemove=0
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55ec9e108b00 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0x55ec9dff1b20 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e3aa0, recorded with key=, CLID=2101, containing data object @0x55ec9e0c1f30 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f4c90, recorded with key=dobj2, CLID=8000, containing data object @0x55ec9e0f4b30 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f0560, recorded with key=cobj, CLID=9967, containing data object @0x55ec9e0e5fb0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e10e290, recorded with key=linkvec, CLID=9983, containing data object @0x55ec9e10e100 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ea690, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55ec9e0ea490 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9de51df0, recorded with key=mkey, CLID=193758082, containing data object @0x55ec9de51bd0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0d6970, recorded with key=vFloat, CLID=202242136, containing data object @0x55ec9e0d67e0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e5e60, recorded with key=testobj, CLID=289238765, containing data object @0x55ec9e0a2580 ... -> DONE
StoreGateSvc_Impl DEBUG Recorded object @0x55ec9e109130 with key of type EventInfo(CLID 2101)
in DataObject @0x55ec9e0a2580
object modifiable when retrieved
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x1378b6d0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0x1378b7c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13781f80, recorded with key=, CLID=2101, containing data object @0x1378c1c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137824c0, recorded with key=dobj2, CLID=8000, containing data object @0x1378b360 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782370, recorded with key=cobj, CLID=9967, containing data object @0x13782300 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137825a0, recorded with key=linkvec, CLID=9983, containing data object @0x1378b0e0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782530, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x1378b2c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782450, recorded with key=mkey, CLID=193758082, containing data object @0x1378b540 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137823e0, recorded with key=vFloat, CLID=202242136, containing data object @0x1378b680 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782290, recorded with key=testobj, CLID=289238765, containing data object @0x1378b9a0 ... -> DONE
AthenaEventLoopMgr INFO ===>>> start processing event #2, run #1 1 events processed so far <<<===
WriteDataReentrant INFO in execute()
WriteDataReentrantWARNING we expect an error message here
StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key dobj and clid 8000
Pre-existing valid DataProxy @0x55ec9e0ec4a0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55ec9e0d67c0
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55ec9de51bd0
VarHandle(Store... ERROR Control/StoreGate/src/VarHandleBase.cxx:603 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
Pre-existing valid DataProxy @0x137821b0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10b6e2c0
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x1378b540
VarHandle(Store... ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
WriteDataReentrantWARNING end of error message
WriteDataReentrant INFO registered all data objects
WriteDataReentrant INFO StoreGate structure before returning from execute
<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>>
SGImplSvc(StoreGateSvc_Impl)::dump():
Found 2 proxies for ClassID 1434 (BaseClass):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0f4ac0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0d67e0 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b220 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c120 --- key: dobj
Found 1 proxy for ClassID 2101 (EventInfo):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0a2580 --- key:
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b9a0 --- key:
Found 3 proxies for ClassID 8000 (MyDataObj):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0f4ac0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0d67e0 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9dff1b20 --- key: dobj2
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b220 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c120 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b7c0 --- key: dobj2
Found 1 proxy for ClassID 9967 (DataVector<MyContObj>):
flags: ( valid, locked, reset) --- data: 0x55ec9e0ef2c0 --- key: cobj
flags: ( valid, locked, reset) --- data: 0x13782300 --- key: cobj
Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0bfbd0 --- key: linkvec
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b860 --- key: linkvec
Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e108b00 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b6d0 --- key: WriteDataReentrant
Found 1 proxy for ClassID 193758082 (std::map<std::string,float>):
flags: ( valid, locked, reset) --- data: 0x55ec9e10e100 --- key: mkey
flags: ( valid, locked, reset) --- data: 0x1378b720 --- key: mkey
Found 1 proxy for ClassID 202242136 (std::vector<float>):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0ea490 --- key: vFloat
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b0e0 --- key: vFloat
Found 1 proxy for ClassID 289238765 (TestDataObject):
flags: ( valid, locked, reset) --- data: 0x55ec9e0f4a70 --- key: testobj
flags: ( valid, locked, reset) --- data: 0x1378b4a0 --- key: testobj
<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

ReadDataReentrant INFO in execute()
......@@ -157,59 +150,56 @@ ReadDataReentrant INFO pVec [1] = 2
ReadDataReentrant INFO pVec [2] = 3
ReadDataReentrant INFO ListVecLinks::linked element 1
ReadDataReentrant INFO ListVecLinks::linked element 3
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55ec9e0ef0ec
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55ec9e0ef12c
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x1379c13c
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x1379c17c
AthenaEventLoopMgr INFO ===>>> done processing event #2, run #1 2 events processed so far <<<===
StoreGateSvc_Impl DEBUG Clearing store with forceRemove=0
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55ec9e0f4ac0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0x55ec9e0d67e0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e3aa0, recorded with key=, CLID=2101, containing data object @0x55ec9e0a2580 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f4c90, recorded with key=dobj2, CLID=8000, containing data object @0x55ec9dff1b20 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f0560, recorded with key=cobj, CLID=9967, containing data object @0x55ec9e0ef2c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e10e290, recorded with key=linkvec, CLID=9983, containing data object @0x55ec9e0bfbd0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ea690, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55ec9e108b00 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9de51df0, recorded with key=mkey, CLID=193758082, containing data object @0x55ec9e10e100 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0d6970, recorded with key=vFloat, CLID=202242136, containing data object @0x55ec9e0ea490 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e5e60, recorded with key=testobj, CLID=289238765, containing data object @0x55ec9e0f4a70 ... -> DONE
StoreGateSvc_Impl DEBUG Recorded object @0x55ec9e109130 with key of type EventInfo(CLID 2101)
in DataObject @0x55ec9e0f4a70
object modifiable when retrieved
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x1378b220 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0x1378c120 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13781f80, recorded with key=, CLID=2101, containing data object @0x1378b9a0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137824c0, recorded with key=dobj2, CLID=8000, containing data object @0x1378b7c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782370, recorded with key=cobj, CLID=9967, containing data object @0x13782300 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137825a0, recorded with key=linkvec, CLID=9983, containing data object @0x1378b860 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782530, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x1378b6d0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782450, recorded with key=mkey, CLID=193758082, containing data object @0x1378b720 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137823e0, recorded with key=vFloat, CLID=202242136, containing data object @0x1378b0e0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782290, recorded with key=testobj, CLID=289238765, containing data object @0x1378b4a0 ... -> DONE
AthenaEventLoopMgr INFO ===>>> start processing event #3, run #1 2 events processed so far <<<===
WriteDataReentrant INFO in execute()
WriteDataReentrantWARNING we expect an error message here
StoreGateSvc_Impl WARNING setupProxy:: error setting up proxy for key dobj and clid 8000
Pre-existing valid DataProxy @0x55ec9e0ec4a0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55ec9e108c60
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55ec9e10e100
VarHandle(Store... ERROR Control/StoreGate/src/VarHandleBase.cxx:603 (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
Pre-existing valid DataProxy @0x137821b0 found in Store for key dobj with clid 8000
StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10b6e270
recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x1378b720
VarHandle(Store... ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
WriteDataReentrantWARNING end of error message
WriteDataReentrant INFO registered all data objects
WriteDataReentrant INFO StoreGate structure before returning from execute
<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>>
SGImplSvc(StoreGateSvc_Impl)::dump():
Found 2 proxies for ClassID 1434 (BaseClass):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0c1f30 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0ea490 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c1c0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b450 --- key: dobj
Found 1 proxy for ClassID 2101 (EventInfo):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0f4a70 --- key:
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b4a0 --- key:
Found 3 proxies for ClassID 8000 (MyDataObj):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0c1f30 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0ea490 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0d67e0 --- key: dobj2
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c1c0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b450 --- key: dobj
flags: ( valid, UNLOCKED, reset) --- data: 0x1378c120 --- key: dobj2
Found 1 proxy for ClassID 9967 (DataVector<MyContObj>):
flags: ( valid, locked, reset) --- data: 0x55ec9e0eefd0 --- key: cobj
flags: ( valid, locked, reset) --- data: 0x13782300 --- key: cobj
Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9de51bd0 --- key: linkvec
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b540 --- key: linkvec
Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e0f4ac0 --- key: WriteDataReentrant
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b220 --- key: WriteDataReentrant
Found 1 proxy for ClassID 193758082 (std::map<std::string,float>):
flags: ( valid, locked, reset) --- data: 0x55ec9e0bfbd0 --- key: mkey
flags: ( valid, locked, reset) --- data: 0x1378b2c0 --- key: mkey
Found 1 proxy for ClassID 202242136 (std::vector<float>):
flags: ( valid, UNLOCKED, reset) --- data: 0x55ec9e108b00 --- key: vFloat
flags: ( valid, UNLOCKED, reset) --- data: 0x1378b860 --- key: vFloat
Found 1 proxy for ClassID 289238765 (TestDataObject):
flags: ( valid, locked, reset) --- data: 0x55ec9e0f4b30 --- key: testobj
flags: ( valid, locked, reset) --- data: 0x1378b360 --- key: testobj
<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

ReadDataReentrant INFO in execute()
......@@ -220,22 +210,22 @@ ReadDataReentrant INFO pVec [1] = 2
ReadDataReentrant INFO pVec [2] = 3
ReadDataReentrant INFO ListVecLinks::linked element 1
ReadDataReentrant INFO ListVecLinks::linked element 3
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55ec9e0a4d7c
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55ec9e0a4dbc
ReadDataReentrant INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x1376333c
ReadDataReentrant INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x1376337c
AthenaEventLoopMgr INFO ===>>> done processing event #3, run #1 3 events processed so far <<<===
StoreGateSvc_Impl DEBUG Clearing store with forceRemove=0
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55ec9e0c1f30 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0x55ec9e0ea490 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e3aa0, recorded with key=, CLID=2101, containing data object @0x55ec9e0f4a70 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f4c90, recorded with key=dobj2, CLID=8000, containing data object @0x55ec9e0d67e0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0f0560, recorded with key=cobj, CLID=9967, containing data object @0x55ec9e0eefd0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e10e290, recorded with key=linkvec, CLID=9983, containing data object @0x55ec9de51bd0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0ea690, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55ec9e0f4ac0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9de51df0, recorded with key=mkey, CLID=193758082, containing data object @0x55ec9e0bfbd0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0d6970, recorded with key=vFloat, CLID=202242136, containing data object @0x55ec9e108b00 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55ec9e0e5e60, recorded with key=testobj, CLID=289238765, containing data object @0x55ec9e0f4b30 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x1378c1c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0x1378b450 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13781f80, recorded with key=, CLID=2101, containing data object @0x1378b4a0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137824c0, recorded with key=dobj2, CLID=8000, containing data object @0x1378c120 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782370, recorded with key=cobj, CLID=9967, containing data object @0x13782300 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137825a0, recorded with key=linkvec, CLID=9983, containing data object @0x1378b540 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782530, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x1378b220 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782450, recorded with key=mkey, CLID=193758082, containing data object @0x1378b2c0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x137823e0, recorded with key=vFloat, CLID=202242136, containing data object @0x1378b860 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13782290, recorded with key=testobj, CLID=289238765, containing data object @0x1378b360 ... -> DONE
StoreGateSvc VERBOSE Stop StoreGateSvc
StoreGateSvc VERBOSE stop: setting service priority to 101 so that event stores get finalized and cleared before other stores
ApplicationMgr INFO Application Manager Stopped successfully
......@@ -248,24 +238,24 @@ AthMasterSeq INFO Finalizing AthMasterSeq...
StoreGateSvc VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
StoreGateSvc_Impl VERBOSE Finalizing StoreGateSvc_Impl - package version StoreGate-00-00-00
StoreGateSvc_Impl DEBUG Clearing store with forceRemove=1
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0e3aa0, recorded with key=, CLID=2101, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0a2420, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0ec4a0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0f4c90, recorded with key=dobj2, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0f0560, recorded with key=cobj, CLID=9967, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e10e290, recorded with key=linkvec, CLID=9983, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0ea690, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9de51df0, recorded with key=mkey, CLID=193758082, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0d6970, recorded with key=vFloat, CLID=202242136, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55ec9e0e5e60, recorded with key=testobj, CLID=289238765, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13781f80, recorded with key=, CLID=2101, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782220, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x137821b0, recorded with key=dobj, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x137824c0, recorded with key=dobj2, CLID=8000, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782370, recorded with key=cobj, CLID=9967, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x137825a0, recorded with key=linkvec, CLID=9983, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782530, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782450, recorded with key=mkey, CLID=193758082, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x137823e0, recorded with key=vFloat, CLID=202242136, containing data object @0 ... -> DONE
StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13782290, recorded with key=testobj, CLID=289238765, containing data object @0 ... -> DONE
AthDictLoaderSvc INFO in finalize...
ToolSvc INFO Removing all tools created by ToolSvc
*****Chrono***** INFO ****************************************************************************************************
*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered)
*****Chrono***** INFO ****************************************************************************************************
ChronoStatSvc INFO Time User : Tot= 200 [ms] #= 1
ChronoStatSvc INFO Time User : Tot= 130 [ms] #= 1
*****Chrono***** INFO ****************************************************************************************************
ChronoStatSvc.f... INFO Service finalized successfully 
ApplicationMgr INFO Application Manager Finalized successfully
......
......@@ -7,7 +7,7 @@
* @file ReadDataReentrant.h
* @author scott snyder <snyder@bnl.gov>
* @date Jan, 2016
* @brief
* @brief Testing reentrant algorithms.
*/
......@@ -33,6 +33,7 @@
#include "AthLinks/ElementLink.h"
#include "AthenaKernel/DefaultKey.h"
#include "AthenaKernel/errorcheck.h"
/////////////////////////////////////////////////////////////////////////////
......@@ -52,8 +53,9 @@ ReadDataReentrant::ReadDataReentrant(const std::string& name, ISvcLocator* pSvcL
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
StatusCode ReadDataReentrant::initialize(){
StatusCode ReadDataReentrant::initialize()
{
errorcheck::ReportMessage::hideErrorLocus();
ATH_MSG_INFO ("in initialize()");
......
......@@ -9,7 +9,7 @@
* @file ReadDataReentrant.h
* @author scott snyder <snyder@bnl.gov>
* @date Jan, 2016
* @brief
* @brief Testing reentrant algorithms.
*/
......
......@@ -7,7 +7,7 @@
* @file WriteDataReentrant.cxx
* @author scott snyder <snyder@bnl.gov>
* @date Jan, 2016
* @brief
* @brief Testing reentrant algorithms.
*/
......@@ -31,7 +31,6 @@
#include "AthenaKernel/DefaultKey.h"
#include "AthenaKernel/errorcheck.h"
#include "CxxUtils/make_unique.h"
/////////////////////////////////////////////////////////////////////////////
......@@ -56,6 +55,8 @@ WriteDataReentrant::WriteDataReentrant(const std::string& name,
StatusCode WriteDataReentrant::initialize()
{
errorcheck::ReportMessage::hideErrorLocus();
ATH_MSG_INFO ("in initialize()");
ATH_CHECK( m_dobjKey.initialize() );
ATH_CHECK( m_dobjKey2.initialize() );
......@@ -96,20 +97,20 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
// Part 1: Recording objects to SG
SG::WriteHandle<MyDataObj> dobj (m_dobjKey, ctx);
dobj = CxxUtils::make_unique<MyDataObj>(1);
dobj = std::make_unique<MyDataObj>(1);
//now we create a second MyDataObj instance...
//...try to record it as we did for the first. Since dobj2 is also a
//MyDataObj we expect to see an error
ATH_MSG_WARNING ("we expect an error message here");
EXPECT_EXCEPTION (std::runtime_error,
dobj = CxxUtils::make_unique<MyDataObj>(2));
dobj = std::make_unique<MyDataObj>(2));
ATH_MSG_WARNING ("end of error message");
//here we go again...
//... but this time we register the dobj3 using this algo name as key
auto dobj3 = SG::makeHandle (m_dobjKey3, ctx);
dobj3 = CxxUtils::make_unique<MyDataObj>(3);
dobj3 = std::make_unique<MyDataObj>(3);
SG::WriteHandle<TestDataObject> testobj (m_testObjectKey, ctx);
if (m_testObject->refCount() != 1) std::abort();
......@@ -119,9 +120,9 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
#if 0
{
SG::WriteHandle<MyDataObj> dobj4 (m_dobjKey4, ctx);
ATH_CHECK( dobj4.recordOrRetrieve (CxxUtils::make_unique<MyDataObj>(4)) );
ATH_CHECK( dobj4.recordOrRetrieve (std::make_unique<MyDataObj>(4)) );
MyDataObj* pp = &*dobj4;
ATH_CHECK( dobj4.recordOrRetrieve (CxxUtils::make_unique<MyDataObj>(4)) );
ATH_CHECK( dobj4.recordOrRetrieve (std::make_unique<MyDataObj>(4)) );
assert (pp == &*dobj4);
}
#endif
......@@ -131,20 +132,20 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
// Part 2: storing collections in the SG
SG::WriteHandle<DataVector<MyContObj> > cobj (m_cobjKey, ctx);
ATH_CHECK( cobj.record (CxxUtils::make_unique<DataVector<MyContObj> >()) );
ATH_CHECK( cobj.record (std::make_unique<DataVector<MyContObj> >()) );
cobj->reserve(10);
cobj->push_back (CxxUtils::make_unique<MyContObj> (11.3, 132));
cobj->push_back (CxxUtils::make_unique<MyContObj> (41.7, 291));
cobj->push_back (std::make_unique<MyContObj> (11.3, 132));
cobj->push_back (std::make_unique<MyContObj> (41.7, 291));
// as above with a vector of integers
SG::WriteHandle<std::vector<float> > vFloat (m_vFloatKey, ctx);
vFloat = CxxUtils::make_unique<std::vector<float> >();
vFloat = std::make_unique<std::vector<float> >();
vFloat->push_back(1.0);
vFloat->push_back(2.0);
vFloat->push_back(3.0);
SG::WriteHandle<MapStringFloat> m (m_mKey, ctx);
ATH_CHECK( m.record (CxxUtils::make_unique<MapStringFloat>()) );
ATH_CHECK( m.record (std::make_unique<MapStringFloat>()) );
(*m)["uno"]=1.0;
(*m)["due"]=2.0;
......@@ -209,7 +210,7 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
//since dobj is identifiable in the SG a reference to it is all we need
SG::WriteHandle<MyDataObj> dobj2 (m_dobjKey2, ctx);
dobj2 = CxxUtils::make_unique<MyDataObj> (2);
dobj2 = std::make_unique<MyDataObj> (2);
//Otherwise one could first create an empty link
DataLink<MyDataObj> dobjLink2;
......@@ -250,7 +251,7 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
// toContainedElement!
SG::WriteHandle<std::list<VecElemLink> > pLinkList (m_pLinkListKey, ctx);
pLinkList = CxxUtils::make_unique<std::list<VecElemLink> >();
pLinkList = std::make_unique<std::list<VecElemLink> >();
pLinkList->push_back(aLink);
pLinkList->push_back(thirdElementLink);
......@@ -259,7 +260,7 @@ StatusCode WriteDataReentrant::execute_r (const EventContext& ctx) const
//
typedef ElementLink<MapStringFloat> MapElemLink;
SG::WriteHandle<std::vector<MapElemLink> > linkVector (m_linkVectorKey, ctx);
linkVector = CxxUtils::make_unique<std::vector<MapElemLink> >();
linkVector = std::make_unique<std::vector<MapElemLink> >();
linkVector->push_back(MapElemLink(*m, "uno"));
MapElemLink mLink;
mLink.toContainedElement(*m, (*m)["due"]);
......
......@@ -9,7 +9,7 @@
* @file WriteDataReentrant.h
* @author scott snyder <snyder@bnl.gov>
* @date Jan, 2016
* @brief
* @brief Testing reentrant algorithms.
*/
......
......@@ -227,6 +227,8 @@ namespace SG {
/**
* @brief Retrieve and cache all information managed by a handle.
* @param used If false, then this handle is not to be used.
* Instead of normal initialization, the key will be cleared.
*
* This will retrieve and cache the associated @c DataProxy.
*
......@@ -234,6 +236,7 @@ namespace SG {
* the proxy may not exist. We return Success in that case; however,
* @c isInitialized will still return false.
*/
StatusCode initialize (bool used);
StatusCode initialize();
......
......@@ -105,9 +105,13 @@ public:
/**
* @brief If this object is used as a property, then this should be called
* during the initialize phase. It will fail if the requested StoreGate
* service cannot be found or if the key is blank.
* during the initialize phase. It will fail if the requested
* StoreGate service cannot be found or if the key is blank.
*
* @param used If false, then this handle is not to be used.
* Instead of normal initialization, the key will be cleared.
*/
StatusCode initialize (bool used);
StatusCode initialize();
......
Initializing Gaudi ApplicationMgr using job opts ../share/VarHandleBase_test.txt
JobOptionsSvc INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/VarHandleBase_test.txt
JobOptionsSvc INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/StoreGate/share/../share/VarHandleBase_test.txt
JobOptionsSvc INFO # (1,1): ApplicationMgr.ExtSvc = ["StoreGateSvc/OtherStore"]
JobOptionsSvc INFO # (2,1): OtherStore.ProxyProviderSvc = ""
JobOptionsSvc INFO Job options successfully read in from ../share/VarHandleBase_test.txt
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
running on karma on Wed Feb 15 21:44:17 2017
Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
running on lxplus050.cern.ch on Fri Mar 17 15:08:28 2017
====================================================================================================================================
ApplicationMgr INFO Application Manager Configured successfully
ClassIDSvc INFO getRegistryEntries: read 277 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 216 CLIDRegistry entries for module ALL
ClassIDSvc ERROR uncheckedSetTypePackageForID: PyAnalysisExamples-00-00-00 can not set CLID <86839352> for type name MyObj: Known CLID for this name <293847295> It was set by StoreGate-00-00-00
EventLoopMgr WARNING Unable to locate service "EventSelector"
EventLoopMgr WARNING No events will be processed from external input.
......@@ -22,10 +22,10 @@ test1
ClassIDSvc INFO getRegistryEntries: read 867 CLIDRegistry entries for module ALL
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
test2
test3
VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_impl(bool)): could not get proxy for key foox
......@@ -36,7 +36,7 @@ VarHandle(Store... ERROR FILE:LINE (const void*SG::VarHandleBase::get_impl(cons
test4
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
Initializing Gaudi ApplicationMgr using job opts ../share/VarHandleBase_test.txt
JobOptionsSvc INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/VarHandleBase_test.txt
JobOptionsSvc INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/StoreGate/share/../share/VarHandleBase_test.txt
JobOptionsSvc INFO # (1,1): ApplicationMgr.ExtSvc = ["StoreGateSvc/OtherStore"]
JobOptionsSvc INFO # (2,1): OtherStore.ProxyProviderSvc = ""
JobOptionsSvc INFO Job options successfully read in from ../share/VarHandleBase_test.txt
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
running on karma on Mon Feb 6 22:46:45 2017
Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
running on lxplus050.cern.ch on Fri Mar 17 15:25:16 2017
====================================================================================================================================
ApplicationMgr INFO Application Manager Configured successfully
ClassIDSvc INFO getRegistryEntries: read 276 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 217 CLIDRegistry entries for module ALL
ClassIDSvc ERROR uncheckedSetTypePackageForID: PyAnalysisExamples-00-00-00 can not set CLID <86839352> for type name MyObj: Known CLID for this name <293847295> It was set by StoreGate-00-00-00
EventLoopMgr WARNING Unable to locate service "EventSelector"
EventLoopMgr WARNING No events will be processed from external input.
HistogramPersis...WARNING Histograms saving not required.
......@@ -21,29 +22,29 @@ test1
ClassIDSvc INFO getRegistryEntries: read 867 CLIDRegistry entries for module ALL
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
ServiceManager FATAL No Service factory for BazSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service BazSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
test2
test3
test4
ServiceManager FATAL No Service factory for FooSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service FooSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::initialize()): code 0: VarHandleKey::initialize()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::initialize(bool)): code 0: VarHandleKey::initialize()
ERROR FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: Cannot initialize a Read/Write/Update handle with a null key.
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::initialize(bool)): code 0: VarHandleKey::initialize()
test5
ServiceManager FATAL No Service factory for FooSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service FooSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::initialize()): code 0: VarHandleKey::initialize()
VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_impl(bool)): could not get proxy for key foo
VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_impl(bool)): try using a ReadHandle
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::initialize(bool)): code 0: VarHandleKey::initialize()
test6
test7
ServiceManager FATAL No Service factory for FooSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service FooSvc
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
VarHandle(FooSv... FATAL FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: VarHandleKey::initialize()
VarHandle(FooSv... ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
VarHandle(FooSv... ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: Attempt to record an object with a null key
......@@ -53,7 +54,7 @@ VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointe
VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_fromProxy(SG::DataProxy*, bool) const): Proxy [293847295/foo] is in an invalid state
VarHandle(FooSv...WARNING FILE:LINE (void*SG::VarHandleBase::typeless_dataPointer_fromProxy(SG::DataProxy*, bool) const): Request for an invalid object; requested CLID = 293847295, proxy primary ID is 293847296
test9
VarHandleBase @0x7fffbb5654d0 store=FooSvc, clid=293847295, key=foo----------- ptr@0, proxy@0
VarHandleBase @0x7ffd1bdcb870 store=FooSvc, clid=293847295, key=foo----------- ptr@0, proxy@0
test10
ServiceManager FATAL No Service factory for FooSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service FooSvc
......
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
running on karma on Mon Feb 6 22:54:18 2017
Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
running on lxplus050.cern.ch on Fri Mar 17 15:15:13 2017
====================================================================================================================================
ApplicationMgr INFO Application Manager Configured successfully
EventLoopMgr WARNING Unable to locate service "EventSelector"
......@@ -10,9 +10,9 @@ HistogramPersis...WARNING Histograms saving not required.
ApplicationMgr INFO Application Manager Initialized successfully
ApplicationMgr Ready
test1
ClassIDSvc INFO getRegistryEntries: read 223 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 164 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 869 CLIDRegistry entries for module ALL
ServiceManager FATAL No Service factory for FooSvc available.
VarHandleKey.Se... ERROR ServiceLocatorHelper::service: can not locate service FooSvc
FATAL ../src/VarHandleKey.cxx:100 (StatusCode SG::VarHandleKey::initialize()): code 0: m_storeHandle.retrieve()
ERROR ../src/VarHandleKey.cxx:96 (StatusCode SG::VarHandleKey::initialize()): code 0: Cannot initialize a Read/Write/Update handle with a null key.
FATAL FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: m_storeHandle.retrieve()
ERROR FILE:LINE (StatusCode SG::VarHandleKey::initialize(bool)): code 0: Cannot initialize a Read/Write/Update handle with a null key.
......@@ -377,6 +377,8 @@ namespace SG {
/**
* @brief Retrieve and cache all information managed by a handle.
* @param used If false, then this handle is not to be used.
* Instead of normal initialization, the key will be cleared.
*
* This will retrieve and cache the associated @c DataProxy.
*
......@@ -385,8 +387,13 @@ namespace SG {
* @c isInitialized will still return false.
*/
StatusCode
VarHandleBase::initialize()
VarHandleBase::initialize (bool used /*= true*/)
{
if (!used) {
CHECK( VarHandleKey::initialize (used) );
return StatusCode::SUCCESS;
}
if (!m_store) {
CHECK( VarHandleKey::initialize() );
m_store = &*(this->storeHandle());
......@@ -405,6 +412,7 @@ namespace SG {
return sc;
}
StatusCode VarHandleBase::initialize() { return initialize(true); } // temp
/**
......
......@@ -7,7 +7,7 @@
* @file StoreGate/src/VarHandleKey.cxx
* @author scott snyder <snyder@bnl.gov>
* @date Jan, 2016
* @brief
* @brief A property holding a SG store/key/clid from which a VarHandle is made.
*/
......@@ -87,11 +87,19 @@ StatusCode VarHandleKey::assign (const std::string& sgkey)
/**
* @brief If this object is used as a property, then this should be called
* during the initialize phase. It will fail if the requested StoreGate
* service cannot be found or if the key is blank.
* during the initialize phase. It will fail if the requested
* StoreGate service cannot be found or if the key is blank.
*
* @param used If false, then this handle is not to be used.
* Instead of normal initialization, the key will be cleared.
*/
StatusCode VarHandleKey::initialize()
StatusCode VarHandleKey::initialize (bool used /*= true*/)
{
if (!used) {
Gaudi::DataHandle::updateKey ("");
return StatusCode::SUCCESS;
}
if (Gaudi::DataHandle::objKey() == "") {
REPORT_ERROR (StatusCode::FAILURE)
<< "Cannot initialize a Read/Write/Update handle with a null key.";
......@@ -100,6 +108,7 @@ StatusCode VarHandleKey::initialize()
CHECK( m_storeHandle.retrieve() );
return StatusCode::SUCCESS;
}
StatusCode VarHandleKey::initialize() { return initialize(true); } // temp
/**
......
......@@ -314,6 +314,15 @@ void test4()
h2.finalReset();
assert (!h2.isInitialized());
assert (h2.m_store == 0);
TestHandle h3 (293847295, "", Gaudi::DataHandle::Writer, "FooSvc");
assert (h3.initialize().isFailure());
assert (h3.initialize(false).isSuccess());
TestHandle h4 (293847295, "foo", Gaudi::DataHandle::Writer, "FooSvc");
assert (h4.key() == "foo");
assert (h4.initialize(false).isSuccess());
assert (h4.key() == "");
}
......
......@@ -14,6 +14,7 @@
#undef NDEBUG
#include "StoreGate/VarHandleKey.h"
#include "StoreGate/exceptions.h"
#include "AthenaKernel/errorcheck.h"
#include "TestTools/initGaudi.h"
#include "TestTools/expect_exception.h"
#include <cassert>
......@@ -81,14 +82,21 @@ void test1()
assert (k4.storeHandle().name() == "StoreGateSvc");
assert (!k4.storeHandle().isSet());
assert (k4.initialize().isFailure());
assert (k4.initialize(false).isSuccess());
EXPECT_EXCEPTION (SG::ExcBadHandleKey,
SG::VarHandleKey (1237, "a/b/c", Gaudi::DataHandle::Updater));
SG::VarHandleKey k5 (1236, "BarSvc/ccc", Gaudi::DataHandle::Updater, "FooSvc");
assert (k5.key() == "ccc");
assert (k5.initialize(false).isSuccess());
assert (k5.key() == "");
}
int main()
{
errorcheck::ReportMessage::hideErrorLocus();
ISvcLocator* pDum;
Athena_test::initGaudi(pDum); //need MessageSvc
......
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