Skip to content
Snippets Groups Projects
Commit 27c4c120 authored by Reiner Hauser's avatar Reiner Hauser
Browse files

Fixes ATEAM-396

Initializes the ROBDataProviderSvc and calls setNextEvent() if it has received
a valid full event. The event status is always set to 0, since we have no
option to pass invalid fragments along.
parent 093c285f
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
// Include files. // Include files.
#include "ByteStreamCnvSvc/ByteStreamInputSvc.h" #include "ByteStreamCnvSvc/ByteStreamInputSvc.h"
#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
#include "ByteStreamData/RawEvent.h" #include "ByteStreamData/RawEvent.h"
#include "GaudiKernel/IIncidentListener.h" #include "GaudiKernel/IIncidentListener.h"
#include "GaudiKernel/ServiceHandle.h" #include "GaudiKernel/ServiceHandle.h"
...@@ -114,7 +115,8 @@ private: ...@@ -114,7 +115,8 @@ private:
/// Reference to StoreGateSvc; /// Reference to StoreGateSvc;
ServiceHandle<StoreGateSvc> m_inputMetaDataStore; ServiceHandle<StoreGateSvc> m_inputMetaDataStore;
ServiceHandle<StoreGateSvc> m_sgSvc; //!< StoreGateSvc ServiceHandle<StoreGateSvc> m_sgSvc;
ServiceHandle<IROBDataProviderSvc> m_robProvider;
}; };
......
...@@ -105,7 +105,8 @@ ByteStreamEmonInputSvc::ByteStreamEmonInputSvc(const std::string& name, ISvcLoca ...@@ -105,7 +105,8 @@ ByteStreamEmonInputSvc::ByteStreamEmonInputSvc(const std::string& name, ISvcLoca
m_frequency_counter(60), m_frequency_counter(60),
m_publish_target(0), m_publish_target(0),
m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name ), m_inputMetaDataStore("StoreGateSvc/InputMetaDataStore", name ),
m_sgSvc("StoreGateSvc", name) m_sgSvc("StoreGateSvc", name),
m_robProvider("ROBDataProviderSvc", name)
{ {
declareProperty("Partition", m_partition, "Partitin name, default taken from $TDAQ_PARTITION if not set")->declareUpdateHandler(&ByteStreamEmonInputSvc::updateHandler, this); declareProperty("Partition", m_partition, "Partitin name, default taken from $TDAQ_PARTITION if not set")->declareUpdateHandler(&ByteStreamEmonInputSvc::updateHandler, this);
...@@ -212,6 +213,11 @@ StatusCode ByteStreamEmonInputSvc::initialize() ...@@ -212,6 +213,11 @@ StatusCode ByteStreamEmonInputSvc::initialize()
return sc; return sc;
} }
if(m_robProvider.retrieve().isSuccess()) {
ATH_MSG_FATAL("Cannot get rob data provider");
return StatusCode::FAILURE;
}
signal(SIGTERM, handle_terminate); signal(SIGTERM, handle_terminate);
log << MSG::INFO << " initialized for: " << m_partition << " " << m_key << "/" << m_value << endreq; log << MSG::INFO << " initialized for: " << m_partition << " " << m_key << "/" << m_value << endreq;
...@@ -426,6 +432,8 @@ const RawEvent* ByteStreamEmonInputSvc::nextEvent() ...@@ -426,6 +432,8 @@ const RawEvent* ByteStreamEmonInputSvc::nextEvent()
try { try {
m_re->check_tree(); m_re->check_tree();
log << MSG::INFO << "nextEvent: Got valid fragment of size:" << event.size() << endreq; log << MSG::INFO << "nextEvent: Got valid fragment of size:" << event.size() << endreq;
m_robProvider->setNextEvent(m_re);
m_robProvider->setEventStatus(0);
} catch (ers::Issue& ex) { } catch (ers::Issue& ex) {
// log in any case // log in any case
log << MSG::ERROR << "nextEvent: Invalid event fragment" << endreq; log << MSG::ERROR << "nextEvent: Invalid event fragment" << endreq;
...@@ -645,5 +653,7 @@ StatusCode ByteStreamEmonInputSvc::finalize() ...@@ -645,5 +653,7 @@ StatusCode ByteStreamEmonInputSvc::finalize()
{ {
setProperty("State","Shutdown"); setProperty("State","Shutdown");
m_inputMetaDataStore.release().ignore(); m_inputMetaDataStore.release().ignore();
m_robProvider.release().ignore();
m_sgSvc.release().ignore();
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment