Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 INTupleItem;
10 class INTupleSvc;
11 class INTuple;
12 class TTree;
13 
14 namespace RootHistCnv {
15 
23  class RNTupleCnv : public RConverter {
24  public:
26  StatusCode initialize() override;
28  StatusCode finalize() override;
29 
31  StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& refpObj ) override;
33  StatusCode updateObj( IOpaqueAddress* pAddr, DataObject* refpObj ) override;
35  StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAddr ) override;
37  StatusCode updateRep( IOpaqueAddress* pAddr, DataObject* pObj ) override;
38 
39  protected:
41  RNTupleCnv( ISvcLocator* svc, const CLID& clid );
42 
44  virtual StatusCode load( TTree* tree, INTuple*& refpObj ) = 0;
46  virtual StatusCode book( const std::string& desc, INTuple* pObj, TTree*& tree ) = 0;
48  virtual StatusCode writeData( TTree* rtree, INTuple* pObj ) = 0;
50  virtual StatusCode readData( TTree* rtree, INTuple* pObj, long ievt ) = 0;
51 
52  protected:
55 
56  virtual std::string rootVarType( int );
57  };
58 
60  template <class TYP>
61  INTupleItem* createNTupleItem( std::string itemName, std::string blockName, std::string indexName, int indexRange,
62  int arraySize, TYP minimum, TYP maximum, INTuple* tuple );
63 
64  bool parseName( const std::string& full, std::string& blk, std::string& var );
65 
66 } // namespace RootHistCnv
67 
68 #endif // RootHistCnv_RNTupleCnv_H
NTuple converter class definition.
Definition: RNTupleCnv.h:23
Root Converter.
Definition: RConverter.h:31
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
Definition: RNTupleCnv.cpp:34
virtual StatusCode book(const std::string &desc, INTuple *pObj, TTree *&tree)=0
Book a new N tuple.
StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj) override
Update the converted representation of a transient object.
Definition: RNTupleCnv.cpp:172
bool parseName(const std::string &full, std::string &blk, std::string &var)
Definition: RNTupleCnv.cpp:236
StatusCode initialize() override
Initialize the converter.
Definition: RNTupleCnv.cpp:39
StatusCode finalize() override
Finalize the converter.
Definition: RNTupleCnv.cpp:51
STL class.
NTuple interface class definition.
Definition: INTuple.h:81
NTuple interface class definition.
Definition: INTuple.h:27
StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj) override
Update the transient object from the other representation.
Definition: RNTupleCnv.cpp:59
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
virtual StatusCode load(TTree *tree, INTuple *&refpObj)=0
Create the transient representation of an object.
virtual StatusCode writeData(TTree *rtree, INTuple *pObj)=0
Write N tuple data.
INTupleItem * createNTupleItem(std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup)
Add an item of a given type to the N tuple.
Definition: RNTupleCnv.cpp:261
Opaque address interface definition.
SmartIF< INTupleSvc > m_ntupleSvc
Reference to N tuple service.
Definition: RNTupleCnv.h:54
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
Definition: RNTupleCnv.cpp:120
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
Definition: RNTupleCnv.cpp:85
virtual std::string rootVarType(int)
Return ROOT type info:
Definition: RNTupleCnv.cpp:200