9 #include <boost/bind.hpp>
71 infoSpaceItems.push_back(std::make_pair(
"runNumber", &
runNumber_));
72 infoSpaceItems.push_back(std::make_pair(
"dataEvents", &
dataEvents_));
73 infoSpaceItems.push_back(std::make_pair(
"errorEvents", &
errorEvents_));
74 infoSpaceItems.push_back(std::make_pair(
"unwantedEvents", &
unwantedEvents_));
82 runNumber_ =
static_cast<xdata::UnsignedInteger32
>(
87 dataEvents_ =
static_cast<xdata::UnsignedInteger32
>(
88 static_cast<unsigned int>(eventIDsReceivedStats.
getSampleCount()));
93 static_cast<unsigned int>(errorEventIDsReceivedStats.
getSampleCount()));
118 ++(pos->second.count);
142 const std::string alarmName(
"ErrorEvents");
150 std::ostringstream
msg;
151 msg <<
"Received " << count <<
" error events in the last "
153 XCEPT_DECLARE( stor::exception::ErrorEvents, xcept, msg.str() );
169 std::ostringstream
msg;
170 msg <<
"Received " << val.second.count <<
" events"
171 <<
" not tagged for any stream or consumer."
172 <<
" Output module " <<
174 <<
" (id " << val.first <<
")"
175 <<
" HLT trigger bits: ";
180 for (
unsigned int pathIndex = 0;
181 pathIndex < val.second.hltTriggerCount;
184 int state = val.second.bitList[byteIndex] >> (subIndex * 2);
194 XCEPT_DECLARE( stor::exception::UnwantedEvents, xcept, msg.str() );
197 val.second.previousCount = val.second.count;
199 else if (val.second.count == val.second.previousCount)
208 :
count(1), previousCount(0)
210 std::ostringstream str;
211 str <<
"UnwantedEvent_" <<
nextId++;
xdata::UnsignedInteger32 dataEvents_
void configureAlarms(AlarmParams const &)
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_
boost::shared_ptr< AlarmHandler > AlarmHandlerPtr
xdata::UnsignedInteger32 unwantedEvents_
MonitoredQuantity unwantedEventIDsReceived_
AlarmHandlerPtr alarmHandler_
std::vector< std::pair< std::string, xdata::Serializable * > > InfoSpaceItems
MonitoredQuantity eolsSeen_
MonitoredQuantity eventIDsReceived_
RunMonitorCollection(const utils::Duration_t &updateInterval, AlarmHandlerPtr, SharedResourcesPtr)
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