Commit a783461d authored by Andrea Petrucci's avatar Andrea Petrucci
Browse files

references #214: add catch exception in create timer and remove subcribe topic...

references #214: add catch exception in create timer and remove subcribe topic in the MetaDataStream
parent 20d13223
......@@ -220,7 +220,7 @@ bool evb::readoutunit::MetaDataStream<ReadoutUnit,Configuration>::metaDataReques
{
if ( ! this->doProcessing_ ) return false;
metaDataRetrieverDIPBridge_->subscribeToDip( this->readoutUnit_->getConfiguration()->maskedDipTopics );
//metaDataRetrieverDIPBridge_->subscribeToDip( this->readoutUnit_->getConfiguration()->maskedDipTopics );
toolbox::mem::Reference* bufRef = toolbox::mem::getMemoryPoolFactory()->
getFrame(fragmentPool_,MetaData::dataSize);
......
......@@ -138,15 +138,20 @@ void evb::readoutunit::MetaDataRetrieverDIPBridge::timerToRegisterToDipBridge()
std::string appUUID= this->getOwnerApplication()->getApplicationDescriptor()->getUUID().toString();
std::string timerName_= "timer_" + appUUID + toolbox::toString(".%d", rand());
toolbox::task::Timer * timer_ = toolbox::task::getTimerFactory()->createTimer(timerName_);
// current time, scheduled start time, and xmas-ready time
double now = toolbox::TimeVal::gettimeofday();
double startTimeSecs_ = now + dipBridgeRegisterTimeout_;
// schedule start of monitoring
toolbox::TimeVal startTime(startTimeSecs_);
timer_->schedule(timerListener_, startTime, 0, "");
try {
toolbox::task::Timer * timer_ = toolbox::task::getTimerFactory()->createTimer(timerName_);
// current time, scheduled start time, and xmas-ready time
double now = toolbox::TimeVal::gettimeofday();
double startTimeSecs_ = now + dipBridgeRegisterTimeout_;
// schedule start of monitoring
toolbox::TimeVal startTime(startTimeSecs_);
timer_->schedule(timerListener_, startTime, 0, "");
} catch (toolbox::task::exception::Exception &e) {
std::string msg("Failed to create the timer with name=" + timerName_ + " ");
LOG4CPLUS_ERROR(logger_, msg + stdformat_exception_history(e));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment