OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ParticleMatterInteraction.h
Go to the documentation of this file.
1 #ifndef OPAL_PARTICLEMATTERINTERACTION_HH
2 #define OPAL_PARTICLEMATTERINTERACTION_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Wake.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Wake
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:44 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
22 #include "Algorithms/PartData.h"
24 
25 class ElementBase;
26 class Inform;
27 
28 // Class Wake
29 // ------------------------------------------------------------------------
31 // A WAKE definition is used by most physics commands to define the
32 // particle charge and the reference momentum, together with some other
33 // data.
34 
36 
37 public:
38 
41 
43 
45  // Can replace only by another WAKE.
46  virtual bool canReplaceBy(Object *object);
47 
49  virtual ParticleMatterInteraction *clone(const std::string &name);
50 
52  virtual void execute();
53 
55  static ParticleMatterInteraction *find(const std::string &name);
56 
58  virtual void update();
59 
60  void print(std::ostream &os) const;
61 
63 
64  void updateElement(ElementBase *element);
65 
67 
68 private:
69 
70  // Not implemented.
73 
74  // Clone constructor.
75  ParticleMatterInteraction(const std::string &name, ParticleMatterInteraction *parent);
76 };
77 
78 inline std::ostream &operator<<(std::ostream &os, const ParticleMatterInteraction &b) {
79  b.print(os);
80  return os;
81 }
82 
83 #endif // OPAL_PARTICLEMATTERINTERACTION_HH
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
Definition: Attribute.cpp:167
Interface for basic beam line object.
Definition: ElementBase.h:128
The base class for all OPAL definitions.
Definition: Definition.h:30
void updateElement(ElementBase *element)
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
ParticleMatterInteractionHandler * handler_m
virtual void update()
Update the PARTICLEMATTERINTERACTION data.
void initParticleMatterInteractionHandler(ElementBase &element)
virtual void execute()
Check the PARTICLEMATTERINTERACTION data.
void operator=(const ParticleMatterInteraction &)
The base class for all OPAL objects.
Definition: Object.h:48
virtual ParticleMatterInteraction * clone(const std::string &name)
Make clone.
void print(std::ostream &os) const
Print the object.
const std::string name
ParticleMatterInteraction()
Exemplar constructor.
Definition: Inform.h:41