OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
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
22
23#include "H5hut.h"
24
26public:
27 H5PartWrapperForPT(const std::string& fileName, h5_int32_t flags = H5_O_WRONLY);
28 H5PartWrapperForPT(const std::string& fileName, int restartStep, std::string sourceFile, h5_int32_t flags = H5_O_RDWR);
29 virtual ~H5PartWrapperForPT();
30
31 virtual void readHeader();
32 virtual void readStep(PartBunchBase<double, 3>*, h5_ssize_t firstParticle, h5_ssize_t lastParticle);
33
34 virtual void writeHeader();
35 virtual void writeStep(PartBunchBase<double, 3>*, const std::map<std::string, double>& additionalStepAttributes);
36
37 virtual bool predecessorIsSameFlavour() const;
38
39private:
41 void readStepData(PartBunchBase<double, 3>*, h5_ssize_t, h5_ssize_t);
42
43 void writeStepHeader(PartBunchBase<double, 3>*, const std::map<std::string, double>&);
45};
46
47inline
49 return (predecessorOPALFlavour_m == "opal-t");
50}
51
52#endif //OPAL_H5PARTWRAPPERFORPT_H
std::string predecessorOPALFlavour_m
Definition: H5PartWrapper.h:75
void writeStepData(PartBunchBase< double, 3 > *)
void readStepHeader(PartBunchBase< double, 3 > *)
virtual void writeHeader()
virtual void writeStep(PartBunchBase< double, 3 > *, const std::map< std::string, double > &additionalStepAttributes)
void readStepData(PartBunchBase< double, 3 > *, h5_ssize_t, h5_ssize_t)
H5PartWrapperForPT(const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
virtual bool predecessorIsSameFlavour() const
virtual void readHeader()
virtual void readStep(PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)
void writeStepHeader(PartBunchBase< double, 3 > *, const std::map< std::string, double > &)