55 typedef vector<IRegistry*> Leaves;
59 for (Leaves::const_iterator
i=leaves.begin();
i != leaves.end();
i++ ) {
64 SniffInfo::iterator j=m_info.find(
id);
65 if ( j == m_info.end() ) {
68 (*j).second.count = 0;
69 (*j).second.id = m_info.size();
72 m_curr[id].id = m_info[id].id;
73 m_curr[id].count = explore(pReg);
93 log <<
MSG::ALWAYS <<
"== BEGIN ============= Access list content:" << m_info.size() <<
endmsg;
94 for(SniffInfo::const_iterator
i=m_info.begin();
i!=m_info.end();++
i) {
96 log <<
"== ITEM == " << right << setw(4) << dec << info.
id <<
" clid:"
97 << right << setw(8) << hex << info.
clid <<
" Count:"
98 << right << setw(6) << dec << info.
count <<
" "
101 Correlations::const_iterator
c=m_corr.find((*i).first);
102 if ( c != m_corr.end() ) {
104 log <<
"== CORRELATIONS:" << (*c).second.size() <<
endmsg;
105 for(map<int,int>::const_iterator k=(*c).second.begin(); k!=(*c).second.end();++k) {
106 if ( (*k).second > 0 ) {
107 log << dec << (*k).first <<
":" << (*k).second <<
" ";
114 if ( cnt > 0 ) log <<
endmsg;
116 Correlations::const_iterator
l=m_links.find((*i).first);
117 if ( l != m_links.end() ) {
119 log <<
"== LINKS:" << (*l).second.size() <<
endmsg;
120 for(map<int,int>::const_iterator k=(*l).second.begin(); k!=(*l).second.end();++k) {
121 if ( (*k).second > 0 ) {
122 log << dec << (*k).first <<
":" << (*k).second <<
" ";
129 if ( cnt > 0 ) log <<
endmsg;
132 log <<
MSG::ALWAYS <<
"== END =============== Access list content:" << m_info.size() <<
endmsg;
143 m_curr[
"/Event"].count = explore(root->
registry());
144 m_curr[
"/Event"].clid = root->
clID();
145 m_curr[
"/Event"].id = m_curr.size();
146 for(SniffInfo::const_iterator
i=m_curr.begin();
i!=m_curr.end();++
i) {
150 for(SniffInfo::const_iterator
i=m_info.begin();
i!=m_info.end();++
i) {
151 const string& nam = (*i).first;
153 Correlations::iterator
c=m_corr.find(nam);
154 if ( c == m_corr.end() ) {
155 m_corr[nam] = map<int,int>();
156 c = m_corr.find(nam);
158 for(SniffInfo::const_iterator
l=m_curr.begin();
l!=m_curr.end();++
l) {
160 map<int,int>::iterator k = (*c).second.find(li.
id);
161 if ( k==(*c).second.end() ) (*c).second[li.
id] = 0;
162 ++((*c).second[li.
id]);
166 if ( c == m_links.end() ) {
167 m_links[nam] = map<int,int>();
168 c = m_links.find(nam);
170 if ( m_curr.find(nam) != m_curr.end() ) {
174 for(
long l=0;
l<m->
size(); ++
l) {
176 SniffInfo::const_iterator il=m_curr.find(lnk->
path());
178 if ( il != m_curr.end() ) {
181 map<int,int>::iterator k = (*c).second.find(li.
id);
182 if ( k==(*c).second.end() ) (*c).second[li.
id] = 0;
183 ++((*c).second[li.
id]);
const std::string & path() const
Access to path of object.
Definition of the MsgStream class used to transmit messages.
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
virtual StatusCode initialize()
Initialize.
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.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
unsigned int CLID
Class ID definition.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual DataObject * object() const =0
Retrieve object behind the link.
map< string, LeafInfo > SniffInfo
Base class from which all concrete algorithm classes should be derived.
virtual ~StoreSnifferAlg()
Standard Destructor.
virtual StatusCode execute()
Execute procedure.
A small class used to access easily (and efficiently) data items residing in data stores...
virtual StatusCode finalize()
Finalize.
size_t explore(IRegistry *pObj)
virtual const id_type & identifier() const =0
Full identifier (or key)
Embedded class defining a symbolic link Note: No copy constructor; bitwise copy (done by the compiler...
map< string, map< int, int > > Correlations
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.
DataObject * object() const
Const access to data object.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
long size() const
Retrieve number of link present.