| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

RNTupleCnv.h
Go to the documentation of this file.
1 #ifndef ROOTHISTCNV_RNTUPLECNV_H
2 #define ROOTHISTCNV_RNTUPLECNV_H 1
3
4 // Include files
5 #include "RConverter.h"
6
7 // Forward declarations
8 class ISvcLocator;
9 class NTUPLEINFO;
10 class INTupleItem;
11 class INTupleSvc;
12 class INTuple;
13 class TTree;
14
15 namespace RootHistCnv
16 {
17
25 class RNTupleCnv : public RConverter
26 {
27 public:
29 StatusCode initialize() override;
31 StatusCode finalize() override;
32
34 StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& refpObj ) override;
36 StatusCode updateObj( IOpaqueAddress* pAddr, DataObject* refpObj ) override;
38 StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAddr ) override;
40 StatusCode updateRep( IOpaqueAddress* pAddr, DataObject* pObj ) override;
41
42 protected:
44 RNTupleCnv( ISvcLocator* svc, const CLID& clid );
45
47 ~RNTupleCnv() override = default;
48
50 virtual StatusCode load( TTree* tree, INTuple*& refpObj ) = 0;
52 virtual StatusCode book( const std::string& desc, INTuple* pObj, TTree*& tree ) = 0;
54 virtual StatusCode writeData( TTree* rtree, INTuple* pObj ) = 0;
56 virtual StatusCode readData( TTree* rtree, INTuple* pObj, long ievt ) = 0;
57
58 protected:
60 SmartIF<INTupleSvc> m_ntupleSvc;
61
62 virtual std::string rootVarType( int );
63 };
64
66 template <class TYP>
67 INTupleItem* createNTupleItem( NTUPLEINFO& tags, long i, INTuple* tuple, TYP minimum, TYP maximum, long& size );
68
69 template <class TYP>
70 INTupleItem* createNTupleItem( std::string itemName, std::string blockName, std::string indexName, int indexRange,
71 int arraySize, TYP minimum, TYP maximum, INTuple* tuple );
72
73 bool parseName( const std::string& full, std::string& blk, std::string& var );
74
75 } // namespace RootHistCnv
76
77 #endif // RootHistCnv_RNTupleCnv_H
RootHistCnv::RNTupleCnv
NTuple converter class definition.
Definition: RNTupleCnv.h:25
RootHistCnv::RConverter
Root Converter.
Definition: RConverter.h:33
SmartIF< INTupleSvc >
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
RootHistCnv::RNTupleCnv::RNTupleCnv
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
Definition: RNTupleCnv.cpp:35
RootHistCnv::RNTupleCnv::book
virtual StatusCode book(const std::string &desc, INTuple *pObj, TTree *&tree)=0
Book a new N tuple.
RootHistCnv::RNTupleCnv::updateRep
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Update the converted representation of a transient object.
Definition: RNTupleCnv.cpp:181
RootHistCnv::parseName
bool parseName(const std::string &full, std::string &blk, std::string &var)
Definition: RNTupleCnv.cpp:246
RootHistCnv::RNTupleCnv::initialize
StatusCode initialize() override
Initialize the converter.
Definition: RNTupleCnv.cpp:40
RConverter.h
RootHistCnv::RNTupleCnv::finalize
StatusCode finalize() override
Finalize the converter.
Definition: RNTupleCnv.cpp:53
RootHistCnv::RNTupleCnv::~RNTupleCnv
~RNTupleCnv() override=default
Standard destructor.
std::string
STL class.
INTupleSvc
Definition: INTupleSvc.h:37
INTuple
NTuple interface class definition.
Definition: INTuple.h:82
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:27
RootHistCnv::RNTupleCnv::updateObj
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj) override
Update the transient object from the other representation.
Definition: RNTupleCnv.cpp:62
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
RootHistCnv
Definition: DirectoryCnv.h:17
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
RootHistCnv::RNTupleCnv::load
virtual StatusCode load(TTree *tree, INTuple *&refpObj)=0
Create the transient representation of an object.
RootHistCnv::RNTupleCnv::writeData
virtual StatusCode writeData(TTree *rtree, INTuple *pObj)=0
Write N tuple data.
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
RootHistCnv::RNTupleCnv::m_ntupleSvc
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
Definition: RNTupleCnv.h:60
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:29
RootHistCnv::RNTupleCnv::createRep
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
Definition: RNTupleCnv.cpp:124
RootHistCnv::RNTupleCnv::readData
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
RootHistCnv::RNTupleCnv::createObj
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
Definition: RNTupleCnv.cpp:89
RootHistCnv::createNTupleItem
INTupleItem * createNTupleItem(std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup)
Definition: RNTupleCnv.cpp:273
RootHistCnv::RNTupleCnv::rootVarType
virtual std::string rootVarType(int)
Return ROOT type info:
Definition: RNTupleCnv.cpp:209