There was an error fetching the commit references. Please try again later.
introduce DataHandle and DataObjectHandle
See merge requests !57 !94 !95 Major components ---------------- `DataObjID`: data object identification `DataHandle -> DataObjectHandleBase -> DataObjectHandle<T>` `DataHandle`: base class shared between ATLAS and Gaudi `DataObjectHandleBase`: base class for Handles in Gaudi, used for property manipulation and basic functionality `DataObjectHandle<T>`: user class for handles, templated in type of object in store. Usage ----- Handles are declared in header file: ```c++ DataObjectHandle<TrackObject> m_trackHnd; ``` initialized in constructor of parent `Algorithm` / `AlgTool`: ```c++ m_trackHnd("/Event/Rec/Tracks", Gaudi::DataHandle::Reader, this), ``` declared as Property in constructor of parent `Algorithm` / `AlgTool`: ```c++ declareProperty("tracks", m_trackHnd, "the tracks"); ``` after this, all dependency propagation is automatic. `DataObjectHandles` have the following attributes that can be set at runtime via the jobOptions: * Path : string path to location in EDS, eg "/Event/RAW/tracks" * Mode : int matching Gaudi::DataHandle::Mode (should probably allow string too) * Optional: bool, whether the object is optional * AlternativePaths: string array of alternative paths in EDS In order to maintain uniform syntax for all handle types, the "private only" constructor for ToolHandles has been reverted. Thus: in header: ```c++ ToolHandle<IMyTool> m_myPrivToolHandle; ToolHandle<IMyTool> m_myPubToolHandle; ``` in Algorithm constructor: ```c++ m_myPrivToolHandle("MyTool/PrivToolHandle",this), m_myPubToolHandle("MyTool/PubToolHandle"), declareProperty("PrivToolHandle", m_myPrivToolHandle, "the private tool"); declareProperty("PubToolHandle", m_myPubToolHandle, "the public tool"); ``` no need for separate call for declareXXXTool Also includes updates to GaudiHive for support of `DataObjID`. Tests and examples have been updated for new `DataHandle` usage.
Showing
- Gaudi/python/Gaudi/Configuration.py 0 additions, 1 deletionGaudi/python/Gaudi/Configuration.py
- Gaudi/python/Gaudi/Main.py 1 addition, 1 deletionGaudi/python/Gaudi/Main.py
- GaudiAlg/GaudiAlg/GaudiAlgorithm.h 26 additions, 0 deletionsGaudiAlg/GaudiAlg/GaudiAlgorithm.h
- GaudiAlg/GaudiAlg/GaudiTool.h 27 additions, 0 deletionsGaudiAlg/GaudiAlg/GaudiTool.h
- GaudiAlg/GaudiAlg/TupleObj.h 1 addition, 1 deletionGaudiAlg/GaudiAlg/TupleObj.h
- GaudiAlg/src/lib/GaudiAtomicSequencer.cpp 1 addition, 1 deletionGaudiAlg/src/lib/GaudiAtomicSequencer.cpp
- GaudiAlg/src/lib/GaudiCommon.icpp 27 additions, 15 deletionsGaudiAlg/src/lib/GaudiCommon.icpp
- GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp 22 additions, 2 deletionsGaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp
- GaudiCoreSvc/src/ApplicationMgr/ServiceManager.h 12 additions, 2 deletionsGaudiCoreSvc/src/ApplicationMgr/ServiceManager.h
- GaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp 16 additions, 1 deletionGaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp
- GaudiCoreSvc/src/ApplicationMgr/ToolSvc.h 4 additions, 0 deletionsGaudiCoreSvc/src/ApplicationMgr/ToolSvc.h
- GaudiExamples/options/MyGaudiAlg.py 3 additions, 3 deletionsGaudiExamples/options/MyGaudiAlg.py
- GaudiExamples/options/ROOT_IO/WriteAndReadHandle.py 2 additions, 2 deletionsGaudiExamples/options/ROOT_IO/WriteAndReadHandle.py
- GaudiExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py 2 additions, 2 deletions...iExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py
- GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp 19 additions, 22 deletionsGaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp
- GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h 0 additions, 2 deletionsGaudiExamples/src/AlgTools/MyGaudiAlgorithm.h
- GaudiExamples/src/IO/ReadHandleAlg.cpp 9 additions, 0 deletionsGaudiExamples/src/IO/ReadHandleAlg.cpp
- GaudiExamples/src/IO/ReadHandleAlg.h 4 additions, 6 deletionsGaudiExamples/src/IO/ReadHandleAlg.h
- GaudiExamples/src/IO/WriteHandleAlg.cpp 6 additions, 4 deletionsGaudiExamples/src/IO/WriteHandleAlg.cpp
- GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt 0 additions, 1 deletion...es/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt
Loading
Please register or sign in to comment