diff --git a/k4FWCore/components/Writer.cpp b/k4FWCore/components/Writer.cpp index 69ee6be0..7b1fb334 100644 --- a/k4FWCore/components/Writer.cpp +++ b/k4FWCore/components/Writer.cpp @@ -51,10 +51,10 @@ class Writer final : public Gaudi::Functional::Consumer iosvc{this, "IOSvc", "IOSvc"}; - SmartIF m_hiveWhiteBoard; - SmartIF m_dataSvc; - mutable bool m_first{true}; + ServiceHandle iosvc{this, "IOSvc", "IOSvc"}; + SmartIF m_hiveWhiteBoard; + SmartIF m_dataSvc; + mutable bool m_first{true}; StatusCode initialize() override { if (!iosvc.isValid()) { @@ -70,8 +70,9 @@ class Writer final : public Gaudi::Functional::Consumer("EventDataSvc", true); if (!m_hiveWhiteBoard) { - debug() << "Unable to locate IHiveWhiteBoard interface. This isn't a problem if we are not running in a multi-threaded environment" - << endmsg; + debug() << "Unable to locate IHiveWhiteBoard interface. This isn't a problem if we are not running in a " + "multi-threaded environment" + << endmsg; } return StatusCode::SUCCESS; @@ -259,9 +260,10 @@ class Writer final : public Gaudi::Functional::Consumer(std::chrono::system_clock::now().time_since_epoch()) - .count() - << endmsg; + << std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()) + .count() + << endmsg; iosvc->getWriter()->writeFrame(ptr->getData(), podio::Category::Event, m_collectionsToSave); } };