| The Gaudi Framework v27r1

- 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
24 class RNTupleCnv : public RConverter {
25 public:
27 virtual StatusCode initialize();
29 virtual StatusCode finalize();
30
32 virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& refpObj);
34 virtual StatusCode updateObj( IOpaqueAddress* pAddr, DataObject* refpObj);
36 virtual StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAddr);
38 virtual StatusCode updateRep( IOpaqueAddress* pAddr, DataObject* pObj);
39
40 protected:
42 RNTupleCnv( ISvcLocator* svc, const CLID& clid );
43
45 virtual ~RNTupleCnv() = default;
46
48 virtual StatusCode load(TTree* tree, INTuple*& refpObj ) = 0;
50 virtual StatusCode book(const std::string& desc, INTuple* pObj, TTree*& tree) = 0;
52 virtual StatusCode writeData(TTree* rtree, INTuple* pObj) = 0;
54 virtual StatusCode readData(TTree* rtree, INTuple* pObj, long ievt) = 0;
55
56 protected:
58 SmartIF<INTupleSvc> m_ntupleSvc;
59
60 virtual std::string rootVarType(int);
61 };
62
64 template<class TYP>
65 INTupleItem* createNTupleItem(NTUPLEINFO& tags, long i, INTuple* tuple, TYP minimum, TYP maximum, long& size);
66
67 template<class TYP>
68 INTupleItem* createNTupleItem(std::string itemName, std::string blockName,
69 std::string indexName,
70 int indexRange, int arraySize,
71 TYP minimum, TYP maximum,
72 INTuple* tuple);
73
74 bool parseName(const std::string& full, std::string &blk, std::string &var);
75
76 } // namespace RootHistCnv
77
78 #endif // RootHistCnv_RNTupleCnv_H
RootHistCnv::RNTupleCnv
NTuple converter class definition.
Definition: RNTupleCnv.h:24
RootHistCnv::RNTupleCnv::updateRep
virtual StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj)
Update the converted representation of a transient object.
Definition: RNTupleCnv.cpp:190
RootHistCnv::RConverter
Root Converter.
Definition: RConverter.h:34
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::parseName
bool parseName(const std::string &full, std::string &blk, std::string &var)
Definition: RNTupleCnv.cpp:244
RootHistCnv::RNTupleCnv::~RNTupleCnv
virtual ~RNTupleCnv()=default
Standard destructor.
RConverter.h
RootHistCnv::RNTupleCnv::finalize
virtual StatusCode finalize()
Finalize the converter.
Definition: RNTupleCnv.cpp:56
std::string
STL class.
INTupleSvc
Definition: INTupleSvc.h:37
INTuple
NTuple interface class definition.
Definition: INTuple.h:79
RootHistCnv::RNTupleCnv::initialize
virtual StatusCode initialize()
Initialize the converter.
Definition: RNTupleCnv.cpp:43
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:26
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
RootHistCnv
Definition: DirectoryCnv.h:17
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
RootHistCnv::RNTupleCnv::createRep
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr)
Convert the transient object to the requested representation.
Definition: RNTupleCnv.cpp:130
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:58
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
ana.i
list i
Definition: ana.py:128
RootHistCnv::RNTupleCnv::readData
virtual StatusCode readData(TTree *rtree, INTuple *pObj, long ievt)=0
Read N tuple data.
RootHistCnv::RNTupleCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj)
Create the transient representation of an object.
Definition: RNTupleCnv.cpp:93
RootHistCnv::RNTupleCnv::updateObj
virtual StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj)
Update the transient object from the other representation.
Definition: RNTupleCnv.cpp:64
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:268
RootHistCnv::RNTupleCnv::rootVarType
virtual std::string rootVarType(int)
Return ROOT type info:
Definition: RNTupleCnv.cpp:222