22 #define GAUDISVC_NTUPLESVC_CPP
114 if ( 0 != pRegistry ) {
118 std::string path = (idx==std::string::npos) ? full : full.substr(0, idx);
121 return (*i).second.service;
129 long need_update = 0;
139 for ( Leaves::iterator d = leaves.begin(); d != leaves.end(); d++ ) {
140 if ( (*d)->object() ) {
143 unsigned long typ = pA->
ipar()[1];
144 if ( typ ==
'R' || typ ==
'N' || typ ==
'U' ) {
152 for(
int i = sel->
size()-1;
i >= 0;
i-- ) {
160 for(
int j = sel->
size()-1; j >= 0; j-- ) {
180 else if ( need_update > 0 ) {
190 isvc->finalize().ignore();
227 return connect(ident, logName);
238 long loc = ident.find(
" ");
240 logname = ident.
substr(0,loc);
241 tok.
analyse(ident.substr(loc+1,ident.length()),
" ",
"",
"",
"=",
"'",
"'");
249 filename = (*i).value();
252 switch( ::
toupper((*i).value()[0]) ) {
271 db_typ = (*i).value();
290 log <<
MSG::ERROR <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
313 log <<
MSG::ERROR <<
"Could not get NTuple Persistency format"
314 <<
" from ApplicationMgr properties" <<
endmsg;
319 if ( sp.
value() ==
"HBOOK" ) {
322 else if ( sp.
value() ==
"ROOT" ) {
333 if ( typ.length() > 0 && typ != sp.
value() ) {
336 <<
"Type given by job option "
337 <<
"NTupleSvc.Input/Output ignored!" <<
endmsg;
406 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Unknown reason)" <<
endmsg;
410 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Invalid parent directory)" <<
endmsg;
413 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Invalid path)" <<
endmsg;
416 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Exists already)" <<
endmsg;
425 return book(full, type, title);
430 return book( dirPath,
toStr(
id), type, title);
440 status =
create( type, title, pObj);
458 return book( pParent,
toStr(
id), type, title);
464 if ( 0 != pParent ) {
468 full += (relPath[0]==
'/') ?
"" :
"/";
489 full += (relPath[0]==
'/') ?
"" :
"/";
503 entryname += logname;
508 log <<
MSG::INFO <<
"Added stream file:" << filename <<
" as " << logname <<
endmsg;
513 log <<
MSG::ERROR <<
"Cannot add file:" << filename <<
" as " << logname <<
endmsg;
572 return save ( pObj );
574 return INVALID_OBJ_PATH;
584 if ( 0 != pSvc && 0 != pReg ) {
597 return INVALID_OBJECT;
605 return save ( pObj );
607 return INVALID_OBJ_PATH;
635 return INVALID_OBJECT;
645 return INVALID_OBJ_PATH;
655 return INVALID_OBJ_PATH;
672 status = pSvc->
updateObj(pAddr, n_tuple);
681 status = INVALID_OBJECT;
694 return INVALID_OBJ_PATH;
704 return INVALID_OBJ_PATH;