56 for (
auto& pReg : leaves ) {
58 if ( !pReg->address() || !pReg->object() )
continue;
59 const string&
id = pReg->identifier();
60 auto j = m_info.
find(
id );
61 if ( j == m_info.
end() ) {
63 j = m_info.
find(
id );
65 j->second.id = m_info.
size();
66 j->second.clid = pReg->object()->clID();
68 m_curr[id].id = m_info[id].id;
69 m_curr[id].
count = explore( pReg );
90 log <<
"== BEGIN ============= Access list content:" << m_info.
size() <<
endmsg;
91 for (
const auto& i : m_info ) {
95 auto c = m_corr.
find( i.first );
96 if (
c != m_corr.
end() ) {
98 log <<
"== CORRELATIONS:" << ( *c ).second.size() <<
endmsg;
99 for (
const auto& k :
c->second ) {
100 if ( k.second > 0 ) {
101 log <<
dec << k.first <<
":" << k.second <<
" ";
110 auto l = m_links.
find( i.first );
111 if (
l != m_links.
end() ) {
113 log <<
"== LINKS:" <<
l->second.size() <<
endmsg;
114 for (
const auto& k :
l->second ) {
115 if ( k.second > 0 ) {
116 log <<
dec << k.first <<
":" << k.second <<
" ";
126 always() <<
"== END =============== Access list content:" << m_info.size() <<
endmsg;
138 auto& evnt = m_curr[
"/Event"];
140 evnt.clid = root->
clID();
141 evnt.id = m_curr.
size();
142 for (
const auto& i : m_curr ) m_info[i.first].
count++;
143 for (
const auto& i : m_info ) {
144 const string& nam = i.first;
146 auto c = m_corr.
find( nam );
147 if (
c == m_corr.
end() ) {
149 c = m_corr.
find( nam );
151 for (
const auto&
l : m_curr ) {
152 const auto&
id =
l.second.id;
153 auto k =
c->second.find(
id );
154 if ( k ==
c->second.end() ) k =
c->second.emplace(
id, 0 ).first;
158 c = m_links.
find( nam );
160 if ( m_curr.find( nam ) == m_curr.end() )
continue;
163 if ( !obj )
continue;
166 for (
long l = 0;
l < m->
size(); ++
l ) {
167 auto* lnk = m->
link(
l );
168 auto il = m_curr.find( lnk->path() );
170 if ( il == m_curr.end() )
continue;
171 if ( !lnk->object() )
continue;
172 const auto&
id = il->second.id;
173 auto k =
c->second.find(
id );
174 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 ...
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
bool isSuccess() const
Test for a status code of SUCCESS.
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.
map< string, LeafInfo > SniffInfo
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...
StoreSnifferAlg(const string &name, ISvcLocator *pSvc)
Standard algorithm constructor.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
long size() const
Retrieve number of link present.