Skip to content

Commit

Permalink
Other suggested adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Aug 26, 2024
1 parent b8938ce commit d1dcebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
21 changes: 1 addition & 20 deletions include/podio/DataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ class DataSource : public ROOT::RDF::RDataSource {
///
void SetNSlots(unsigned int nSlots) override;

///
/// @brief Retrieve from podio::DataSource per-thread readers for the desired
/// columns.
///
template <typename T>
std::vector<T**> GetColumnReaders(std::string_view columnName);

///
/// @brief Inform podio::DataSource that an event-loop is about to start.
///
Expand Down Expand Up @@ -111,7 +104,7 @@ class DataSource : public ROOT::RDF::RDataSource {
std::vector<std::string> m_filePathList = {};

/// Total number of events
unsigned int m_nEvents = 0;
ULong64_t m_nEvents = 0;

/// Ranges of events available to be processed
std::vector<std::pair<ULong64_t, ULong64_t>> m_rangesAvailable = {};
Expand Down Expand Up @@ -146,18 +139,6 @@ class DataSource : public ROOT::RDF::RDataSource {
void SetupInput(int nEvents);
};

///
/// Not used.
///
template <typename T>
std::vector<T**> DataSource::GetColumnReaders(std::string_view) {
// std::cout << "podio::DataSource: Getting column readers for column: " << columnName << std::endl;

std::vector<T**> readers;

return readers;
}

///
/// @brief Create RDataFrame from multiple Podio files.
///
Expand Down
4 changes: 2 additions & 2 deletions src/DataSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void DataSource::SetupInput(int nEvents) {
unsigned int nEventsInFiles = 0;
auto podioReader = podio::makeReader(m_filePathList);
nEventsInFiles = podioReader.getEntries(podio::Category::Event);
frame = podio::Frame(podioReader.readFrame(podio::Category::Event, 0));
frame = podioReader.readFrame(podio::Category::Event, 0);

// Determine over how many events to run
if (nEventsInFiles > 0) {
Expand Down Expand Up @@ -89,7 +89,7 @@ void DataSource::SetNSlots(unsigned int nSlots) {
}

for (size_t i = 0; i < m_nSlots; ++i) {
m_frames.emplace_back(std::make_unique<podio::Frame>(podio::Frame{}));
m_frames.emplace_back(std::make_unique<podio::Frame>());
}
}

Expand Down

0 comments on commit d1dcebe

Please sign in to comment.