52 for (
auto& pReg : leaves ) {
54 if ( !pReg->address() || !pReg->object() )
continue;
55 const string&
id = pReg->identifier();
56 auto j = m_info.
find(
id );
57 if ( j == m_info.
end() ) {
59 j = m_info.
find(
id );
61 j->second.id = m_info.
size();
62 j->second.clid = pReg->object()->clID();
64 m_curr[id].id = m_info[id].id;
65 m_curr[id].
count = explore( pReg );
84 log <<
"== BEGIN ============= Access list content:" << m_info.
size() <<
endmsg;
85 for (
const auto& i : m_info ) {
89 auto c = m_corr.
find( i.first );
90 if (
c != m_corr.
end() ) {
92 log <<
"== CORRELATIONS:" << ( *c ).second.size() <<
endmsg;
93 for (
const auto& k :
c->second ) {
95 log <<
dec << k.first <<
":" << k.second <<
" ";
104 auto l = m_links.
find( i.first );
105 if (
l != m_links.
end() ) {
107 log <<
"== LINKS:" <<
l->second.size() <<
endmsg;
108 for (
const auto& k :
l->second ) {
109 if ( k.second > 0 ) {
110 log <<
dec << k.first <<
":" << k.second <<
" ";
120 always() <<
"== END =============== Access list content:" << m_info.size() <<
endmsg;
131 auto& evnt = m_curr[
"/Event"];
133 evnt.clid = root->
clID();
134 evnt.id = m_curr.
size();
135 for (
const auto& i : m_curr ) m_info[i.first].
count++;
136 for (
const auto& i : m_info ) {
137 const string& nam = i.first;
139 auto c = m_corr.
find( nam );
140 if (
c == m_corr.
end() ) {
142 c = m_corr.
find( nam );
144 for (
const auto&
l : m_curr ) {
145 const auto&
id =
l.second.id;
146 auto k =
c->second.find(
id );
147 if ( k ==
c->second.end() ) k =
c->second.emplace(
id, 0 ).first;
151 c = m_links.
find( nam );
153 if ( m_curr.find( nam ) == m_curr.end() )
continue;
156 if ( !obj )
continue;
159 for (
long l = 0;
l < m->
size(); ++
l ) {
160 auto* lnk = m->
link(
l );
161 auto il = m_curr.find( lnk->path() );
163 if ( il == m_curr.end() )
continue;
164 if ( !lnk->object() )
continue;
165 const auto&
id = il->second.id;
166 auto k =
c->second.find(
id );
167 if ( k ==
c->second.end() ) k =
c->second.emplace(
id, 0 ).first;
virtual StatusCode objectLeaves(const DataObject *pObject, std::vector< IRegistry * > &refLeaves)=0
Explore the object store: retrieve all leaves attached to the object The object is identified by its ...
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Small algorithm, which traverses the data store and prints a summary of the leafs accessed during the...
constexpr static const auto SUCCESS
IRegistry * registry() const
Get pointer to Registry.
LinkManager * linkMgr() const
Retrieve Link manager.
#define DECLARE_COMPONENT(type)
SmartIF< IDataManagerSvc > m_mgr
map< string, map< int, int > > Correlations
virtual const CLID & clID() const
Retrieve reference to class definition structure.
This class is used for returning status codes from appropriate routines.
void clear(STATE_TYPE _i=std::ios_base::failbit)
Link * link(long id)
Retrieve symbolic link identified by ID.
StatusCode finalize() override
Finalize.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
StatusCode execute() override
Execute procedure.
unsigned int CLID
Class ID definition.
map< string, LeafInfo > SniffInfo
Alias for backward compatibility.
A small class used to access easily (and efficiently) data items residing in data stores...
size_t explore(IRegistry *pObj)
StatusCode initialize() override
Initialize.
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.