OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
PtclAttribDataSource.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  *
4  * The IPPL Framework
5  *
6  * This program was prepared by PSI.
7  * All rights in the program are reserved by PSI.
8  * Neither PSI nor the author(s)
9  * makes any warranty, express or implied, or assumes any liability or
10  * responsibility for the use of this software
11  *
12  * Visit www.amas.web.psi for more details
13  *
14  ***************************************************************************/
15 
16 // -*- C++ -*-
17 /***************************************************************************
18  *
19  * The IPPL Framework
20  *
21  *
22  * Visit http://people.web.psi.ch/adelmann/ for more details
23  *
24  ***************************************************************************/
25 
26 // include files
29 
31 // constructor: the name, the connection, the transfer method, the attrib
33  DataConnect *dc, int tm, ParticleAttribBase *pa, DataSource *ds)
34  : DataSourceObject(nm, ds, dc, tm) {
35 
36  // find a particlebase object which contains this attribute; if none
37  // found, it is an error
39 
40  // if we did find it ...
41  if (PBase != 0) {
42  // change our name to include the particle base's name
43  std::string newname = PBase->name();
44  newname += ":";
45  newname += name();
46  setName(newname.c_str());
47  }
48 }
49 
50 
52 // destructor
54 
55 
56 
57 /***************************************************************************
58  * $RCSfile: PtclAttribDataSource.cpp,v $ $Author: adelmann $
59  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
60  * IPPL_VERSION_ID: $Id: PtclAttribDataSource.cpp,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
61  ***************************************************************************/
ParticleAttribDataSource(const char *, DataConnect *, int, ParticleAttribBase *, DataSource *)
const char * name() const
Definition: NamedObj.h:35
static IpplParticleBaseDataSource * find_particle_base(ParticleAttribDataSource *, ParticleAttribBase *)
const char * setName(const char *nm=0)
Definition: NamedObj.h:38
IpplParticleBaseDataSource * PBase