| The Gaudi Framework v32r1 (f65d50dc)

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:
54 SmartIF<INTupleSvc> m_ntupleSvc;
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
RootHistCnv::RNTupleCnv
NTuple converter class definition.
Definition: RNTupleCnv.h:23
RootHistCnv::RConverter
Root Converter.
Definition: RConverter.h:31
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:34
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:172
RootHistCnv::parseName
bool parseName(const std::string &full, std::string &blk, std::string &var)
Definition: RNTupleCnv.cpp:236
RootHistCnv::RNTupleCnv::initialize
StatusCode initialize() override
Initialize the converter.
Definition: RNTupleCnv.cpp:39
RConverter.h
RootHistCnv::RNTupleCnv::finalize
StatusCode finalize() override
Finalize the converter.
Definition: RNTupleCnv.cpp:51
std::string
STL class.
INTupleSvc
Definition: INTupleSvc.h:36
INTuple
NTuple interface class definition.
Definition: INTuple.h:81
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:59
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
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.
RootHistCnv::createNTupleItem
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
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:54
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
RootHistCnv::RNTupleCnv::createRep
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
Definition: RNTupleCnv.cpp:120
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:85
RootHistCnv::RNTupleCnv::rootVarType
virtual std::string rootVarType(int)
Return ROOT type info:
Definition: RNTupleCnv.cpp:200