_ROOT Version: 6.14/06cosmictree.h (108.8 KB)
create-class.C (343 Bytes)
_Platform: Linux, ubuntu 16.04
I used MakeClass before but now I would like to look inside a root file and I created “cosmictree.h” and “cosmictree.C” using makeClass (cosmictree.h is here attached with the create-class.C root macro, sorry I did not attach cosmictree.C as I am allowed for two attachment only as new user). When trying too link “cosmictree.C” in root using “.L cosmictree.C” it gives duplicate definition errors like: (is like the root file is created with name spaces having same name of variables in different name spaces)
.L cosmictree.C
/home/ayad/research/belle2/analysis/cosmic/vxdcosmicfall2018/useroot/cosmictree.h:26:27: error: duplicate member ‘kMaxm_elements’
static constexpr Int_t kMaxm_elements = 1;
^
/home/ayad/research/belle2/analysis/cosmic/vxdcosmicfall2018/useroot/cosmictree.h:25:27: note: previous declaration is here
static constexpr Int_t kMaxm_elements = 1;
^
/home/ayad/research/belle2/analysis/cosmic/vxdcosmicfall2018/useroot/cosmictree.h:27:27: error: duplicate member ‘kMaxm_elements’
static constexpr Int_t kMaxm_elements = 1;
^
/home/ayad/research/belle2/analysis/cosmic/vxdcosmicfall2018/useroot/cosmictree.h:25:27: note: previous declaration is here
static constexpr Int_t kMaxm_elements = 1;
^
/home/ayad/research/belle2/analysis/cosmic/vxdcosmicfall2018/useroot/cosmictree.h:28:27: error: duplicate member ‘kMaxm_elements’
static constexpr Int_t kMaxm_elements = 1;
Thank you, Rachid