Re: TString problem

From: Omar Andrés Zapata Mesa <andresete.chaos_at_gmail.com>
Date: Fri, 19 Nov 2010 12:47:21 -0500


Hi Yaxian.
the error is that the operator () returns a TSubString and the interpreter has trouble to allocate in a TString array, the solution is Copy, because create a new reference to TString outside of TString array.

root [0] TString fileArray[6000] ;
root [1]
fileArray[0]="alien:///alice/data/2010/LHC10d/000126432/ESDs/pass2/AOD018/0099/AliAOD.root" (class
TString)"alien:///alice/data/2010/LHC10d/000126432/ESDs/pass2/AOD018/0099/AliAOD.root" root [2] fileArray[0].Copy()(44,6)
(class TString)"Ds/pas"

Best regards,

Omar Andres Zapata Mesa
Head Developer Phenomenology of Fundamental Interactions Group (Gfif) http://gfif.udea.edu.co
Division of computer science Gfif Developers (Gfif Dev) http://gfifdev.udea.edu.co
Systems Engineering Student
Universidad de Antioquia At Medellin - Colombia Usuario Linux #490962

2010/11/19 <maoyx_at_iopp.ccnu.edu.cn>

> Dear Rooters,
> I have a problem with TString, the command worked before with the
> following lines when I tried to make a new string with part of long
> string s2=s(a, b), but now the same lines did not work anymore, did
> somebody know what is the problem and how could I solve it? Thanks very
> much for your help!
>
> Yaxian
>
>
> pb-d-128-141-48-247:corr ymao$ root -l
> ##]root [0TString run ;
> root [1] TString fileArray[6000] ;
> root [2]
>
> fileArray[0]="alien:///alice/data/2010/LHC10d/000126432/ESDs/pass2/AOD018/0099/AliAOD.root"
> (class
>
> TString)"alien:///alice/data/2010/LHC10d/000126432/ESDs/pass2/AOD018/0099/AliAOD.root"
> root [3] fileArray[0].First("AOD")
> (const Ssiz_t)44
> root [4] fileArray[0](44,6)
> Error: Can not access pointer to function 0x1018a7808 from interpreter(2)
> FILE:(tmpfile) LINE:1
> root [5]
>
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
Received on Fri Nov 19 2010 - 18:47:48 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 19 2010 - 23:50:02 CET