jelmew
March 23, 2015, 9:24am
1
Hi all,
Using root 5.34/22.
Using the following example, I try to draw an arrow using “<”, “<----” or “<|–”, etc.
However, the point “<” is not drawn.
The following attached files demonstrate the problem, They can just be pasted into a directory. It just draws an line without the arrow.
Does anybody have an idea why this does not work? I asked some other people in my group, but they did not manage to get the arrow to draw either.
Greetings,
Jelmer
test.C (3.06 KB)
single_v1j.root (4.42 KB)
couet
March 23, 2015, 9:51am
2
Your script does not work:
/Users/couet/Downloads/test.C:20:18: error: called object type 'TVectorF *' (aka
'TVectorT<Float_t> *') is not a function or function pointer
int number= pmin(0);
~~~~^
/Users/couet/Downloads/test.C:21:20: error: called object type 'TVectorF *' (aka
'TVectorT<Float_t> *') is not a function or function pointer
float pval = pmin(1);
jelmew
March 23, 2015, 10:00am
3
couet:
Your script does not work:
/Users/couet/Downloads/test.C:20:18: error: called object type 'TVectorF *' (aka
'TVectorT<Float_t> *') is not a function or function pointer
int number= pmin(0);
~~~~^
/Users/couet/Downloads/test.C:21:20: error: called object type 'TVectorF *' (aka
'TVectorT<Float_t> *') is not a function or function pointer
float pval = pmin(1);
It does work perfectly fine for me in any directory and I don’t see any problems with the code. Did it open the root file correctly for you?
root [0]
Processing test.C...
hootgte: 266.4
jelmer@jelmer-N56JN:~/Downloads$
couet
March 23, 2015, 10:06am
4
I am using root 6 which use a real C++ interpreter. I will modify your macro to make it work.
couet
March 23, 2015, 10:11am
5
Ok, cleaning your macro I see you do:
ar_1class.Draw("same");
Why option same ?
the TArrow option are listed here :
root.cern.ch/root/html/TArrow.h … w:TArrow@1
SAME does not exist.
jelmew
March 23, 2015, 11:58am
6
1st of all. Thanks, removing same makes it an arrow.
2nd. Thanks for fixing my stupid mistake, I incorrectly assumed that arrow would need same to draw on the same canvas.
3rd. Thanks.
couet
March 23, 2015, 12:01pm
7
You’re welcome,
Coming back to your macro, you should really write real C++.
you should write:
int number= pmin[0];