Re: "manual" schema evolution

From: Chiara Zampolli <Chiara.Zampolli_at_bo.infn.it>
Date: Fri, 13 Nov 2009 12:31:56 +0100


Hi Philippe,

Philippe Canal ha scritto:
> Hi Chiara,
>
> > target="fITSindices:fnMaxITScluster"
>
> This actually should a semi colon (;) delimited list.
>

Yes, it is a semicolon, sorry, I corrected it after sending you the mail, but anyway nothing changed..

> In general you should only have one rule for each target. i.e. either
> fnMaxITScluster is listed in its own rule
> or it is listed in the combined rule but not both. In you case, I
> would just use the combined rule.

Ok, I'll try like you say.

>
> If you list a variable in the target, you should set it to some value
> in the code.
>

I only use the variables in the rule itself. I'll try with the combined rule, and see what happens.

> > Moreover, I see no track of my rules inthe LinkDef file, so I guess
> there's something not working as it should...
>
> I assume you mean the dictionary;

sure... :-)

> The dictionary file should indeed contain a complete transcript (and
> more)
> of the code in your rules. I do not see anything obviously wrong in
> your code (except possibly the targetType
> which is not yet implemented/used).

Should I remove it?

> If your code does not appear in the dictionary, please send me a running
> example so that I can figure out whats wrong.
>

I'll make the changes and see if something happens. I'll let you know.

    Many thanks,

    Chiara

> Cheers,
> Philippe.
>
>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Subject:
>> [ROOT] "manual" schema evolution
>> From:
>> Chiara Zampolli <Chiara.Zampolli_at_bo.infn.it>
>> Date:
>> Thu, 12 Nov 2009 11:16:28 +0100
>> To:
>> roottalk <roottalk_at_lxbuild091.cern.ch>
>>
>> To:
>> roottalk <roottalk_at_lxbuild091.cern.ch>
>>
>>
>> Hello all,
>>
>> Following the slides showed By Philippe at last CHEP
>> (http://indicobeta.cern.ch/getFile.py/access?contribId=210&sessionId=59&resId=3&materialId=slides&confId=35523),
>> I'm trying to define my own rules to allow some schema evolution. I'm
>> attching the headers file of the old version of the class
>> (AliESDfriendTrack.h.Orig), and of the new one (AliESDfriendTrack.h),
>> and the LinkDef file (ESDLinkDef.h) where I define the rules. The
>> changes in the class affects some arrays of integeres that now I
>> would like to have as pointes. So:
>>
>> old header file: ----> new
>> header file:
>>
>> ---------------------------------------------------------------------------------------------------------
>>
>> Int_t fITSindex[kMaxITScluster]; ----> Int_t fnMaxITScluster;
>> Int_t* fITSindices; //fnMaxITScluster
>> Int_t fTPCindex[kMaxTPCcluster]; ----> Int_t fnMaxITScluster;
>> Int_t* fITSindices; //fnMaxITScluster
>> Int_t fTRDindex[kMaxTRDcluster]; ----> Int_t fnMaxITScluster;
>> Int_t* fITSindices; //fnMaxITScluster
>>
>>
>> In total, I have defined six rules. In the first three:
>>
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="" version="[-3]" target="fnMaxITScluster" targetType="Int_t"\
>> code="{fnMaxITScluster = 12;}"
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="" version="[-3]" target="fnMaxTPCcluster" targetType="Int_t"\
>> code="{fnMaxTPCcluster = 160;}"
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="" version="[-3]" target="fnMaxTRDcluster" targetType="Int_t"\
>> code="{fnMaxTRDcluster = 180;}"
>>
>>
>> I use hardwired numbers, but I think I could use the
>> kMaxITS/TPC/TRDcluster variables, but I'm not sure...
>> In the last three:
>>
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="Int_t fITSindex" version="[-3]" target="fITSindices:
>> fnMaxITScluster" targetType="Int_t*; Int_t"\
>> code="{fITSindices = new Int_t[fnMaxITScluster]; for (Int_t i=0; i<
>> fnMaxITScluster; i++){fITSindices[i] = onfile.fITSindex[i];}}"
>> //memcpy(fITSindices,
>> &(onfile.fITSindex),fnMaxITScluster*sizeof(Int_t); }"
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="Int_t fTPCindex" version="[-3]" target="fTPCindices;
>> fnMaxTPCcluster" targetType="Int_t*; Int_t"\
>> code="{fTPCindices = new Int_t[fnMaxTPCcluster]; memcpy(fTPCindices,
>> &(onfile.fTPCindex),fnMaxTPCcluster*sizeof(Int_t); }"
>> #pragma read sourceClass="AliESDfriendTrack"
>> targetClass="AliESDfriendTrack" \
>> source="Int_t fTRDindex" version="[-3]" target="fTRDindices;
>> fnMaxTRDcluster" targetType="Int_t*; Int_t"\
>> code="{fTRDindices = new Int_t[fnMaxTRDcluster]; memcpy(fTRDindices,
>> &(onfile.fTRDindex),fnMaxTRDcluster*sizeof(Int_t); }"
>>
>>
>> I've put two targets, since I use two variables of the new
>> implementation of the class, but I'm not sure that the definition of
>> their type is then done correctly in the way I do. And, anyway, when
>> I try to read an old object, the old content is not copied in the new
>> variables - just the inizialization values (-2, see .cxx files) are
>> "read". Moreover, I see no track of my rules inthe LinkDef file, so I
>> guess there's something not working as it should...
>>
>> Do you have any idea what I'm doing wrong?
>>
>> Thanks for your help, and cheers,
>>
>> Chiara
>>
>
Received on Fri Nov 13 2009 - 12:32:08 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 13 2009 - 17:50:03 CET