Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HEPnOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
HEP
HEPnOS
Commits
06b069b1
Commit
06b069b1
authored
Oct 15, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added proper comments
parent
55244187
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
include/hepnos/DataStore.hpp
include/hepnos/DataStore.hpp
+44
-0
No files found.
include/hepnos/DataStore.hpp
View file @
06b069b1
...
...
@@ -249,12 +249,48 @@ class DataStore {
*/
DataSet
createDataSet
(
const
std
::
string
&
name
);
/**
* @brief Create a pointer to a product. The type T used must
* match the type of the product corresponding to the provided
* product ID. Using a different type will result in undefined
* behaviors.
*
* @tparam T Type of the product.
* @param productID Product ID.
*
* @return a Ptr instance pointing to the given product.
*/
template
<
typename
T
>
Ptr
<
T
>
makePtr
(
const
ProductID
&
productID
);
/**
* @brief Create a pointer to a product located in a collection
* at a given index. The type T used must match the type of objects
* stored in the collection. Using a different type will result in
* undefined behavior. The collection type may be ommited if it
* is std::vector<T>. The collection type must have a braket operator
* taking an unsigned integral type (e.g. size_t) as input and returning
* a const reference (or a reference) to an object of type T.
*
* @tparam T Type of object pointed to.
* @tparam C Type of collection.
* @param productID Product id.
* @param index Index of the object in the collection.
*
* @return a Ptr instance pointing to the given product.
*/
template
<
typename
T
,
typename
C
=
std
::
vector
<
T
>
>
Ptr
<
T
,
C
>
makePtr
(
const
ProductID
&
productID
,
std
::
size_t
index
);
/**
* @brief Loads a particular object by its product id.
*
* @tparam T Type of object.
* @param productID Product id.
* @param t Object being loaded.
*
* @return True if the object was correctly loaded, false otherwise.
*/
template
<
typename
T
>
bool
loadProduct
(
const
ProductID
&
productID
,
T
&
t
);
...
...
@@ -271,6 +307,14 @@ class DataStore {
class
Impl
;
std
::
unique_ptr
<
Impl
>
m_impl
;
/*!< Pointer to implementation */
/**
* @brief Loads the raw data corresponding to a product.
*
* @param productID Product id.
* @param buffer Buffer in which to place the raw data.
*
* @return true if the data was loaded successfuly, false otherwise.
*/
bool
loadRawProduct
(
const
ProductID
&
productID
,
std
::
vector
<
char
>&
buffer
);
};
...
...
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