[d2n-analysis-talk] BB TDC cuts
Brad Sawatzky
brads at jlab.org
Wed May 26 10:15:05 EDT 2010
On Sat, 22 May 2010, posik at jlab.org wrote:
> So I think I finally got the BB cer multihit TDCs working right. I just
> use TString cuts for all hits in the TDC. For example the beam line side
> has 6 hits, so I do something like
>
> TString tdc1_1 =
> "DL.BBcerT01[Ndata.DL.BBcerT01-1]>xx&&DL.BBcerT01[Ndata.DL.BBcerT01-1]<xx"
What happens when Ndata.DL.BBcerTxx==0? Will it attempt to index with
'-1' or do you watch for that condition prior to invoking this cut?
> Where this is the cut for TDC 1 and the first hit. the xx are just hi
> and low channels that I cut on. This is done for all hits, and all
> TDCs on both the beam line and rhrs side.
>
> I am able to have cut on all beam line TDCs and RHRS side TDCs.
> However in the final TDC cut we want
>
> TString bb_tdc = "beamline_tdc || rhrs_tdc"
>
> Where beamline_tdc has cuts for all hits of all the TDCs on the
> beamline side and the rhrs has cuts for all hits of all the TDCs on
> the rhrs side. But when I try to make this cut I get an error saying
> that there are too many operators. I looked over the code and every
> thing looks fine.
>
> So I converted every thing to TCut rather than TString, thinking maybe
> it was some sort of memeroy thing with ROOT and TString. I now get the
> following error from ROOT when I try to apply the bb_tdc cut:
Your TString would have to exceed many 100MB of memory before there
would be a problem. (That can happen, but typically only if there is an
infinite recursion on building the string.)
> Limitation: Statement too long tdc_test_2.C:166:
> cint: Security mode 0x7:0x2 *** Fatal error in interpreter... restarting
> interpreter ***
> I was wondering if you had ever come across such an error?
That's a new one to me... Odds are that you're missing a parenthesis
or something and the interpreter is trying to suck the rest of the
script into the cut.
When I have run into problems with complicated/long cuts, I have usually
solved the problem by building the cut step by step and verifying that
it works at each stage. For really long cuts, I do the "divide and
conquer" thing -- split the full cut in two and test one half. If that
works then the error is in the other half. Take the bad half, split
it in two, and test each piece. Eventually you'll find the bug.
-- Brad
--
Brad Sawatzky, PhD <brads at jlab.org> -<>- Jefferson Lab / Hall C / C111
Ph: 757-269-5947 -<>- Fax: 757-269-5235 -<>- Pager: brads-page at jlab.org
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