22 using namespace Gaudi;
33 RootDirectoryCnv::RootDirectoryCnv (
long typ,
52 dsc =
"Directory containing statistics results.";
55 dsc =
"File containing statistics results.";
60 string ident = containerName(pObj->
registry());
62 return saveDescription(path, ident, dsc, ident, objType());
67 return updateObjRefs(pAddr, pObj);
83 string fname = fileName(pReg);
84 string cntName = containerName(pReg);
87 status = m_dbMgr->connectDatabase(fname, IDataConnection::READ, &con);
89 TBranch* b = con->
getBranch(
"##Descriptors",
"GaudiStatisticsDescription");
91 for(Long64_t n=b->GetEntries(),
i=0;
i<n; ++
i) {
94 int nb = b->GetEntry(
i);
96 string s = ref->
container.substr(0,cntName.length());
98 <<
" " << ident <<
" " << cntName <<
endmsg;
100 if ( ref->
container.length() >= cntName.length()+1 ) {
101 if ( ref->
container.find(
'/',cntName.length()+1) == string::npos ) {
112 status = m_dataMgr->objectLeaves(pObject, leaves);
114 for(REFS::iterator
i = refs.
begin();
i != refs.
end(); ++
i) {
115 REFS::value_type&
ref = *
i;
117 bool need_to_add =
true;
118 for(Leaves::iterator j=leaves.begin(); j != leaves.end(); ++j ) {
119 string curr_leaf = containerName(*j);
120 if ( curr_leaf == ref->container ) {
132 string spar[] = { fname, ref->container};
133 unsigned long ipar[] = { ~0x0UL, ~0x0UL };
134 status = m_dbMgr->createAddress(repSvcType(),
141 string top = topLevel(pReg);
142 string leaf_name = top + ref->container.substr(7);
143 status = m_dataMgr->registerAddress(leaf_name, pA);
146 <<
" of type " << ref->clid <<
endmsg;
149 makeError(
"Failed to register leaves to directory:"+ident,
false).ignore();
152 makeError(
"Failed to create leave address to directory:"+ident,
false).ignore();
156 makeError(
"Failed to add leaves to directory:"+ident,
false).ignore();
162 return makeError(
"Failed to access required tuple data description.",
false);
166 for(REFS::iterator k = refs.begin(); k != refs.end(); ++k) {
167 if ( *k )
delete (*k);