source: DMM/DMM/MCParticle.h @ 412

Last change on this file since 412 was 373, checked in by campagne, 17 years ago

Data Model for MEMPHYS

File size: 1.7 KB
Line 
1#ifndef DMM_MCPARTICLE_H
2#define DMM_MCPARTICLE_H 1
3/*!
4\class MCParticle MCParticle.h
5"DMM/MCParticle.h"
6\brief Memory & Storable description of a MC Particle
7\author J.E Campagne
8*/
9
10// DMM
11#include "DMM/Particle.h"
12
13namespace MEMPHYS {
14namespace DMM {
15
16class IDataServices;
17 
18class MCParticle : public Particle {
19
20 public:
21  typedef boost::shared_ptr<MCParticle>  SharedPtr;
22  typedef boost::weak_ptr<MCParticle>    WeakPtr;
23  typedef std::vector<SharedPtr>         VecOfSharedPtr;
24  typedef std::vector<WeakPtr>          VecOfWeakPtr;
25
26  //@name IStorable inheritence
27  //@{
28  virtual void* cast(const std::string& aClass) const;
29  virtual bool visit(Slash::Store::IConstVisitor&) const;
30  virtual bool read(Slash::Store::IVisitor&);
31  //@}
32
33  //@name BaseData inheritence
34  //@{
35  virtual void dump(std::ostream& f, const std::string& option = ""); 
36  //@}
37
38
39  //!Constructor
40  MCParticle(IDataServices& aService);
41  //!CCtor
42  MCParticle(const MCParticle& aMCParticle);
43  //!Assignment
44  MCParticle& operator=(const MCParticle& aMCParticle); 
45
46  //!Destructor
47  virtual ~MCParticle() {
48    std::cout << "Destroy MCParticle("<<this<<")"<<std::endl;
49  }
50  //! Use the copy constructor to clone
51  //JEC See if useful MCParticle* clone() const {return new MCParticle(*this);}
52
53
54  //! @name Accessors
55  //@{
56  //! Update isPrimary
57  void setIsPrimary(const bool& value) { m_isPrimary = value; }
58  //! Retreive isPrimary
59  bool isPrimary() const { return m_isPrimary; }
60
61  //! Update startTime
62  void setStartTime(const float& value) { m_startTime = value; }
63  //! Retreive startTime
64  float startTime() const { return m_startTime; }
65 //@}
66
67 protected:
68  //! Is Primary
69  bool m_isPrimary;
70
71  //! Start Time
72  float m_startTime;
73};
74
75}//DMM
76}//MEMPHYS
77
78#endif // DMM_MCPARTICLE_H
Note: See TracBrowser for help on using the repository browser.