|
|
|||
File indexing completed on 2025-12-17 10:28:20
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 //==================================================================== 0012 // NTuple converter class definition 0013 //-------------------------------------------------------------------- 0014 // 0015 // Author : M.Frank 0016 // 0017 //==================================================================== 0018 #ifndef GAUDIROOTCNV_ROOTNTUPLECNV_H 0019 #define GAUDIROOTCNV_ROOTNTUPLECNV_H 1 0020 0021 // Include files 0022 #include <RootCnv/RootAddress.h> 0023 #include <RootCnv/RootStatCnv.h> 0024 0025 // Forward declarations 0026 class INTuple; 0027 class TBranch; 0028 0029 /* 0030 * Gaudi namespace declaration 0031 */ 0032 namespace Gaudi { 0033 0034 /** @class RootNTupleCnv RootNTupleCnv.h Root/RootNTupleCnv.h 0035 * 0036 * NTuple converter class definition for NTuples writted/read using ROOT. 0037 * 0038 * Description: 0039 * Definition of the generic converter for row wise and column wise 0040 * Ntuples. 0041 * 0042 * @author M.Frank 0043 * @version 1.0 0044 */ 0045 class GAUDI_API RootNTupleCnv : public RootStatCnv { 0046 protected: 0047 /// Update the transient object: NTuples end here when reading records 0048 StatusCode i__updateObjRoot( RootAddress* rpA, INTuple* tupl, TTree* tree, RootDataConnection* con ); 0049 0050 #ifdef __POOL_COMPATIBILITY 0051 /// Update the transient object: NTuples end here when reading records 0052 StatusCode i__updateObjPool( RootAddress* rpA, INTuple* tupl, TTree* tree, RootDataConnection* con ); 0053 #endif 0054 0055 public: 0056 /// Standard constructor 0057 /** 0058 * @param clid [IN] Class ID of the object type to be converted. 0059 * @param db [IN] Pointer to POOL database interface 0060 * @param svc [IN] Pointer to Gaudi service locator 0061 * 0062 * @return Reference to RootNTupleCnv object 0063 */ 0064 RootNTupleCnv( long typ, const CLID& clid, ISvcLocator* svc, RootCnvSvc* mgr ) 0065 : RootStatCnv( typ, clid, svc, mgr ) {} 0066 0067 /** Converter overrides: Convert the transient object 0068 * to the requested representation. 0069 * 0070 * @param pObj [IN] Valid pointer to DataObject 0071 * @param refpAdd [OUT] Location to store pointer to the 0072 * object's opaque address 0073 * 0074 * @return Status code indicating success or failure 0075 */ 0076 StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAdd ) override; 0077 0078 /// Resolve the references of the converted object. 0079 /** 0080 * @param pAdd [IN] Valid pointer to the object's opaque address 0081 * @param pObj [IN] Valid pointer to DataObject 0082 * 0083 * @return Status code indicating success or failure 0084 */ 0085 StatusCode fillRepRefs( IOpaqueAddress* pAdd, DataObject* pObj ) override; 0086 0087 /** Converter overrides: Update the references of an 0088 * updated transient object. 0089 * 0090 * @param pAddress [IN] Valid pointer to the object's opaque address 0091 * @param refpObject [OUT] Location to store pointer to DataObject 0092 * 0093 * @return Status code indicating success or failure 0094 */ 0095 StatusCode createObj( IOpaqueAddress* pAddress, DataObject*& refpObject ) override; 0096 0097 /** Converter overrides: Update the references of an 0098 * updated transient object. 0099 * 0100 * @param pAddress [IN] Valid pointer to the object's opaque address 0101 * @param pObject [IN] Valid pointer to DataObject 0102 * 0103 * @return Status code indicating success or failure 0104 */ 0105 StatusCode fillObjRefs( IOpaqueAddress* /* pAddress */, DataObject* /* pObject */ ) override { 0106 return StatusCode::SUCCESS; 0107 } 0108 0109 /** Update the transient object: NTuples end here when reading records 0110 * 0111 * @param pAddress [IN] Valid pointer to the object's opaque address 0112 * @param pObject [IN] Valid pointer to DataObject 0113 * 0114 * @return Status code indicating success or failure 0115 */ 0116 StatusCode updateObj( IOpaqueAddress* pAddress, DataObject* pObject ) override; 0117 0118 /** Converter overrides: Update the references of an 0119 * updated transient object. 0120 * 0121 * @param pAddress [IN] Valid pointer to the object's opaque address 0122 * @param pObject [IN] Valid pointer to DataObject 0123 * 0124 * @return Status code indicating success or failure 0125 */ 0126 StatusCode updateObjRefs( IOpaqueAddress* /* pAddress */, DataObject* /* pObject */ ) override { 0127 return StatusCode::SUCCESS; 0128 } 0129 0130 /** Converter overrides: Update the converted representation 0131 * of a transient object. 0132 * 0133 * @param pAddress [IN] Valid pointer to the object's opaque address 0134 * @param pObject [IN] Valid pointer to DataObject 0135 * 0136 * @return Status code indicating success or failure 0137 */ 0138 StatusCode updateRep( IOpaqueAddress* /* pAddress */, DataObject* /* pObject */ ) override { 0139 return StatusCode::SUCCESS; 0140 } 0141 0142 /** Converter overrides: Update the converted representation of a 0143 * transient object. 0144 * 0145 * @param pAddress [IN] Valid pointer to the object's opaque address 0146 * @param pObject [IN] Valid pointer to DataObject 0147 * 0148 * @return Status code indicating success or failure 0149 */ 0150 StatusCode updateRepRefs( IOpaqueAddress* /* pAddress */, DataObject* /* pObject */ ) override { 0151 return StatusCode::SUCCESS; 0152 } 0153 }; 0154 } // namespace Gaudi 0155 0156 #endif // GAUDIROOTCNV_ROOTNTUPLECNV_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|