[d2n-analysis-talk] Basic ROOT Question
Brad Sawatzky
brads at jlab.org
Tue Mar 2 12:24:56 EST 2010
On Tue, 02 Mar 2010, David Flay wrote:
> In order to get my TDC histograms into ns units, I would multiply the
> variable by 10^9:
>
> 1e+9*L.s2.lt_c[0], for instance.
>
> This works at the command line. However, it does <not> work if I do this
> in a macro:
>
> rootvar.Form("((1e+9)*L.s2.lt_c[%d]):L.s2.la_c[%d]",i,i);
These lines for me with no errors on the command-line and in a simple cint
macro.
analyzer [11] TString tmp
analyzer [12] tmp.Form("((1e+6))*L.s1.time[1]:L.s1.rt")
analyzer [13] tmp
(class TString)"((1e+6))*L.s1.time[1]:L.s1.rt"
analyzer [14] T->Draw(tmp)
[ plot appears as you would expect ]
Odds are it is a typo somewhere else and not the multiplication that is the
issue.
-- Brad
--
Brad Sawatzky, PhD <brads at jlab.org> -<>- Jefferson Lab / Hall C / C111
Ph: 757-269-5947 -<>- Pager: 757-584-5947 -<>- Fax: 757-269-7848
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov
More information about the d2n-analysis-talk
mailing list