The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
StatEntity.cpp
Go to the documentation of this file.
1/*****************************************************************************\
2* (c) Copyright 2023 CERN for the benefit of the LHCb Collaboration *
3* *
4* This software is distributed under the terms of the GNU General Public *
5* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\*****************************************************************************/
11
13
14void to_json( nlohmann::json& j, StatEntity const& s ) {
15 j = { { "type", s.typeString },
16 { "empty", s.nEntries() == 0 },
17 { "nEntries", s.nEntries() },
18 { "sum", s.sum() },
19 { "mean", s.mean() },
20 { "sum2", s.sum2() },
21 { "standard_deviation", s.standard_deviation() },
22 { "min", s.min() },
23 { "max", s.max() },
24 { "nTrueEntries", s.nTrueEntries() },
25 { "nFalseEntries", s.nFalseEntries() },
26 { "efficiency", s.efficiency() },
27 { "efficiencyErr", s.efficiencyErr() } };
28}
void to_json(nlohmann::json &j, StatEntity const &s)
StatEntity()=default
the constructor with automatic registration in the owner's counter map