Commit c691fddc authored by Matthieu Dorier's avatar Matthieu Dorier

moved implementation file out of private folder

parent c2ee009d
......@@ -393,19 +393,6 @@ class DataSet : public KeyValueContainer {
* @return a Run corresponding to the provided run number.
*/
Run operator[](const RunNumber& runNumber) const;
/**
* @brief Executes a callback for each event in the hierarchy down
* from this DataSet. The events are dispatched to members of the comm
* MPI communicator.
*
* The callback should not make MPI calls.
*
* @param comm MPI communicator.
* @param callback Callback that will be called on each item.
*/
void foreach(MPI_Comm comm,
const std::function<void(const Run&, const SubRun&, const Event&)>& callback);
};
}
......
......@@ -336,15 +336,71 @@ class DataStore {
* @return true if the data was loaded successfuly, false otherwise.
*/
bool loadRawProduct(const ProductID& productID, std::string& buffer);
/**
* @brief Loads the raw data corresponding to a product into a buffer.
*
* @param productID Product id.
* @param value Buffer in which to place the raw data.
* @param value_size Size of the input buffer, set to size of the actual data after the call.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
bool loadRawProduct(const ProductID& productID, char* value, size_t* value_size);
/**
* @brief Loads the raw data of a product directly into the product itself,
* with the product type T not a POD type.
*
* @tparam T Type of the product.
* @param productID Product id.
* @param t Product.
* @param std::integral_constant type trait indicating T is non-POD.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
template<typename T>
bool loadProductImpl(const ProductID& productID, T& t, const std::integral_constant<bool, false>&);
/**
* @brief Loads the raw data of a product directly into the product itself,
* with the product type T being a POD type.
*
* @tparam T Type of the product.
* @param productID Product id.
* @param t Product.
* @param std::integral_constant type trait indicating T is POD.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
template<typename T>
bool loadProductImpl(const ProductID& productID, T& t, const std::integral_constant<bool, true>&);
/**
* @brief Loads the raw data of a product with the product type being an std::vector
* of non-POD type.
*
* @tparam T Type of vector elements.
* @param productID Product id.
* @param t Product.
* @param std::integral_constant type trait indicating T is non-POD.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
template<typename T>
bool loadProductImpl(const ProductID& productID, std::vector<T>& t, const std::integral_constant<bool, false>&);
/**
* @brief Loads the raw data of a product with the product type being an std::vector
* of POD type.
*
* @tparam T Type of vector elements.
* @param productID Product id.
* @param t Product.
* @param std::integral_constant type trait indicating T is POD.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
template<typename T>
bool loadProductImpl(const ProductID& productID, std::vector<T>& t, const std::integral_constant<bool, true>&);
};
......
......@@ -6,11 +6,11 @@
#include "hepnos/DataSet.hpp"
#include "hepnos/Run.hpp"
#include "hepnos/RunSet.hpp"
#include "private/RunSetImpl.hpp"
#include "private/RunImpl.hpp"
#include "private/DataSetImpl.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/WriteBatchImpl.hpp"
#include "RunSetImpl.hpp"
#include "RunImpl.hpp"
#include "DataSetImpl.hpp"
#include "DataStoreImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......@@ -338,10 +338,4 @@ const RunSet& DataSet::runs() const {
return const_cast<DataSet*>(this)->runs();
}
void DataSet::foreach(MPI_Comm comm,
const std::function<void(const Run&, const SubRun&, const Event&)>& callback)
{
// TODO
}
}
......@@ -10,8 +10,8 @@
#include "hepnos/DataStore.hpp"
#include "hepnos/DataSet.hpp"
#include "hepnos/WriteBatch.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/WriteBatchImpl.hpp"
#include "DataStoreImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......
......@@ -4,9 +4,9 @@
* See COPYRIGHT in top-level directory.
*/
#include "hepnos/Event.hpp"
#include "private/EventImpl.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/WriteBatchImpl.hpp"
#include "EventImpl.hpp"
#include "DataStoreImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......
......@@ -4,10 +4,10 @@
* See COPYRIGHT in top-level directory.
*/
#include "hepnos/Run.hpp"
#include "private/RunImpl.hpp"
#include "private/SubRunImpl.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/WriteBatchImpl.hpp"
#include "RunImpl.hpp"
#include "SubRunImpl.hpp"
#include "DataStoreImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......
......@@ -8,10 +8,10 @@
#include <string>
#include "hepnos/DataSet.hpp"
#include "hepnos/RunSet.hpp"
#include "private/DataSetImpl.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/RunImpl.hpp"
#include "private/RunSetImpl.hpp"
#include "DataSetImpl.hpp"
#include "DataStoreImpl.hpp"
#include "RunImpl.hpp"
#include "RunSetImpl.hpp"
namespace hepnos {
......
......@@ -6,10 +6,10 @@
#include <memory>
#include "hepnos/SubRun.hpp"
#include "private/SubRunImpl.hpp"
#include "private/EventImpl.hpp"
#include "private/DataStoreImpl.hpp"
#include "private/WriteBatchImpl.hpp"
#include "SubRunImpl.hpp"
#include "EventImpl.hpp"
#include "DataStoreImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......
......@@ -4,7 +4,7 @@
* See COPYRIGHT in top-level directory.
*/
#include "hepnos.hpp"
#include "private/WriteBatchImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace hepnos {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment