Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podio::DataSource #309

Merged
merged 32 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b6d1734
Integrating EDM4hep RDataSource
kjvbrt Aug 3, 2023
264899a
Add legacy reader
kjvbrt Aug 7, 2023
93fd3ac
Split off legacy reader
kjvbrt Aug 7, 2023
a2172d0
Protecting collection retrieval by mutex
kjvbrt Aug 8, 2023
58292c8
Add source test
kjvbrt Aug 14, 2023
96600f5
Updated man pages
kjvbrt Aug 15, 2023
33a357f
Renaming Source na DataSource
kjvbrt Aug 15, 2023
ca7e91e
Adding source test for run stages
kjvbrt Oct 3, 2023
ccd3671
Add tests for the standalone mode
kjvbrt Oct 12, 2023
da73dbb
Adding test files per process for histmaker
kjvbrt Oct 26, 2023
616a827
Adding selector by size and sorter by pT
kjvbrt Nov 15, 2023
2187e48
Few more analyzers
kjvbrt Nov 16, 2023
a61b6cf
Putting back things omitted from run_analysis.py
kjvbrt Jan 25, 2024
1530e5e
Adding e4hsource in LD_LIBRARY_PATH for managed tests
kjvbrt Jan 25, 2024
285a170
Making building of the source optional
kjvbrt Mar 1, 2024
e1aa165
Removed legacy support
kjvbrt Mar 1, 2024
9d74103
Separated analyzers using Collections into independent headers
kjvbrt Mar 4, 2024
258813c
Reimplementing analyzers needed for the stage1 of the example analysis
kjvbrt Mar 8, 2024
311379b
Adjusitng test input files
kjvbrt Mar 8, 2024
27dcbbd
Moving recoParticle definition
kjvbrt May 3, 2024
97db64b
Changes to use podio::ROOTDataSource
kjvbrt May 6, 2024
b1b76c3
using podio::DataSource
kjvbrt Aug 28, 2024
ce2981f
Adjusting stages source example
kjvbrt Sep 18, 2024
005ac4e
Adding C++ analysis tests
kjvbrt Sep 19, 2024
53f3402
Updating examples
kjvbrt Sep 20, 2024
7bd35ce
Formatting
kjvbrt Sep 20, 2024
d1aad33
Removing e4hsource
kjvbrt Sep 20, 2024
c2aa199
Adjust clang-format check
kjvbrt Sep 20, 2024
eb6dffe
Formatting
kjvbrt Sep 20, 2024
026ff54
Using PodioSource namespace
kjvbrt Oct 1, 2024
c0eb383
Adding .cache to .gitignore
kjvbrt Oct 1, 2024
26240f1
Formatting
kjvbrt Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renaming Source na DataSource
  • Loading branch information
kjvbrt committed Oct 1, 2024
commit 33a357fef2acdb070dde668a1aee308a805aa22b
12 changes: 6 additions & 6 deletions e4hsource/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(e4hsource SHARED src/EDM4hepSource.cxx)
add_library(e4hsource SHARED src/EDM4hepDataSource.cxx)
target_include_directories(e4hsource PUBLIC include)
target_link_libraries(e4hsource PUBLIC ROOT::RIO
ROOT::ROOTDataFrame
Expand All @@ -7,10 +7,10 @@ target_link_libraries(e4hsource PUBLIC ROOT::RIO
EDM4HEP::edm4hepDict
)

ROOT_GENERATE_DICTIONARY(G__FCCAnalyses_EDM4hepSource
include/EDM4hepSource/EDM4hepSource.hxx
ROOT_GENERATE_DICTIONARY(G__FCCAnalyses_EDM4hepDataSource
include/EDM4hepDataSource/EDM4hepDataSource.hxx
MODULE e4hsource
LINKDEF include/EDM4hepSource/LinkDef.h
LINKDEF include/EDM4hepDataSource/LinkDef.h
)

install(TARGETS e4hsource
Expand Down Expand Up @@ -38,9 +38,9 @@ target_link_libraries(e4hlegacysource PUBLIC ROOT::RIO
)

ROOT_GENERATE_DICTIONARY(G__FCCAnalyses_EDM4hepLegacySource
include/EDM4hepSource/EDM4hepLegacySource.hxx
include/EDM4hepDataSource/EDM4hepLegacySource.hxx
MODULE e4hlegacysource
LINKDEF include/EDM4hepSource/Legacy_LinkDef.h
LINKDEF include/EDM4hepDataSource/Legacy_LinkDef.h
)

install(TARGETS e4hlegacysource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef EDM4HEP_SOURCE_H__
#define EDM4HEP_SOURCE_H__
#ifndef EDM4HEP_DATASOURCE_H__
#define EDM4HEP_DATASOURCE_H__

// STL
#include <memory>
Expand All @@ -16,16 +16,16 @@
#include <podio/ROOTFrameReader.h>
#include <podio/CollectionBase.h>

bool loadEDM4hepSource();
bool loadEDM4hepDataSource();

namespace FCCAnalyses {
using Record_t = std::vector<void*>;

class EDM4hepSource final : public ROOT::RDF::RDataSource {
class EDM4hepDataSource final : public ROOT::RDF::RDataSource {
public:
EDM4hepSource(const std::string& filePath, int nEvents = -1);
EDM4hepSource(const std::vector<std::string>& filePathList,
int nEvents = -1);
EDM4hepDataSource(const std::string& filePath, int nEvents = -1);
EDM4hepDataSource(const std::vector<std::string>& filePathList,
int nEvents = -1);

void SetNSlots(unsigned int nSlots);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the virtual functions here be marked with either final or override, just so that the compiler has a chance to detect mismatches here?


Expand Down Expand Up @@ -85,13 +85,13 @@ namespace FCCAnalyses {


/**
* \brief Retrieve from EDM4hepSource per-thread readers for the
* \brief Retrieve from EDM4hepDataSource per-thread readers for the
* desired columns.
*/
template<typename T>
std::vector<T**>
EDM4hepSource::GetColumnReaders(std::string_view columnName) {
std::cout << "EDM4hepSource: Getting column readers for column: "
EDM4hepDataSource::GetColumnReaders(std::string_view columnName) {
std::cout << "EDM4hepDataSource: Getting column readers for column: "
<< columnName << std::endl;

std::vector<T**> readers;
Expand All @@ -102,4 +102,4 @@ namespace FCCAnalyses {
ROOT::RDataFrame FromEDM4hep(const std::vector<std::string>& filePathList);
}

#endif /* EDM4HEP_SOURCE_H__ */
#endif /* EDM4HEP_DATASOURCE_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#pragma link C++ nestedclasses;

// Load function
#pragma link C++ function loadEDM4hepSource;
#pragma link C++ function loadEDM4hepDataSource;

// Source
#pragma link C++ class FCCAnalyses::EDM4hepSource;
#pragma link C++ class FCCAnalyses::EDM4hepDataSource;
#pragma link C++ function FCCAnalyses::FromEDM4hep;

#endif
Loading