CbmRoot
Loading...
Searching...
No Matches
LitUtils.h
Go to the documentation of this file.
1
/* Copyright (C) 2009-2013 GSI/JINR-LIT, Darmstadt/Dubna
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Andrey Lebedev [committer] */
4
15
#ifndef LITUTILS_H_
16
#define LITUTILS_H_
17
18
#include <sstream>
19
#include <string>
20
21
namespace
lit
22
{
23
namespace
parallel
24
{
25
36
template
<
class
T>
37
std::string
ToString
(
const
T& value)
38
{
39
std::stringstream ss;
40
ss.precision(5);
41
ss << value;
42
return
ss.str();
43
}
44
45
58
class
DeleteObject
{
59
public
:
60
template
<
typename
T>
61
void
operator()
(
const
T* ptr)
const
62
{
63
delete
ptr;
64
}
65
};
66
67
}
// namespace parallel
68
}
// namespace lit
69
#endif
/* LITUTILS_H_ */
lit::parallel::DeleteObject
Functor class for convenient memory release.
Definition
LitUtils.h:58
lit::parallel::DeleteObject::operator()
void operator()(const T *ptr) const
Definition
LitUtils.h:61
lit::parallel::ToString
std::string ToString(const T &value)
Function converts object into a std::string.
Definition
LitUtils.h:37
lit
Definition
LitTrackFinderNNVecElectron.h:24
reco
littrack
parallel
LitUtils.h
Generated on Sun Dec 22 2024 23:04:17 for CbmRoot by
1.12.0