Re: cuts

From: Tim Welters (welters@physik.rwth-aachen.de)
Date: Tue Jan 25 2000 - 09:16:20 MET


Maurizio Ungaro wrote:
> 
> Hi all,
> A question that may interest :
> I have many cuts to apply to data,
> let's say from a1 to an.
> I want to use a variable number of them every
> time, so I thought that something like:
> 
> // Initializing:
> 
> Tcut a1 = "";
> Tcut a2 = "";
> .
> .
> Tcut an = "";
> 
> all = a1 && a2 && ... && an;
> 
> and then every time setting the aj on,
> like
> 
> a1 = "W>2";
> all = a1 && a2 && ... && an;
> 
> But it it's not working, message "empty string".
> 
> Someone can help me?
> Thanks

Hello Maurizio,

Due to the overloaded operator&&, the statement 

  all = a1 && a2 && ... && an

leads simply to a string consisting of the concatenation of strings "a1".."an".
Exactly: the concatenation of their contents in the moment this statement is executed.
Cint or what else does not know the relation between "a1",...,"an" and "all".
If you change some of the ai you have to update all, means: do a
 "all = a1 && a2 && ... && an"
again.

Tim

------------------------------------------------------------------------
Tim Welters, III.Physikalisches Institut at the RWTH Aachen, Lehrstuhl B 
Room: H.116         Tel.: +49(241)80-6355          Fax: +49(241)8888-244
Postal Address:   Physikzentrum, RWTH Aachen, D-52056 Aachen
e-mail: welters@physik.rwth-aachen.de      or        Tim.Welters@cern.ch
------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET