Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
HEP
HEPnOS
Commits
c691fddc
Commit
c691fddc
authored
Feb 12, 2020
by
Matthieu Dorier
Browse files
moved implementation file out of private folder
parent
c2ee009d
Changes
17
Hide whitespace changes
Inline
Side-by-side
include/hepnos/DataSet.hpp
View file @
c691fddc
...
...
@@ -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
);
};
}
...
...
include/hepnos/DataStore.hpp
View file @
c691fddc
...
...
@@ -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
>&
);
};
...
...
src/DataSet.cpp
View file @
c691fddc
...
...
@@ -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
}
}
src/
private/
DataSetImpl.hpp
→
src/DataSetImpl.hpp
View file @
c691fddc
File moved
src/DataStore.cpp
View file @
c691fddc
...
...
@@ -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
{
...
...
src/
private/
DataStoreImpl.hpp
→
src/DataStoreImpl.hpp
View file @
c691fddc
File moved
src/Event.cpp
View file @
c691fddc
...
...
@@ -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
{
...
...
src/
private/
EventImpl.hpp
→
src/EventImpl.hpp
View file @
c691fddc
File moved
src/Run.cpp
View file @
c691fddc
...
...
@@ -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
{
...
...
src/
private/
RunImpl.hpp
→
src/RunImpl.hpp
View file @
c691fddc
File moved
src/RunSet.cpp
View file @
c691fddc
...
...
@@ -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
{
...
...
src/
private/
RunSetImpl.hpp
→
src/RunSetImpl.hpp
View file @
c691fddc
File moved
src/
private/
StringHash.hpp
→
src/StringHash.hpp
View file @
c691fddc
File moved
src/SubRun.cpp
View file @
c691fddc
...
...
@@ -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
{
...
...
src/
private/
SubRunImpl.hpp
→
src/SubRunImpl.hpp
View file @
c691fddc
File moved
src/WriteBatch.cpp
View file @
c691fddc
...
...
@@ -4,7 +4,7 @@
* See COPYRIGHT in top-level directory.
*/
#include "hepnos.hpp"
#include "
private/
WriteBatchImpl.hpp"
#include "WriteBatchImpl.hpp"
namespace
hepnos
{
...
...
src/
private/
WriteBatchImpl.hpp
→
src/WriteBatchImpl.hpp
View file @
c691fddc
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment