22 #pragma warning(disable:1572)
53 m_ntupleSvc = serviceLocator()->service(
"NTupleSvc");
86 TTree* rtree = (TTree*) rAddr->
tObj();
89 unsigned long* info = (
unsigned long*)pAddress->
ipar();
90 setDirectory(pAddress->
par()[0]);
91 status = readData(rtree, dynamic_cast<INTuple*>(pObject), info[1]++);
115 StatusCode status = readObject(pAddress, refpObject);
123 TTree* tobj = (TTree*) rAddr->
tObj();
124 status = load(tobj, nt);
151 StatusCode status = dataMgr->objectParent(pReg, pParentReg);
155 TDirectory* pParentDir = (TDirectory*)pParAddr->
ipar()[0];
158 std::string dsc = pReg->
name().substr(1);
159 gDirectory = pParentDir;
160 status =
book(dsc, dynamic_cast<INTuple*>(pObject), pTree);
164 status = createAddress(pObject, gDirectory, pTree, pAddr);
168 return writeData(pTree, dynamic_cast<INTuple*>(pObject));
175 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
182 TTree* pTree = (TTree*) rAddr->
tObj();
184 return writeData(pTree, dynamic_cast<INTuple*>(pObject));
204 TDirectory* pDir = (TDirectory*)pAddr->
ipar()[0];
210 TTree* pTree = (TTree*) rAddr->
tObj();
211 if ( 0 != pDir && 0 != pTree ) {
212 gDirectory->cd(pDir->GetPath());
213 pTree->Write(
"",TObject::kOverwrite);
220 return ( createRep(pObj,pAddr) );
254 if ( (sp=full.find(
"/")) != -1 ) {
255 blk = full.substr(0,sp);
256 var = full.substr(sp+1,full.length());
269 #define INSTANTIATE(TYP) \
270 template INTupleItem* createNTupleItem<TYP>(std::string itemName, std::string blockName, std::string index_name, int indexRange, int arraySize, TYP minimum, TYP maximum, INTuple* tuple)
272 namespace RootHistCnv {
276 std::string indexName,
277 int indexRange,
int arraySize,
282 if (blockName !=
"") {
283 varName = blockName +
"/" + itemName;
291 if (min == 0 && max == 0) {
297 if (indexName ==
"") {
299 if (arraySize == 1) {
315 if (arraySize == 1) {
319 indexName, indexRange,
326 indexRange, arraySize,
virtual StatusCode updateRep(IOpaqueAddress *pAddr, DataObject *pObj)
Update the converted representation of a transient object.
virtual const std::string * par() const =0
Retrieve String parameters.
Definition of the MsgStream class used to transmit messages.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode finalize()
Initialize the converter.
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
RNTupleCnv(ISvcLocator *svc, const CLID &clid)
Standard constructor.
virtual StatusCode initialize()
Initialize the converter.
bool isSuccess() const
Test for a status code of SUCCESS.
static TYP min()
Minimal number of data.
virtual const name_type & name() const =0
Name of the directory (or key)
IRegistry * registry() const
Get pointer to Registry.
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
virtual StatusCode finalize()
Finalize the converter.
NTuple interface class definition.
virtual StatusCode initialize()
Initialize the converter.
NTuple interface class definition.
bool isValid() const
Allow for check if smart pointer is valid.
virtual IRegistry * registry() const =0
Update branch name.
This class is used for returning status codes from appropriate routines.
virtual TObject * tObj() const
Retrieve TObject* ptr.
static TYP max()
Maximal number of data.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
unsigned int CLID
Class ID definition.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr)
Convert the transient object to the requested representation.
virtual ~RNTupleCnv()
Standard destructor.
virtual const id_type & identifier() const =0
Full identifier (or key)
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
bool parseName(std::string full, std::string &blk, std::string &var)
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj)
Create the transient representation of an object.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual StatusCode updateObj(IOpaqueAddress *pAddr, DataObject *refpObj)
Update the transient object from the other representation.
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
INTupleItem * createNTupleItem(std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup)
virtual std::string rootVarType(int)
Return ROOT type info: