This implementes the methods for IItemListSvc.
More...
#include <ItemListSvc.h>
|
typedef std::lock_guard< std::mutex > | lock_t |
|
This implementes the methods for IItemListSvc.
Definition at line 55 of file ItemListSvc.h.
◆ lock_t
◆ ItemListSvc() [1/2]
ItemListSvc::ItemListSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor.
Definition at line 20 of file ItemListSvc.cxx.
22 base_class(
name, pSvcLocator),
25 declareProperty(
"VerboseThreshold",
m_verboseThresh,
"overlaps above this fraction print their items, def=0.2");
26 assert( pSvcLocator );
◆ ~ItemListSvc()
ItemListSvc::~ItemListSvc |
( |
| ) |
|
|
virtual |
◆ ItemListSvc() [2/2]
◆ addStreamItem()
StatusCode ItemListSvc::addStreamItem |
( |
const std::string & |
stream, |
|
|
const std::string & |
itemname |
|
) |
| |
|
overridevirtual |
Definition at line 74 of file ItemListSvc.cxx.
82 it->second.insert(itemname);
86 std::set<std::string>
start;
87 start.insert(itemname);
93 return StatusCode::SUCCESS;
◆ containsItem()
bool ItemListSvc::containsItem |
( |
const std::string & |
itemname, |
|
|
const std::string & |
stream = "ANY" |
|
) |
| const |
|
overridevirtual |
◆ finalize()
StatusCode ItemListSvc::finalize |
( |
| ) |
|
|
override |
Definition at line 39 of file ItemListSvc.cxx.
42 std::map<std::string, std::set<std::string> >::const_iterator
it =
m_streamItems.begin();
45 ATH_MSG_DEBUG(
"STREAM " <<
it->first <<
" has (" <<
it->second.size() <<
") items");
46 std::set<std::string>::const_iterator iprint =
it->second.begin();
47 while (iprint !=
it->second.end()) {
51 std::map<std::string, std::set<std::string> >::const_iterator it2 =
m_streamItems.begin();
52 float inv_size = 1. /
static_cast<float> (
it->second.size());
54 if (it2->first !=
it->first) {
55 std::set<std::string> olist;
56 std::set_intersection(
it->second.begin(),
it->second.end(),it2->second.begin(),it2->second.end(),std::inserter(olist,olist.begin()));
58 ATH_MSG_DEBUG(
" --> Overlap with " << it2->first <<
" (" << olist.size() <<
") items");
60 for (
const std::string& ol : olist) {
70 return StatusCode::SUCCESS;
◆ getItemsForStream()
std::vector< std::string > ItemListSvc::getItemsForStream |
( |
const std::string & |
stream | ) |
const |
|
overridevirtual |
◆ getStreamsForItem()
std::vector< std::string > ItemListSvc::getStreamsForItem |
( |
const std::string & |
itemname | ) |
const |
|
overridevirtual |
Definition at line 128 of file ItemListSvc.cxx.
131 std::vector<std::string>
t;
132 std::map<std::string, std::set<std::string> >::const_iterator
it =
m_streamItems.begin();
134 if (
it->second.find(itemname) !=
it->second.end())
t.push_back(
it->first);
◆ initialize()
StatusCode ItemListSvc::initialize |
( |
| ) |
|
|
override |
◆ operator=()
◆ removeStreamItem()
StatusCode ItemListSvc::removeStreamItem |
( |
const std::string & |
stream, |
|
|
const std::string & |
itemname |
|
) |
| |
|
overridevirtual |
Definition at line 97 of file ItemListSvc.cxx.
106 int n =
it->second.erase(itemname);
109 return StatusCode::SUCCESS;
◆ m_mutex
std::mutex ItemListSvc::m_mutex |
|
mutableprivate |
◆ m_streamItems
std::map<std::string, std::set<std::string> > ItemListSvc::m_streamItems |
|
private |
◆ m_verboseThresh
float ItemListSvc::m_verboseThresh |
|
private |
The documentation for this class was generated from the following files: