OPALX (Object Oriented Parallel Accelerator Library for Exascal)
master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
BinConfigWriter.h
Go to the documentation of this file.
1
//
2
// Class BinConfigWriter
3
// Writes binning configuration snapshots to a JSON file.
4
//
5
// Copyright (c) 2026, Paul Scherrer Institut
6
// All rights reserved
7
//
8
// This file is part of OPAL.
9
//
10
// OPAL is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17
//
18
19
#ifndef OPAL_BIN_CONFIG_WRITER_H
20
#define OPAL_BIN_CONFIG_WRITER_H
21
22
#include <cstddef>
23
#include <fstream>
24
#include <string>
25
#include <vector>
26
34
class
BinConfigWriter
{
35
public
:
36
explicit
BinConfigWriter
(
const
std::string& fileName);
37
38
~BinConfigWriter
();
39
40
void
writeEntry
(
41
long
long
step,
double
time,
bool
preMerge,
const
std::vector<std::size_t>& binCounts,
42
const
std::vector<double>& binWidths,
double
xMin);
43
44
private
:
45
std::ofstream
os_
;
46
bool
first_
;
47
};
48
49
#endif
// OPAL_BIN_CONFIG_WRITER_H
BinConfigWriter
Helper to write binning configuration snapshots as a JSON array.
Definition
BinConfigWriter.h:34
BinConfigWriter::first_
bool first_
Definition
BinConfigWriter.h:46
BinConfigWriter::~BinConfigWriter
~BinConfigWriter()
Definition
BinConfigWriter.cpp:30
BinConfigWriter::writeEntry
void writeEntry(long long step, double time, bool preMerge, const std::vector< std::size_t > &binCounts, const std::vector< double > &binWidths, double xMin)
Definition
BinConfigWriter.cpp:39
BinConfigWriter::os_
std::ofstream os_
Definition
BinConfigWriter.h:45
src
Structure
BinConfigWriter.h
Generated on Mon Jun 1 2026 10:40:53 for OPALX (Object Oriented Parallel Accelerator Library for Exascal) by
1.9.8