Hello Jacek, Sorry for long silence. TString::kExact is the right way to access kExact. All other ways are false. So please use TString::kExact. Thank you Masaharu Goto >Date: 09 Apr 2002 16:00:04 +0200 >From: Fons Rademakers <Fons.Rademakers@cern.ch> >To: Masaharu Goto <MXJ02154@nifty.ne.jp> >Subject: [Fwd: [ROOT] Re: TString & Co.] > >Hi Masa, > > can you check the bottom of this mail concerning kExact, etc. > >Cheers, Fons. > > > >-- >Org: CERN, European Laboratory for Particle Physics. >Mail: 1211 Geneve 23, Switzerland >E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 >WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480 > >----------------------------------------------------------------------------- - -- >Date: Tue, 9 Apr 2002 13:16:02 +0200 (MET DST) >From: "Jacek M. Holeczek" <holeczek@us.edu.pl> >To: RootTalk <roottalk@pcroot.cern.ch> >Subject: [ROOT] Re: TString & Co. > >Hi, >Thanks for your help, > >> (...) >> nVac250SM->Process(selector, s + " Vac250SM"); > >I have also tried this previously ... but it didn't work. Then I got it >working with the screwy s.Copy().Append(" Vac250SM").Data() sequence. >Now, encouraged by your mail, I return to this and I have found that the >following works (the "Data()" is unavoidable) : > nVac250SM->Process(selector, (s + " Vac250SM").Data()); > >> (...) >> istringstream source(input.Data()); // there is no "const char*" ctor > >The "istringstream" is unknown to my compiler ... >After some trials I got it working : > #include "strstream" > void z1aSelector::Begin(TTree *tree) > { > // ... something is done here and then ... > Int_t MyNuAlphaIs; > TString MyNameIs; > istrstream options(GetOption()); > options >> MyNuAlphaIs >> MyNameIs; > // ... again something is done here ... > } > >> (...) >> Concerning TString::Strip(), it returns a TSubString, which is only a >> range limitation of the original TString, it does not physically modify > >As I expected ... I didn't know how to use "Strip" ... > >> (...) >> and this brings us to the last remark, the TString enums are known to >> CINT but you need to specify the full scope: TString::kBoth, idem for >> TString::kExact, etc. > >My fault ... >I tried "kExact", "ECaseCompare::kExact" and "TString::ECaseCompare::kExact", >but none of them worked ... . I didn't try "TString::kExact" ... >Now, this is funny ... : >------------------------ >root [0] kExact >Error: Symbol kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [1] ECaseCompare::kExact >Error: class,struct,union or type ECaseCompare not defined ... >Error: class,struct,union or type ECaseCompare not defined ... >Error: Symbol ECaseCompare::kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [2] TString::ECaseCompare::kExact // IT DOES NOT KNOW IT !!! >Error: class,struct,union or type ECaseCompare not defined ... >Error: class,struct,union or type ECaseCompare not defined ... >Error: Symbol TString::ECaseCompare::kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [3] TString::kExact >(const enum TString::ECaseCompare)0 >root [4] TString::ECaseCompare::kExact // NOW IT SUDDENLY KNOWS IT !!! >(const enum TString::ECaseCompare)0 >------------------------ >or even more funny ... : >------------------------ >root [0] kExact >Error: Symbol kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [1] EStripType::kExact // EStripType ??? SHOULD BE ECaseCompare >Error: class,struct,union or type EStripType not defined ... >Error: class,struct,union or type EStripType not defined ... >Error: Symbol EStripType::kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [2] TString::EStripType::kExact // EStripType ??? SHOULD BE ECaseCompare >Error: class,struct,union or type EStripType not defined ... >Error: class,struct,union or type EStripType not defined ... >Error: Symbol TString::EStripType::kExact is not defined in current scope ... >*** Interpreter error recovered *** >root [3] TString::kExact >(const enum TString::ECaseCompare)0 >root [4] TString::EStripType::kExact // EStripType ??? SHOULD BE ECaseCompare >(const enum TString::ECaseCompare)0 >------------------------ > >Best regards, >Jacek. >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET