OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
H5PartWrapperForPS.h
Go to the documentation of this file.
1 #ifndef OPAL_H5PARTWRAPPERFORPS_H
2 #define OPAL_H5PARTWRAPPERFORPS_H
3 
4 //
5 // Copyright & License: See Copyright.readme in src directory
6 //
7 
13 
14 #include "Algorithms/PBunchDefs.h"
16 
17 #include "H5hut.h"
18 
19 class EnvelopeBunch;
20 
22 public:
23  H5PartWrapperForPS(const std::string &fileName, h5_int32_t flags = H5_O_WRONLY);
24  H5PartWrapperForPS(const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags = H5_O_RDWR);
25  virtual ~H5PartWrapperForPS();
26 
27  virtual void readHeader();
28  virtual void readStep(PartBunchBase<double, 3>*, h5_ssize_t firstParticle, h5_ssize_t lastParticle);
29 
30  virtual void writeHeader();
31  virtual void writeStep(PartBunchBase<double, 3>*, const std::map<std::string, double> &additionalStepAttributes);
32 
33  virtual bool predecessorIsSameFlavour() const;
34 
36  Vector_t FDext[],
37  double sposHead,
38  double sposRef,
39  double sposTail);
41 
42 private:
44  void readStepData(PartBunchBase<double, 3>*, h5_ssize_t, h5_ssize_t);
45 
46  void writeStepHeader(PartBunchBase<double, 3>*, const std::map<std::string, double> &);
48 
49  std::vector< Vektor<h5_float64_t, 3> > stash_RefPartR;
50  std::vector< Vektor<h5_float64_t, 3> > stash_RefPartP;
51  std::vector< Vektor<h5_float64_t, 3> > stash_centroid;
52  std::vector< Vektor<h5_float64_t, 3> > stash_geomvareps;
53  std::vector< Vektor<h5_float64_t, 3> > stash_xsigma;
54  std::vector< Vektor<h5_float64_t, 3> > stash_psigma;
55  std::vector< Vektor<h5_float64_t, 3> > stash_vareps;
56  std::vector< Vektor<h5_float64_t, 3> > stash_rmin;
57  std::vector< Vektor<h5_float64_t, 3> > stash_rmax;
58  std::vector< Vektor<h5_float64_t, 3> > stash_maxP;
59  std::vector< Vektor<h5_float64_t, 3> > stash_minP;
60  std::vector< Vektor<h5_float64_t, 3> > stash_Bhead;
61  std::vector< Vektor<h5_float64_t, 3> > stash_Ehead;
62  std::vector< Vektor<h5_float64_t, 3> > stash_Bref;
63  std::vector< Vektor<h5_float64_t, 3> > stash_Eref;
64  std::vector< Vektor<h5_float64_t, 3> > stash_Btail;
65  std::vector< Vektor<h5_float64_t, 3> > stash_Etail;
66  std::vector< h5_float64_t > stash_actPos;
67  std::vector< h5_float64_t > stash_t;
68  std::vector< h5_float64_t > stash_meanEnergy;
69  std::vector< h5_float64_t > stash_mass;
70  std::vector< h5_float64_t > stash_charge;
71  std::vector< h5_float64_t > stash_sposHead;
72  std::vector< h5_float64_t > stash_sposRef;
73  std::vector< h5_float64_t > stash_sposTail;
74  std::vector< size_t > stash_nLoc;
75  std::vector< size_t > stash_nTot;
76 };
77 
78 inline
80  return (predecessorOPALFlavour_m == "opal-t");
81 }
82 
83 #endif //OPAL_H5PARTWRAPPERFORPS_H
void readStepHeader(PartBunchBase< double, 3 > *)
virtual void writeStep(PartBunchBase< double, 3 > *, const std::map< std::string, double > &additionalStepAttributes)
std::vector< h5_float64_t > stash_sposRef
std::vector< Vektor< h5_float64_t, 3 > > stash_Etail
core of the envelope tracker based on Rene Bakkers BET implementation
Definition: EnvelopeBunch.h:60
std::vector< Vektor< h5_float64_t, 3 > > stash_psigma
std::vector< Vektor< h5_float64_t, 3 > > stash_Ehead
std::vector< Vektor< h5_float64_t, 3 > > stash_Btail
std::string predecessorOPALFlavour_m
Definition: H5PartWrapper.h:71
virtual void writeHeader()
std::vector< size_t > stash_nLoc
std::vector< h5_float64_t > stash_t
std::vector< Vektor< h5_float64_t, 3 > > stash_rmax
std::vector< Vektor< h5_float64_t, 3 > > stash_rmin
std::vector< h5_float64_t > stash_meanEnergy
std::vector< Vektor< h5_float64_t, 3 > > stash_RefPartP
std::vector< Vektor< h5_float64_t, 3 > > stash_RefPartR
void writeStepHeader(PartBunchBase< double, 3 > *, const std::map< std::string, double > &)
std::vector< size_t > stash_nTot
std::vector< Vektor< h5_float64_t, 3 > > stash_geomvareps
void writeStepData(PartBunchBase< double, 3 > *)
H5PartWrapperForPS(const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
std::vector< h5_float64_t > stash_sposTail
std::vector< Vektor< h5_float64_t, 3 > > stash_Eref
std::vector< h5_float64_t > stash_mass
std::vector< Vektor< h5_float64_t, 3 > > stash_maxP
virtual bool predecessorIsSameFlavour() const
std::vector< h5_float64_t > stash_actPos
std::vector< Vektor< h5_float64_t, 3 > > stash_Bhead
std::vector< h5_float64_t > stash_sposHead
virtual void readHeader()
std::vector< Vektor< h5_float64_t, 3 > > stash_minP
void stashPhaseSpaceEnvelope(EnvelopeBunch &bunch, Vector_t FDext[], double sposHead, double sposRef, double sposTail)
std::vector< Vektor< h5_float64_t, 3 > > stash_centroid
std::vector< Vektor< h5_float64_t, 3 > > stash_vareps
void readStepData(PartBunchBase< double, 3 > *, h5_ssize_t, h5_ssize_t)
std::vector< Vektor< h5_float64_t, 3 > > stash_Bref
std::vector< h5_float64_t > stash_charge
virtual void readStep(PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)
std::vector< Vektor< h5_float64_t, 3 > > stash_xsigma