g4tools  5.4.0
cloud2plot_cp
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_sg_cloud2plot_cp
5 #define tools_sg_cloud2plot_cp
6 
7 #include "cloud2plot"
8 
9 namespace tools {
10 namespace sg {
11 
12 class c2d2plot_cp : public c2d2plot {
13 public:
15 public:
16  virtual void* cast(const std::string& a_class) const {
17  if(void* p = cmp_cast<c2d2plot_cp>(this,a_class)) {return p;}
18  return c2d2plot::cast(a_class);
19  }
20 public:
21  virtual plottable* copy() const {return new c2d2plot_cp(*this);}
22 public:
23  c2d2plot_cp(const histo::c2d& a_data)
24  :c2d2plot(m_cp)
25  ,m_cp(a_data)
26  {
27 #ifdef TOOLS_MEM
28  mem::increment(s_class().c_str());
29 #endif
30  }
31  virtual ~c2d2plot_cp(){
32 #ifdef TOOLS_MEM
33  mem::decrement(s_class().c_str());
34 #endif
35  }
36 public:
37  c2d2plot_cp(const c2d2plot_cp& a_from)
38  :plottable(a_from),points2D(a_from),c2d2plot(m_cp)
39  ,m_cp(a_from.m_cp)
40  {
41 #ifdef TOOLS_MEM
42  mem::increment(s_class().c_str());
43 #endif
44  }
46  c2d2plot::operator=(a_from);
47  m_cp = a_from.m_cp;
48  return *this;
49  }
50 protected:
52 };
53 
54 class c3d2plot_cp : public c3d2plot {
55 public:
57 public:
58  virtual void* cast(const std::string& a_class) const {
59  if(void* p = cmp_cast<c3d2plot_cp>(this,a_class)) {return p;}
60  return c3d2plot::cast(a_class);
61  }
62 public:
63  virtual plottable* copy() const {return new c3d2plot_cp(*this);}
64 public:
65  c3d2plot_cp(const histo::c3d& a_data)
66  :c3d2plot(m_cp)
67  ,m_cp(a_data)
68  {
69 #ifdef TOOLS_MEM
70  mem::increment(s_class().c_str());
71 #endif
72  }
73  virtual ~c3d2plot_cp(){
74 #ifdef TOOLS_MEM
75  mem::decrement(s_class().c_str());
76 #endif
77  }
78 public:
79  c3d2plot_cp(const c3d2plot_cp& a_from)
80  :plottable(a_from),points3D(a_from),c3d2plot(m_cp)
81  ,m_cp(a_from.m_cp)
82  {
83 #ifdef TOOLS_MEM
84  mem::increment(s_class().c_str());
85 #endif
86  }
88  c3d2plot::operator=(a_from);
89  m_cp = a_from.m_cp;
90  return *this;
91  }
92 protected:
94 };
95 
96 }}
97 
98 #endif
tools::sg::c3d2plot_cp::c3d2plot_cp
c3d2plot_cp(const c3d2plot_cp &a_from)
Definition: cloud2plot_cp:79
tools::sg::c3d2plot_cp
Definition: cloud2plot_cp:54
cloud2plot
tools::sg::plottable
Definition: plottable:15
tools::sg::c3d2plot_cp::~c3d2plot_cp
virtual ~c3d2plot_cp()
Definition: cloud2plot_cp:73
tools::sg::c3d2plot::operator=
c3d2plot & operator=(const c3d2plot &a_from)
Definition: cloud2plot:222
tools::histo::c2d
Definition: c2d:16
tools::sg::c2d2plot_cp::~c2d2plot_cp
virtual ~c2d2plot_cp()
Definition: cloud2plot_cp:31
TOOLS_SCLASS
#define TOOLS_SCLASS(a_name)
Definition: S_STRING:41
tools::sg::c2d2plot_cp::c2d2plot_cp
c2d2plot_cp(const c2d2plot_cp &a_from)
Definition: cloud2plot_cp:37
tools::sg::c3d2plot_cp::cast
virtual void * cast(const std::string &a_class) const
Definition: cloud2plot_cp:58
tools::sg::c3d2plot_cp::c3d2plot_cp
c3d2plot_cp(const histo::c3d &a_data)
Definition: cloud2plot_cp:65
tools::sg::c3d2plot_cp::m_cp
histo::c3d m_cp
Definition: cloud2plot_cp:93
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::sg::points3D::cast
virtual void * cast(const std::string &a_class) const
Definition: plottables:144
tools::sg::c2d2plot_cp::cast
virtual void * cast(const std::string &a_class) const
Definition: cloud2plot_cp:16
tools::sg::c3d2plot_cp::operator=
c3d2plot_cp & operator=(const c3d2plot_cp &a_from)
Definition: cloud2plot_cp:87
tools::sg::c2d2plot_cp
Definition: cloud2plot_cp:12
tools::sg::c2d2plot
Definition: cloud2plot:21
tools::sg::c2d2plot_cp::operator=
c2d2plot_cp & operator=(const c2d2plot_cp &a_from)
Definition: cloud2plot_cp:45
tools::histo::c3d
Definition: c3d:16
tools::sg::c2d2plot_cp::m_cp
histo::c2d m_cp
Definition: cloud2plot_cp:51
tools::sg::c2d2plot::operator=
c2d2plot & operator=(const c2d2plot &a_from)
Definition: cloud2plot:108
tools::sg::points2D::cast
virtual void * cast(const std::string &a_class) const
Definition: plottables:124
tools::sg::c2d2plot_cp::c2d2plot_cp
c2d2plot_cp(const histo::c2d &a_data)
Definition: cloud2plot_cp:23
tools::sg::points2D
Definition: plottables:120
tools::sg::c2d2plot_cp::copy
virtual plottable * copy() const
Definition: cloud2plot_cp:21
tools::sg::points3D
Definition: plottables:140
tools::sg::c3d2plot_cp::copy
virtual plottable * copy() const
Definition: cloud2plot_cp:63
tools::sg::c3d2plot
Definition: cloud2plot:126