Go to the documentation of this file.
46 int loadRefs( std::string_view , std::string_view cnt,
unsigned long entry,
52 TBranch*
b1 =
t->GetBranch(
"Links" );
53 TBranch*
b2 =
t->GetBranch(
"Refs" );
58 b1->SetAutoDelete( kFALSE );
59 b2->SetAutoDelete( kFALSE );
60 b1->SetAddress( &plm );
61 b2->SetAddress( &pmgr );
62 int nb1 =
b1->GetEvent( entry );
63 int nb2 =
b2->GetEvent( entry );
64 if ( nb1 > 1 && nb2 > 1 ) {
66 refs.refs.resize( ref_size );
68 for (
size_t j = 0;
j < ref_size; ++
j ) {
69 const pair<int, int>& oid = mgr.
references()[
j]->m_oid;
70 string loc = mgr.
links()[
j].substr( 1 );
72 if ( oid.first >= 0 ) {
76 msg <<
"Add leaf:" << oid.first <<
"->" << loc <<
" from " <<
c->
getDb( r.
dbase ) <<
"#"
78 <<
" Typ:" <<
hex << int( r.
svc ) <<
" Ent:" <<
dec << r.
entry << endl;
81 for (
int i = 0,
n = lm.
size(); i <
n; ++i ) {
84 msg <<
"Add Link:" << lnk->
path() << endl;
85 refs.links.push_back( link_id );
98 TBranch*
getBranch( std::string_view , std::string_view branch_name )
override {
101 if (
t ) {
return (TBranch*)
t->GetListOfBranches()->At( 0 ); }
103 t = (TTree*)
c->
file()->Get( tname.c_str() );
105 TBranch* b = (TBranch*)
t->GetListOfBranches()->At( 0 );
111 msgSvc() <<
MSG::ERROR <<
"Failed to access POOL branch:" << branch_name <<
" [" << tname <<
"]" <<
endmsg;
127 TTree*
t = (TTree*)
c->
file()->Get(
"##Params" );
129 TBranch* b =
t->GetBranch(
"db_string" );
131 for ( i = 0, b->SetAddress( text ); i < b->GetEntries(); ++i ) {
133 char* id1 = strstr( text,
"[NAME=" );
134 char* id2 = strstr( text,
"[VALUE=" );
138 char* id11 = strstr( id1,
"]" );
139 char* id22 = strstr( id2,
"]" );
140 if ( id11 && id22 ) {
144 msgSvc() <<
"Param:" << id1 <<
"=" << id2 <<
"." <<
endmsg;
150 t = (TTree*)
c->
file()->Get(
"##Links" );
152 b =
t->GetBranch(
"db_string" );
155 for ( i = 0, b->SetAddress( text ); i < b->GetEntries(); ++i ) {
158 int clid = 1, technology = 0, ipar[2] = { -1, -1 };
159 for (
char*
p1 = (
char*)text;
p1;
p1 = ::strchr( ++
p1,
'[' ) ) {
160 char*
p2 = ::strchr(
p1,
'=' );
161 char* p3 = ::strchr(
p1,
']' );
163 if ( ::strncmp(
"[DB=",
p1, 4 ) == 0 ) {
166 }
else if ( ::strncmp(
"[CNT=",
p1, 5 ) == 0 ) {
169 }
else if ( ::strncmp(
"[OID=",
p1, 5 ) == 0 ) {
171 ::sscanf(
p1 + 5,
"%08X,%08X", (
unsigned int*)&ipar[0], (
unsigned int*)&ipar[1] );
172 }
else if ( ::strncmp(
"[CLID=",
p1, 6 ) == 0 ) {
174 ::sscanf(
p1 + 6,
"%08X", (
unsigned int*)&clid );
175 }
else if ( ::strncmp(
"[TECH=",
p1, 6 ) == 0 ) {
177 ::sscanf(
p1 + 6,
"%08X", (
unsigned int*)&technology );
187 msgSvc() <<
"Add link[" << i <<
"]:" << db << container <<
" [" << r.
dbase <<
"," << r.
container <<
"] "
188 <<
" tech:" <<
hex << setw( 8 ) << r.
svc <<
" CLID:" << setw( 8 ) << r.
clid <<
dec <<
endmsg;
MsgStream & hex(MsgStream &log)
Embedded class defining a symbolic link Note: No explicit copy constructor; implicit compiler generat...
const std::string & getLink(int which) const
Access link name from saved index.
int dbase
Data members to define object location in the persistent world.
std::vector< std::string > & links()
Access to link array.
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
std::vector< pool::Token * > & references()
Access to token array.
AttribStringParser::Iterator begin(const AttribStringParser &parser)
const std::string & getDb(int which) const
Access database/file name from saved index.
const std::string & path() const
Access to path of object.
MsgStream & dec(MsgStream &log)
const std::string & getCont(int which) const
Access container name from saved index.
long size() const
Retrieve number of link present.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void makeRef(const IRegistry &pA, RootRef &ref)
Create reference object from registry entry.
TFile * file() const
Direct access to TFile structure.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
int makeLink(std::string_view p)
Convert path string to path index.
T emplace_back(T... args)
constexpr static const auto SUCCESS
const std::string & pfn() const
Access physical file name.
constexpr static const auto FAILURE
const Link * link(long id) const
Retrieve symbolic link identified by ID.