64 if ((threshold == 0)
or (counter % prescale))
68 if (counter == prescale * threshold)
113 #include <boost/range.hpp> 114 #include <boost/algorithm/string.hpp> 129 typedef std::vector<edm::ParameterSet>
VPSet;
131 for (
auto const & categorie : categories) {
133 uint32_t
threshold = categorie.getParameter<uint32_t>(
"threshold");
137 produces<std::vector<edm::ErrorSummaryEntry> >();
154 entry.second.done =
false;
161 for(
auto const&
entry : errorSummary ) {
163 typedef boost::split_iterator<std::string::const_iterator>
splitter;
164 for (splitter
i = boost::make_split_iterator(
entry.category, boost::first_finder(
"|", boost::is_equal()));
170 category.assign(
i->begin(),
i->end());
179 std::unique_ptr<std::vector<edm::ErrorSummaryEntry> >
errors(
new std::vector<edm::ErrorSummaryEntry>());
181 errors->swap(errorSummary);
207 if (not result.second)
209 return result.first->second;
215 auto i =
m_data.find(category);
224 std::stringstream
out;
225 out <<
"Log-Report ---------- HLTLogMonitorFilter Summary ------------\n" 226 <<
"Log-Report Threshold Prescale Issued Accepted Rejected Category\n";
230 << std::setw(10) <<
entry.second.threshold <<
' ' 231 << std::setw(10) <<
entry.second.prescale <<
' ' 232 << std::setw(10) <<
entry.second.counter <<
' ' 233 << std::setw(10) <<
entry.second.accepted <<
' ' 234 << std::setw(10) << (
entry.second.counter -
entry.second.accepted) <<
' ' 235 << std::left <<
entry.first <<
'\n';
T getParameter(std::string const &) const
def splitter(iterator, n)
CategoryEntry & getCategory(const std::string &category)
return the entry for requested category, if it exists, or create a new one with the default threshold...
CategoryEntry & addCategory(const std::string &category, uint32_t threshold)
create a new entry for the given category, with the given threshold value
bool EnableLoggedErrorsSummary()
bool knownCategory(const std::string &category)
check if the requested category has a valid entry
~HLTLogMonitorFilter() override
def setup(process, global_tag, zero_tesla=False)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool FreshErrorsExist(unsigned int iStreamID)
bool DisableLoggedErrorsSummary()
void summary()
summarize to LogInfo
void beginJob() override
EDFilter beginJob method.
#define DEFINE_FWK_MODULE(type)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::map< std::string, CategoryEntry > CategoryMap
void endJob() override
EDFilter endJob method.
unsigned int value() const
unsigned long long uint64_t
CategoryEntry(uint32_t t=0)
StreamID streamID() const
std::vector< ErrorSummaryEntry > LoggedErrorsSummary(unsigned int iStreamID)
HLTLogMonitorFilter(const edm::ParameterSet &)
bool filter(edm::Event &, const edm::EventSetup &) override
EDFilter accept method.