diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 72b45845b486bda32df66eb10bae01e1e79c3900..c575c6e735ea138591620c3e1f6ef1136bf1dd98 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -132,7 +132,7 @@ jobs: -DDD4HEP_USE_GEANT4=ON \ -DBoost_NO_BOOST_CMAKE=ON \ -DDD4HEP_USE_LCIO=ON \ - -DDD4HEP_USE_EDM4HEP=ON \ + -DDD4HEP_USE_EDM4HEP=OFF \ -DDD4HEP_USE_TBB=ON \ -DDD4HEP_USE_HEPMC3=ON \ -DDD4HEP_BUILD_DEBUG=OFF \ diff --git a/DDDigi/io/DigiEdm4hepInput.cpp b/DDDigi/io/DigiEdm4hepInput.cpp index 9415f19d368d77cafbeb1dfb93bdbf471f004f03..464951b1fc28bd8531bc33fff85ce5fd28b9d440 100644 --- a/DDDigi/io/DigiEdm4hepInput.cpp +++ b/DDDigi/io/DigiEdm4hepInput.cpp @@ -102,6 +102,7 @@ namespace dd4hep { } // End namespace digi } // End namespace dd4hep +//#include <podio/Frame.h> #include "DigiFrame.h" #include <podio/ROOTFrameReader.h> #include <edm4hep/SimTrackerHit.h> @@ -128,7 +129,8 @@ namespace dd4hep { class edm4hep_read_frame_t : public DigiInputAction::event_frame { public: podio::Frame frame { }; - edm4hep_read_frame_t(podio::Frame&& frm) : frame(std::move(frm)) {} + edm4hep_read_frame_t(podio::Frame&& frm) : frame(std::move(frm)) { } + const podio::CollectionBase* get(const std::string& nam) const { return frame.self()->get(nam); } }; using reader_t = podio::ROOTFrameReader; using frame_t = edm4hep_read_frame_t; @@ -271,20 +273,19 @@ namespace dd4hep { /// Access the next event record. If the courrent source is exhausted, open next source std::shared_ptr<frame_t> DigiEdm4hepInput::internals_t::next() { if ( !m_source || m_source->done() || m_parent->fileLimitReached(*m_source) ) { - int mask = m_parent->input_mask(); m_source = open_source(); if ( m_source ) { auto frame = m_source->next(); if ( frame ) { - auto table = frame->frame.getIDTable(); - const auto& ids = table.ids(); - for( int id : ids ) { - std::string nam = table.name(id); + auto table = frame->frame.getAvailableCollections(); + int id = 0, mask = m_parent->input_mask(); + for( const auto& nam : table ) { m_parent->info("+++ Collection id: %04X --> '%s'", id, nam.c_str()); if ( m_parent->object_loading_is_enabled(nam) ) { Key key(nam, mask); m_source->collections.emplace( key, collection_t(id, nam) ); } + ++id; } m_parent->onProcessEvent(*m_source, *frame); return frame; @@ -322,7 +323,7 @@ namespace dd4hep { for( auto& coll : internals->m_source->collections ) { const auto& nam = coll.second.name; - const podio::CollectionBase* collection = frame->frame.get(nam); + const podio::CollectionBase* collection = frame->get(nam); if ( collection ) { work_t work { context, coll, segment, collection }; (*this)(context, work); diff --git a/DDDigi/io/DigiFrame.h b/DDDigi/io/DigiFrame.h index 8a1a04258dc996935d3150eaf13061b68f710dcf..565c286bdebb1e6bc63715d8ba2a021afec8bd10 100644 --- a/DDDigi/io/DigiFrame.h +++ b/DDDigi/io/DigiFrame.h @@ -1,5 +1,5 @@ -#ifndef DIGI_FRAME_H -#define DIGI_FRAME_H +#ifndef PODIO_FRAME_H +#define PODIO_FRAME_H #include "podio/CollectionBase.h" #include "podio/CollectionIDTable.h" @@ -162,15 +162,7 @@ public: /** Frame destructor */ ~Frame() = default; - /// Access CollectionIDTable from concept - podio::CollectionIDTable getIDTable() const { - return m_self->getIDTable(); - } - - /// Generic collection access from concept - const CollectionBase* get(const std::string& name) const { - return m_self->get(name); - } + const std::unique_ptr<FrameConcept>& self() const { return m_self; } /** Get a collection from the Frame */