OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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 size_t particleContainerIndex = 0);
41
42 virtual bool predecessorIsSameFlavour() const;
43
44private:
46 void readStepData(PartBunch_t*, h5_ssize_t, h5_ssize_t);
47
48 void writeStepHeader(
49 PartBunch_t*, const std::map<std::string, double>&, size_t particleContainerIndex);
50 void writeStepData(PartBunch_t*, size_t particleContainerIndex);
51};
52
54 return (predecessorOPALFlavour_m == "opal-t");
55}
56
57#endif // OPAL_H5PARTWRAPPERFORPT_H
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, size_t particleContainerIndex=0)
void writeStepData(PartBunch_t *, size_t particleContainerIndex)
virtual bool predecessorIsSameFlavour() const
void writeStepHeader(PartBunch_t *, const std::map< std::string, double > &, size_t particleContainerIndex)
void readStepData(PartBunch_t *, h5_ssize_t, h5_ssize_t)
void readStepHeader(PartBunch_t *)
std::string predecessorOPALFlavour_m