Skip to content

Commit

Permalink
Fix warnings related to the ROOTFrameReader and ROOTFrameWriter (key4…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Feb 23, 2024
1 parent e392581 commit 72644a2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion k4FWCore/components/PodioOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ StatusCode PodioOutput::initialize() {
return StatusCode::FAILURE;
}

m_framewriter = std::make_unique<podio::ROOTFrameWriter>(m_filename);
m_framewriter = std::make_unique<podio::ROOTWriter>(m_filename);
m_switch = KeepDropSwitch(m_outputCommands);

return StatusCode::SUCCESS;
Expand Down
10 changes: 9 additions & 1 deletion k4FWCore/components/PodioOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
#include "GaudiAlg/GaudiAlgorithm.h"
#include "k4FWCore/KeepDropSwitch.h"
#include "podio/CollectionBase.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTWriter.h"
#else
#include "podio/ROOTFrameWriter.h"
namespace podio {
using ROOTWriter = podio::ROOTFrameWriter;
}
#endif

#include <vector>

Expand Down Expand Up @@ -56,7 +64,7 @@ class PodioOutput : public GaudiAlgorithm {
KeepDropSwitch m_switch;
PodioDataSvc* m_podioDataSvc;
/// The actual ROOT frame writer
std::unique_ptr<podio::ROOTFrameWriter> m_framewriter;
std::unique_ptr<podio::ROOTWriter> m_framewriter;
/// The stored collections
std::vector<podio::CollectionBase*> m_storedCollections;
/// The collections to write out
Expand Down
10 changes: 9 additions & 1 deletion k4FWCore/include/k4FWCore/PodioDataSvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@
#include "podio/CollectionBase.h"
#include "podio/CollectionIDTable.h"
#include "podio/Frame.h"
#include "podio/podioVersion.h"
#if PODIO_BUILD_VERSION >= PODIO_VERSION(0, 99, 0)
#include "podio/ROOTReader.h"
#else
#include "podio/ROOTFrameReader.h"
namespace podio {
using ROOTReader = podio::ROOTFrameReader;
}
#endif
// Forward declarations
#include "k4FWCore/DataWrapper.h"
class DataWrapperBase;
Expand Down Expand Up @@ -95,7 +103,7 @@ class PodioDataSvc : public DataSvc {

private:
/// PODIO reader for ROOT files
podio::ROOTFrameReader m_reader;
podio::ROOTReader m_reader;
/// PODIO Frame, used to initialise collections
podio::Frame m_eventframe;
/// PODIO Frame, used to store metadata
Expand Down

0 comments on commit 72644a2

Please sign in to comment.