OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
H5PartWrapperForPT.h
Go to the documentation of this file.
1//
2// Class H5PartWrapperForPT
3// A class that manages all calls to H5Part for the Parallel-T tracker.
4//
5// Copyright (c) 200x-2021, Paul Scherrer Institut, Villigen PSI, Switzerland
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#ifndef OPAL_H5PARTWRAPPERFORPT_H
19#define OPAL_H5PARTWRAPPERFORPT_H
20
21#include "OPALTypes.h"
23
24#include "H5hut.h"
25
27public:
28 H5PartWrapperForPT(const std::string& fileName, h5_int32_t flags = H5_O_WRONLY);
30 const std::string& fileName, int restartStep, std::string sourceFile,
31 h5_int32_t flags = H5_O_RDWR);
32 virtual ~H5PartWrapperForPT();
33
34 virtual void readHeader();
35 virtual void readStep(PartBunch_t*, h5_ssize_t firstParticle, h5_ssize_t lastParticle);
36
37 virtual void writeHeader();
38 virtual void writeStep(
39 PartBunch_t*, const std::map<std::string, double>& additionalStepAttributes);
40
41 virtual bool predecessorIsSameFlavour() const;
42
43private:
45 void readStepData(PartBunch_t*, h5_ssize_t, h5_ssize_t);
46
47 void writeStepHeader(PartBunch_t*, const std::map<std::string, double>&);
49};
50
52 return (predecessorOPALFlavour_m == "opal-t");
53}
54
55#endif // OPAL_H5PARTWRAPPERFORPT_H
PartBunch< PLayout_t< double, 3 >, double, 3 > PartBunch_t
H5PartWrapper(const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
std::string predecessorOPALFlavour_m
virtual void readStep(PartBunch_t *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)
virtual void writeStep(PartBunch_t *, const std::map< std::string, double > &additionalStepAttributes)
H5PartWrapperForPT(const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
virtual bool predecessorIsSameFlavour() const
void readStepData(PartBunch_t *, h5_ssize_t, h5_ssize_t)
void readStepHeader(PartBunch_t *)
void writeStepHeader(PartBunch_t *, const std::map< std::string, double > &)
void writeStepData(PartBunch_t *)