OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
DataSource
FilePtclBaseDataSource.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef FILE_PARTICLE_BASE_DATA_SOURCE_H
12
#define FILE_PARTICLE_BASE_DATA_SOURCE_H
13
14
/***********************************************************************
15
*
16
* class FileIpplParticleBaseDataSource
17
*
18
* A specific version of DataSourceObject which takes the data for
19
* a given IpplParticleBase and writes it to a file using a DiscParticle
20
* object.
21
*
22
***********************************************************************/
23
24
// include files
25
#include "
DataSource/DataSourceObject.h
"
26
#include "
Particle/IpplParticleBase.h
"
27
#include "
Utility/DiscParticle.h
"
28
29
30
template
<
class
T>
31
class
FileIpplParticleBaseDataSource
:
public
DataSourceObject
{
32
33
public
:
34
// constructor: the name, the connection, the transfer method,
35
// the IpplParticleBase to connect
36
FileIpplParticleBaseDataSource
(
const
char
*,
DataConnect
*,
int
,
37
IpplParticleBase<T>
&);
38
39
// destructor
40
virtual
~FileIpplParticleBaseDataSource
();
41
42
//
43
// virtual function interface.
44
//
45
46
// Update the object, that is, make sure the receiver of the data has a
47
// current and consistent snapshot of the current state. Return success.
48
virtual
bool
update
();
49
50
// Indicate to the receiver that we're allowing them time to manipulate the
51
// data (e.g., for a viz program, to rotate it, change representation, etc.)
52
// This should only return when the manipulation is done.
53
virtual
void
interact
(
const
char
* = 0);
54
55
private
:
56
// the DiscParticle object, which read/writes the data
57
DiscParticle
*
DP
;
58
59
// the IpplParticleBase to read into (or write from)
60
IpplParticleBase<T>
&
MyParticles
;
61
62
// the number of frames we have read or written (i.e. or current record)
63
int
counter
;
64
};
65
66
#include "
DataSource/FilePtclBaseDataSource.hpp
"
67
68
#endif // FILE_PARTICLE_BASE_DATA_SOURCE_H
69
70
/***************************************************************************
71
* $RCSfile: FilePtclBaseDataSource.h,v $ $Author: adelmann $
72
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
73
* IPPL_VERSION_ID: $Id: FilePtclBaseDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
74
***************************************************************************/
IpplParticleBase< T >
FileIpplParticleBaseDataSource
Definition:
FilePtclBaseDataSource.h:31
DataConnect
Definition:
DataConnect.h:32
FileIpplParticleBaseDataSource::~FileIpplParticleBaseDataSource
virtual ~FileIpplParticleBaseDataSource()
Definition:
FilePtclBaseDataSource.hpp:61
FileIpplParticleBaseDataSource::FileIpplParticleBaseDataSource
FileIpplParticleBaseDataSource(const char *, DataConnect *, int, IpplParticleBase< T > &)
Definition:
FilePtclBaseDataSource.hpp:36
IpplParticleBase.h
FileIpplParticleBaseDataSource::update
virtual bool update()
Definition:
FilePtclBaseDataSource.hpp:72
FilePtclBaseDataSource.hpp
DiscParticle
Definition:
DiscParticle.h:30
FileIpplParticleBaseDataSource::DP
DiscParticle * DP
Definition:
FilePtclBaseDataSource.h:57
DataSourceObject.h
FileIpplParticleBaseDataSource::MyParticles
IpplParticleBase< T > & MyParticles
Definition:
FilePtclBaseDataSource.h:60
DiscParticle.h
DataSourceObject
Definition:
DataSourceObject.h:53
FileIpplParticleBaseDataSource::interact
virtual void interact(const char *=0)
Definition:
FilePtclBaseDataSource.hpp:89
FileIpplParticleBaseDataSource::counter
int counter
Definition:
FilePtclBaseDataSource.h:63
Generated on Tue Jul 2 2024 15:05:13 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5