54 for (
auto& pReg : leaves ) {
56 if ( !pReg->address() || !pReg->object() )
continue;
57 const string&
id = pReg->identifier();
58 auto j = m_info.
find(
id );
59 if ( j == m_info.
end() ) {
61 j = m_info.
find(
id );
63 j->second.id = m_info.
size();
64 j->second.clid = pReg->object()->clID();
66 m_curr[id].id = m_info[id].id;
67 m_curr[id].
count = explore( pReg );
88 log <<
"== BEGIN ============= Access list content:" << m_info.
size() <<
endmsg;
89 for (
const auto& i : m_info ) {
93 auto c = m_corr.
find( i.first );
94 if (
c != m_corr.
end() ) {
96 log <<
"== CORRELATIONS:" << ( *c ).second.size() <<
endmsg;
97 for (
const auto& k :
c->second ) {
99 log <<
dec << k.first <<
":" << k.second <<
" ";
108 auto l = m_links.
find( i.first );
109 if (
l != m_links.
end() ) {
111 log <<
"== LINKS:" <<
l->second.size() <<
endmsg;
112 for (
const auto& k :
l->second ) {
113 if ( k.second > 0 ) {
114 log <<
dec << k.first <<
":" << k.second <<
" ";
124 always() <<
"== END =============== Access list content:" << m_info.size() <<
endmsg;
136 auto& evnt = m_curr[
"/Event"];
138 evnt.clid = root->
clID();
139 evnt.id = m_curr.
size();
140 for (
const auto& i : m_curr ) m_info[i.first].
count++;
141 for (
const auto& i : m_info ) {
142 const string& nam = i.first;
144 auto c = m_corr.
find( nam );
145 if (
c == m_corr.
end() ) {
147 c = m_corr.
find( nam );
149 for (
const auto&
l : m_curr ) {
150 const auto&
id =
l.second.id;
151 auto k =
c->second.find(
id );
152 if ( k ==
c->second.end() ) k =
c->second.emplace(
id, 0 ).first;
156 c = m_links.
find( nam );
158 if ( m_curr.find( nam ) == m_curr.end() )
continue;
161 if ( !obj )
continue;
164 for (
long l = 0;
l < m->
size(); ++
l ) {
165 auto* lnk = m->
link(
l );
166 auto il = m_curr.find( lnk->path() );
168 if ( il == m_curr.end() )
continue;
169 if ( !lnk->object() )
continue;
170 const auto&
id = il->second.id;
171 auto k =
c->second.find(
id );
172 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 ...
Small algorithm, which traverses the data store and prints a summary of the leafs accessed during the...
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.
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
map< string, LeafInfo > SniffInfo
constexpr static const auto SUCCESS
Base class from which all concrete algorithm classes should be derived.
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.