22 #define GAUDISVC_NTUPLESVC_CPP
115 if ( 0 != pRegistry ) {
119 std::string path = (idx==std::string::npos) ? full : full.substr(0, idx);
122 return (*i).second.service;
130 long need_update = 0;
140 for ( Leaves::iterator d = leaves.begin(); d != leaves.end(); d++ ) {
141 if ( (*d)->object() ) {
144 unsigned long typ = pA->
ipar()[1];
145 if ( typ ==
'R' || typ ==
'N' || typ ==
'U' ) {
153 for(
int i = sel->
size()-1;
i >= 0;
i-- ) {
161 for(
int j = sel->
size()-1; j >= 0; j-- ) {
181 else if ( need_update > 0 ) {
191 isvc->finalize().ignore();
228 return connect(ident, logName);
239 long loc = ident.find(
" ");
241 logname = ident.
substr(0,loc);
242 tok.
analyse(ident.substr(loc+1,ident.length()),
" ",
"",
"",
"=",
"'",
"'");
250 filename = (*i).value();
253 switch( ::
toupper((*i).value()[0]) ) {
272 db_typ = (*i).value();
291 log <<
MSG::ERROR <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
314 log <<
MSG::ERROR <<
"Could not get NTuple Persistency format"
315 <<
" from ApplicationMgr properties" <<
endmsg;
320 if ( sp.
value() ==
"HBOOK" ) {
323 else if ( sp.
value() ==
"ROOT" ) {
334 if ( typ.length() > 0 && typ != sp.
value() ) {
337 <<
"Type given by job option "
338 <<
"NTupleSvc.Input/Output ignored!" <<
endmsg;
407 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Unknown reason)" <<
endmsg;
411 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Invalid parent directory)" <<
endmsg;
414 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Invalid path)" <<
endmsg;
417 log <<
MSG::ERROR <<
"Cannot book N-tuple " << path <<
" (Exists already)" <<
endmsg;
426 return book(full, type, title);
431 return book( dirPath,
toStr(
id), type, title);
441 status =
create( type, title, pObj);
459 return book( pParent,
toStr(
id), type, title);
465 if ( 0 != pParent ) {
469 full += (relPath[0]==
'/') ?
"" :
"/";
490 full += (relPath[0]==
'/') ?
"" :
"/";
504 entryname += logname;
509 log <<
MSG::INFO <<
"Added stream file:" << filename <<
" as " << logname <<
endmsg;
514 log <<
MSG::ERROR <<
"Cannot add file:" << filename <<
" as " << logname <<
endmsg;
573 return save ( pObj );
575 return INVALID_OBJ_PATH;
585 if ( 0 != pSvc && 0 != pReg ) {
598 return INVALID_OBJECT;
606 return save ( pObj );
608 return INVALID_OBJ_PATH;
636 return INVALID_OBJECT;
646 return INVALID_OBJ_PATH;
656 return INVALID_OBJ_PATH;
673 status = pSvc->
updateObj(pAddr, n_tuple);
682 status = INVALID_OBJECT;
695 return INVALID_OBJ_PATH;
705 return INVALID_OBJ_PATH;