Dear Sir,
Many Thanks for looking at my query.
Attached is my test program. If you have any issues in viewing / downloading the attachment, do let me know. I will send as part message body.
Below is list of root5.16.00 libraries with which this program is linked. # ldd ./parserroottestD
libCore.so => /home/gborse/pxm/root/lib/libCore.so (0xb6fc5000) libCint.so => /home/gborse/pxm/root/lib/libCint.so (0xb6a93000) libRIO.so => /home/gborse/pxm/root/lib/libRIO.so (0xb698f000) libNet.so => /home/gborse/pxm/root/lib/libNet.so (0xb68af000) libHist.so => /home/gborse/pxm/root/lib/libHist.so (0xb666f000) libGraf.so => /home/gborse/pxm/root/lib/libGraf.so (0xb648a000) libGraf3d.so => /home/gborse/pxm/root/lib/libGraf3d.so (0xb63a5000) libGpad.so => /home/gborse/pxm/root/lib/libGpad.so (0xb62f5000) libTree.so => /home/gborse/pxm/root/lib/libTree.so (0xb6179000) libRint.so => /home/gborse/pxm/root/lib/libRint.so (0xb6150000) libPostscript.so => /home/gborse/pxm/root/lib/libPostscript.so (0xb610e000) libMatrix.so => /home/gborse/pxm/root/lib/libMatrix.so (0xb5f1c000) libPhysics.so => /home/gborse/pxm/root/lib/libPhysics.so (0xb5ea1000) libNormAna.so => /home/gborse/pxm/root/lib/libNormAna.so (0xb5e88000) libHallA.so => /home/gborse/pxm/root/lib/libHallA.so (0xb5b60000) libscaler.so => /home/gborse/pxm/root/lib/libscaler.so (0xb5b15000) libdc.so => /home/gborse/pxm/root/lib/libdc.so (0xb5ace000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb5abe000) libdl.so.2 => /lib/libdl.so.2 (0xb5abb000) librt.so.1 => /lib/tls/librt.so.1 (0xb5aa7000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb59ed000) libm.so.6 => /lib/tls/libm.so.6 (0xb59cb000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb59c1000) libc.so.6 => /lib/tls/libc.so.6 (0xb5889000) libpcre.so.0 => /lib/libpcre.so.0 (0xb587f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb5852000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb5802000) libz.so.1 => /usr/lib/libz.so.1 (0xb57f4000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)
Thanks and Regards,
Ganesh
-----Original Message-----
From: Rene Brun [mailto:Rene.Brun_at_cern.ch]
Sent: 29 November 2007 16:26
To: Borse, Ganesh
Cc: 'roottalk_at_lxbuild091.cern.ch'
Subject: Re: [ROOT] How to define the expression to check if a big char string contai ns small char string
The error message indicates that you are not giving the right number of arguments to strstr. We cannot make progress without looking at your code.
Rene Brun
Borse, Ganesh wrote:
>
> Hi,
>
> I am trying to "Define" an expression to check whether a long char
> string contains another small char string.
> For this, I am using strstr() library function in C++.
>
> Expression is like this:
> THaVarList * gHaVars = new THaVarList();
> THaCutList * gHaCuts = new THaCutList(gHaVars);
> const char* listClients="ABCD,EFGH,HIJK,NEWONE,JUNK,DONE";
> const char* ordClient = "DONE";
> gHaVars->Define("listClients",listClients);
> gHaVars->Define("ordClient",ordClient);
> gHaCuts->Define("Expr","((size < 1000) && (vol < (0.001 * ADV)) &&
> (prod == value) && strstr(listClients,ordClient) )");
>
> Program compiles fine, but when I run this program, the Define()
> function call fails with an error message:
> Error in <THaCut::Compile>: strstr requires 2 string arguments Error
> in <THaCutList::Define>: expression error, cut not created: Expr
> ((size < 1000) && (vol < (0.001 * ADV)) && (prod == value) &&
> strstr((listClients),(ordClient)) ) block: Default
>
> I have given the correct number & type of input parameters to strstr,
> but then why is the "::Compile" still failing?
> How can we achieve this type of checks?
>
> Please help.
>
> Thanks and Regards,
> Ganesh
>
> ======================================================================
> ======== Please access the attached hyperlink for an important
> electronic communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ======================================================================
> ========
>
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
This archive was generated by hypermail 2.2.0 : Fri Nov 30 2007 - 05:50:02 CET