14#include <benchmark/benchmark.h>
38static void BM_TableToTree(benchmark::State& state)
42 std::default_random_engine e1(1234567891);
43 std::uniform_real_distribution<double>
rd(0, 1);
44 std::normal_distribution<float> rf(5., 2.);
45 std::discrete_distribution<ULong64_t> rl({10, 20, 30, 30, 5, 5});
46 std::discrete_distribution<int> ri({10, 20, 30, 30, 5, 5});
51 builder.
persist<double, float, ULong64_t,
int>({
"a",
"b",
"c",
"d"});
52 for (
auto i = 0;
i <
state.range(0); ++
i) {
53 rowWriter(0,
rd(e1), rf(e1), rl(e1), ri(e1));
55 auto table = builder.finalize();
58 for (
auto _ :
state) {
61 TFile fout(
"table2tree.root",
"RECREATE");
#define DECLARE_SOA_DYNAMIC_COLUMN(_Name_, _Getter_,...)
#define DECLARE_SOA_COLUMN(_Name_, _Getter_, _Type_)
constexpr unsigned int maxrange
BENCHMARK(BM_TableToTree) -> Range(8, 8<< maxrange)
auto persist(std::array< char const *, sizeof...(ARGS)+1 > const &columnNames)
std::shared_ptr< TTree > process()
float sum(float s, o2::dcs::DataPointValue v)
GLdouble GLdouble GLdouble z
Defining PrimaryVertex explicitly as messageable.
FIXME: do not use data model tables.