AW: guidance for using TTreeSQL ?

From: Kathrin Stoerig <Kathrin.Stoerig_at_cern.ch>
Date: Tue, 1 Mar 2011 10:33:07 +0100


Hi Philippe,

this is exactly what I did.
I downloaded and build v5-28-00a and svn said it is revision 38246.

Cheers,

   Kathrin

-----Ursprüngliche Nachricht-----
Von: Philippe Canal [mailto:pcanal_at_fnal.gov] Gesendet: Montag, 28. Februar 2011 20:16 An: Kathrin Stoerig
Cc: Rob Mahurin; roottalk_at_cern.ch
Betreff: Re: [ROOT] guidance for using TTreeSQL ?

Hi Kathrin,

 > but also with the new version

Which version are you using? You need to have downloaded and build the trunk.
Which revision of the trunk, did you use (You need revision 38233 or higher).

Cheers,
Philippe.

On 2/28/11 10:50 AM, Kathrin Stoerig wrote:
> Hello,
>
> I have a similar problem, but also with the new version, it still does not
work for me.
> What I did is:
>
> TSQLServer* serv =TSQLServer::Connect( ..)
> TTreeSQL* mytree=new TTreeSQL(serv,"gmc1", "waveform")
>
> and I still get errors like:
> Error in<TTreeSQL::GetColumnIndice>: Error finding column 0 (for any
variable)
> Maybe I did something wrong?
>
> My database is ok, I can even browse it as indicated under
http://root.cern.ch/root/html528/TSQLStatement.html # 3. Read.
> Even TTree::MakeClass figures out the correct types of the leafes, but
every attempt to read an entry ends in
> Error in <TTreeSQL::Show()>: Cannot read entry 0 (I/O error)
>
> Any ideas / hints are very welcome..
>
> Cheers,
> Kathrin
>
>
> On 02/25/2011 09:27 PM, Philippe Canal wrote:
>> Hi,
>>
>> Thanks for reporting this problem. It is fixed by revision 38233 of the
trunk.
>>
>> Cheers,
>> Philippe.
>>
>> On 2/25/11 2:02 PM, Rob Mahurin wrote:
>>> On Thu, Feb 24, 2011 at 01:05:17PM -0600, Philippe Canal wrote:
>>>> Both problems were unexpected and have now been fixed in the trunk
>>>> and in the v5.28 patch branch.
>>>>
>>>> The temporary table issue is due to the fact that mysql does not
>>>> give access a list of those table the easy way (i.e. show table does
>>>> not show them). The GetColumnIndice was an unfortunate oversight
>>>> when reading table that has not been created by TTreeSQL.
>>> Thank you Philippe!
>>>
>>> I seem to still be unable to get text data from temporary tables:
>>>
>>> root[] TSQLStatement* stmt = serv->Statement(
>>> "create temporary table temp as "
>>> "select 42 as number, 'something' as text")
>>> root[] stmt->Process()
>>> (Bool_t)1
>>> root[] TTreeSQL t(serv, "test", "temp")
>>> root[] t.Print()
>>>



>>> *Tree :temp : Database read from table: temp
*
>>> *Entries : 1 : Total = 1445 bytes File Size =
0 *
>>> * : : Tree compression factor = 1.00
*
>>>


>>> *Br 0 :number : number/I

*
>>> *Entries : 1 : Total Size= 573 bytes One basket in
memory *
>>> *Baskets : 0 : Basket Size= 32000 bytes Compression=
1.00 *
>>>
*........................................................................*

>>> *Br 1 :text : text[9]/C
*
>>> *Entries : 1 : Total Size= 567 bytes One basket in
memory *
>>> *Baskets : 0 : Basket Size= 32000 bytes Compression=
1.00 *
>>>
*........................................................................*

>>> root[] t.Scan()
>>> ************************************
>>> * Row * number * text *
>>> ************************************
>>> * 0 * 42 * *
>>> ************************************
>>> (Long64_t)1
>>>
>>> Thanks,
>>> Rob
>>>
>>
Received on Tue Mar 01 2011 - 10:33:30 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 01 2011 - 23:50:01 CET