SST  15.1.0
StructuralSimulationToolkit
statgroup.h
1 // Copyright 2009-2025 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2025, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_STATAPI_STATGROUP_H
13 #define SST_CORE_STATAPI_STATGROUP_H
14 
15 #include "sst/core/serialization/serializer.h"
16 #include "sst/core/sst_types.h"
17 #include "sst/core/unitAlgebra.h"
18 
19 #include <cstddef>
20 #include <string>
21 #include <vector>
22 
23 namespace SST {
24 class ConfigStatGroup;
25 namespace Statistics {
26 class StatisticBase;
27 class StatisticOutput;
28 class StatisticProcessingEngine;
29 
30 /* A group of statistics that share a statistic output object*/
32 {
33 public:
34  StatisticGroup() {};
36  ~StatisticGroup();
37 
38  bool containsStatistic(const StatisticBase* stat) const;
39  bool claimsStatistic(const StatisticBase* stat) const;
40  void addStatistic(StatisticBase* stat);
41 
42  bool is_default = true;
43  std::string name = "default";
44  SimTime_t output_freq = 0;
45  StatisticOutput* output = nullptr;
46  size_t output_id = 0;
47 
48 
49  std::vector<ComponentId_t> components;
50  std::vector<std::string> stat_names;
51  std::vector<StatisticBase*> stats;
52 
53  void restartGroup(StatisticProcessingEngine* engine);
54  void serialize_order(SST::Core::Serialization::serializer& ser);
55 };
56 
57 } // namespace Statistics
58 } // namespace SST
59 
60 #endif // SST_CORE_STATAPI_STATGROUP_H
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
Forms the base class for statistics output generation within the SST core.
Definition: statoutput.h:52
Forms the base class for statistics gathering within SST.
Definition: statbase.h:49
Definition: action.cc:18
Definition: configGraph.h:282
An SST core component that handles timing and event processing informing all registered Statistics to...
Definition: statengine.h:54
Definition: statgroup.h:31