27 for(string::iterator j = t.begin(); j != t.end(); ++j )
28 if ( *j ==
'/' ) *j =
'_';
41 TBranch* b1 = t->GetBranch(
"Links");
42 TBranch* b2 = t->GetBranch(
"Refs");
47 b1->SetAutoDelete(kFALSE);
48 b2->SetAutoDelete(kFALSE);
50 b2->SetAddress(&pmgr);
51 int nb1 = b1->GetEvent(entry);
52 int nb2 = b2->GetEvent(entry);
53 if ( nb1>1 && nb2>1 ) {
55 refs.
refs.resize(ref_size);
57 for(
size_t j = 0; j < ref_size; ++j) {
58 const pair<int, int>& oid = mgr.
references()[j]->m_oid;
59 string loc = mgr.
links()[j].substr(1);
65 msg <<
"Add leaf:" << oid.first <<
"->" << loc <<
" from " <<
c->
getDb(r.
dbase)
68 <<
" CLID:" << hex << r.
clid
69 <<
" Typ:" << hex << int(r.
svc)
70 <<
" Ent:" << dec << r.
entry << endl;
76 msg <<
"Add Link:" << lnk->
path() << endl;
77 refs.
links.push_back(link_id);
82 msg <<
MSG::ERROR <<
"Failed to access POOL Ref/Link branches:" << cnt
93 return (TBranch*)t->GetListOfBranches()->At(0);
96 t = (TTree*)
c->
file()->Get(tname.c_str());
98 TBranch* b = (TBranch*)t->GetListOfBranches()->At(0);
104 << branch_name <<
" [" << tname <<
"]" <<
endmsg;
120 TTree* t = (TTree*)
c->
file()->Get(
"##Params");
124 TBranch* b = t->GetBranch(
"db_string");
128 for(i=0,b->SetAddress(text); i < b->GetEntries(); ++
i) {
130 char* id1 = strstr(text,
"[NAME=");
131 char* id2 = strstr(text,
"[VALUE=");
135 char* id11 = strstr(id1,
"]");
136 char* id22 = strstr(id2,
"]");
137 if ( id11 && id22 ) {
140 params().push_back(make_pair(id1,id2));
141 msgSvc() <<
"Param:" << id1 <<
"=" << id2 <<
"." <<
endmsg;
147 t = (TTree*)
c->
file()->Get(
"##Links");
151 b = t->GetBranch(
"db_string");
156 for(i=0,b->SetAddress(text); i < b->GetEntries(); ++
i) {
158 std::string db, container;
159 int clid = 1, technology = 0, ipar[2] = {-1,-1};
160 for(
char* p1 = (
char*)text; p1; p1 = ::strchr(++p1,
'[')) {
161 char* p2 = ::strchr(p1,
'=');
162 char* p3 = ::strchr(p1,
']');
164 if ( ::strncmp(
"[DB=", p1, 4) == 0 ) {
168 else if ( ::strncmp(
"[CNT=", p1, 5) == 0 ) {
172 else if ( ::strncmp(
"[OID=", p1, 5) == 0 ) {
174 ::sscanf(p1+5,
"%08X,%08X",(
unsigned int*)&ipar[0],(
unsigned int*)&ipar[1]);
176 else if ( ::strncmp(
"[CLID=", p1, 6) == 0 ) {
178 ::sscanf(p1+6,
"%08X",(
unsigned int*)&clid);
180 else if ( ::strncmp(
"[TECH=", p1, 6) == 0 ) {
182 ::sscanf(p1+6,
"%08X",(
unsigned int*)&technology);
193 msgSvc() <<
"Add link[" << i <<
"]:" << db << container <<
" [" << r.
dbase <<
"," << r.
container <<
"] "
194 <<
" tech:" << hex << setw(8) << r.
svc <<
" CLID:" << setw(8) << r.
clid << dec <<
endmsg;
const std::string & path() const
Access to path of object.
Definition of the MsgStream class used to transmit messages.
TFile * file() const
Direct access to TFile structure.
const std::string & getDb(int which) const
Access database/file name from saved index.
std::vector< pool::Token * > & references()
Access to token array.
const std::string & getLink(int which) const
Access link name from saved index.
std::vector< RootRef > refs
The references corresponding to the next layer of items in the data store.
Persistent reference object containing all leafs and links corresponding to a Gaudi DataObject...
int dbase
Data members to define object location in the persistent world.
std::vector< std::string > & links()
Access to link array.
Persistent reference object.
Description: PoolDbLinkManager class implementation definition.
This class is used for returning status codes from appropriate routines.
void makeRef(IRegistry *pA, RootRef &ref)
Create reference object from registry entry.
Link * link(long id)
Retrieve symbolic link identified by ID.
const std::string & getCont(int which) const
Access container name from saved index.
std::vector< int > links
The links of the link manager.
int makeLink(const std::string &p)
Convert path string to path index.
Embedded class defining a symbolic link Note: No copy constructor; bitwise copy (done by the compiler...
This is a number of static methods for bootstrapping the Gaudi framework.
Concrete implementation of the IDataConnection interface to access ROOT files.
A LinkManager is the object aggregated into a DataObject, which is responsible for the handling of no...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
long size() const
Retrieve number of link present.