9 #include <boost/bind.hpp>
69 infoSpaceItems.push_back(std::make_pair(
"runNumber", &
runNumber_));
70 infoSpaceItems.push_back(std::make_pair(
"dataEvents", &
dataEvents_));
71 infoSpaceItems.push_back(std::make_pair(
"errorEvents", &
errorEvents_));
72 infoSpaceItems.push_back(std::make_pair(
"unwantedEvents", &
unwantedEvents_));
80 runNumber_ =
static_cast<xdata::UnsignedInteger32
>(
85 dataEvents_ =
static_cast<xdata::UnsignedInteger32
>(
86 static_cast<unsigned int>(eventIDsReceivedStats.
getSampleCount()));
91 static_cast<unsigned int>(errorEventIDsReceivedStats.
getSampleCount()));
117 ++(pos->second.count);
141 const std::string alarmName(
"ErrorEvents");
149 std::ostringstream
msg;
150 msg <<
"Received " << count <<
" error events in the last "
152 XCEPT_DECLARE( stor::exception::ErrorEvents, xcept, msg.str() );
168 std::ostringstream
msg;
169 msg <<
"Received " << val.second.count <<
" events"
170 <<
" not tagged for any stream or consumer."
171 <<
" Output module " <<
173 <<
" (id " << val.first <<
")"
174 <<
" HLT trigger bits: ";
179 for (
unsigned int pathIndex = 0;
180 pathIndex < val.second.hltTriggerCount;
183 int state = val.second.bitList[byteIndex] >> (subIndex * 2);
193 XCEPT_DECLARE( stor::exception::UnwantedEvents, xcept, msg.str() );
196 val.second.previousCount = val.second.count;
198 else if (val.second.count == val.second.previousCount)
207 :
count(1), previousCount(0)
209 std::ostringstream str;
210 str <<
"UnwantedEvent_" <<
nextId++;
xdata::UnsignedInteger32 dataEvents_
void configureAlarms(AlarmParams const &)
RunMonitorCollection(const utils::Duration_t &updateInterval, SharedResourcesPtr)
xdata::UnsignedInteger32 runNumber_
void addSample(const double &value=1)
MonitoredQuantity errorEventIDsReceived_
uint64_t getSampleCount(DataSetType t=FULL) const
boost::shared_ptr< SharedResources > SharedResourcesPtr
void getStats(Stats &stats) const
MonitoredQuantity runNumbersSeen_
double getLastSampleValue() const
boost::mutex unwantedEventMapLock_
void hltTriggerBits(std::vector< unsigned char > &bitList) const
UnwantedEventsMap unwantedEventsMap_
utils::Duration_t getDuration(DataSetType t=FULL) const
void calculateStatistics(const utils::TimePoint_t ¤tTime=utils::getCurrentTime())
std::vector< unsigned char > bitList
boost::posix_time::time_duration Duration_t
void alarmUnwantedEvents(UnwantedEventsMap::value_type &)
unsigned int unwantedEvents_
MonitoredQuantity lumiSectionsSeen_
Container::value_type value_type
virtual void do_calculateStatistics()
SharedResourcesPtr sharedResources_
xdata::UnsignedInteger32 unwantedEvents_
MonitoredQuantity unwantedEventIDsReceived_
bool careAboutUnwantedEvents_
std::vector< std::pair< std::string, xdata::Serializable * > > InfoSpaceItems
MonitoredQuantity eolsSeen_
MonitoredQuantity eventIDsReceived_
unsigned int errorEvents_
uint32_t hltTriggerCount() const
void addUnwantedEvent(const I2OChain &)
virtual void do_appendInfoSpaceItems(InfoSpaceItems &)
xdata::UnsignedInteger32 errorEvents_
uint32_t eventNumber() const
virtual void do_updateInfoSpaceItems()
UnwantedEvent(const I2OChain &)
uint32_t outputModuleId() const