22 using namespace Gaudi;
31 RootDirectoryCnv::RootDirectoryCnv (
long typ,
50 dsc =
"Directory containing statistics results.";
53 dsc =
"File containing statistics results.";
58 string ident = containerName(pObj->
registry());
60 return saveDescription(path, ident, dsc, ident, objType());
65 return updateObjRefs(pAddr, pObj);
73 typedef vector<RootNTupleDescriptor*> REFS;
79 typedef vector<IRegistry*> Leaves;
81 string fname = fileName(pReg);
82 string cntName = containerName(pReg);
87 TBranch* b = con->
getBranch(
"##Descriptors",
"GaudiStatisticsDescription");
89 for(Long64_t
n=b->GetEntries(),
i=0;
i<
n; ++
i) {
92 int nb = b->GetEntry(
i);
94 string s = ref->
container.substr(0,cntName.length());
96 <<
" " << ident <<
" " << cntName <<
endmsg;
98 if ( ref->
container.length() >= cntName.length()+1 ) {
99 if ( ref->
container.find(
'/',cntName.length()+1) == string::npos ) {
110 status = m_dataMgr->objectLeaves(pObject, leaves);
112 for(REFS::iterator
i = refs.begin();
i != refs.end(); ++
i) {
113 REFS::value_type& ref = *
i;
115 bool need_to_add =
true;
116 for(Leaves::iterator j=leaves.begin(); j != leaves.end(); ++j ) {
117 string curr_leaf = containerName(*j);
118 if ( curr_leaf == ref->container ) {
130 string spar[] = { fname, ref->container};
131 unsigned long ipar[] = { ~0x0UL, ~0x0UL };
132 status = m_dbMgr->createAddress(repSvcType(),
139 string top = topLevel(pReg);
140 string leaf_name = top + ref->container.substr(7);
141 status = m_dataMgr->registerAddress(leaf_name, pA);
144 <<
" of type " << ref->clid <<
endmsg;
147 makeError(
"Failed to register leaves to directory:"+ident,
false).ignore();
150 makeError(
"Failed to create leave address to directory:"+ident,
false).ignore();
154 makeError(
"Failed to add leaves to directory:"+ident,
false).ignore();
160 return makeError(
"Failed to access required tuple data description.",
false);
164 for(REFS::iterator k = refs.begin(); k != refs.end(); ++k) {
165 if ( *k )
delete (*k);