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.
Loading
Please sign in to comment