[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

root4gca status




Hi All,

Here is the note I sent to Doug & Dave about getting a
gca-user code into root.

thanks, Jeff


"R. Jefferson Porter" wrote:
> 
> Hi Doug & David,
> 
> Once I found that my root problem was due to CINT not being
> thread-safe & successfully made some tests with QO in root,
> I went ahead and developed a GCA-root prototype.  To do this I
> needed to begin the "clean-up" of the various codes & makefile
> that David M. & I had built up over the past few months.  The
> results can be found in:
> 
> /star/u2c/porter/test_GCA/GCA
> 
> There's more cleaning to be done, but it's a start. I'll leave this
> directory as is for now as it reflect what could exist in a CVS
> repository.
> Just copy it over & build via instructions in the README file.
> 
> About the Makefiles:
> 
> - For simplicity I used the makefile setup that I had for the QO module
> It is completely different from the one David has been using.
> - I use a copy of the GCA "common" area as it now exist in CVS
> - I chose to separate "generated" source code from edited ones. Thus
> when you "make" you'll create "orb" &/or "dict" subdirectories for
> handling the idl-generated & rootcint-generated codes.
> - libraries & binaries (root4gca) are in lib & bin; This'll need to be
> changed to say, ".arch/lib" & ".arch/bin".
> 
> About the Prototype:
> 
> What I did here was to take much of the work that David M had done
> with gcaResources, tagdbResources, & Usercode, & piece it together
> as a gca-root-user code.  I think that David & I can iterate on this to
> develop the full functionality that we'll want to have available.
> The root wrapper class is defined in Root/include/QueryBuilder.h
> Note that this header file defines the "root-cint dictionary" and needs
> to be vanilla C++;  i.e. no CORBA, Objy, Templates, ... These extras
> we can use in the 'body' of the QueryBuilder.C code, just not in the
> class definition.  The actual analysis run is done in a global function,
> 
> RunGCAEventLoop & here one calls the global function "usercode".
> 
> The prototype does use Objectivity; though only at the level of
> transaction handling & getting OID components from an ooRef.
> That's simply because the Federation I'm using to test this with
> only exists now as a boot-file + catalog&schema.  David Zimmerman
> has said he'll try to copy over a small test federation so I can test
> navigating the OID.
> 
> Below is a screen dump of a test I ran.  Note here that an old
> hard-coded test query is applied at the beginning. It is not understood
> in this Index/Federation & the exceptions thrown are handled correctly
> ... a good thing.
> 
> Thanks, Jeff
> 
> %%%%%%%%%% Sample Test %%%%%%%%%%%%%%
> 
> [rmds03] ~/test_GCA/GCA/bin > root4gca
>   *******************************************
>   *                                         *
>   *        W E L C O M E  to  R O O T       *
>   *                                         *
>   *   Version   2.00/13  13 November 1998   *
>   *                                         *
>   *  You are welcome to visit our Web site  *
>   *          http://root.cern.ch            *
>   *                                         *
>   *******************************************
> 
> CINT/ROOT C/C++ Interpreter version 5.13.79, Oct 30 1998
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> 
> Welcome to the ROOT tutorials
> 
> Type ".x STAR_Demos.C" to get a toolbar from which to execute the STAR
> demos
> 
> Type ".x demos.C" to get a toolbar from which to execute the demos
> 
> Type ".x demoshelp.C" to see the help window
> 
> root [0] QueryBuilder* QB=new
> QueryBuilder("/grandch/u/GCA/tmp/gc.config.alt");
> gcaResources:  Attempting to read configFile
> /grandch/u/GCA/tmp/gc.config.alt
> Using configuration file "/grandch/u/GCA/tmp/gc.config.alt".
> the QE file is /grandch/u/GCA/tmp/SM_QE_hn.ref
> QueryFactory has made contact with Query Estimator
> You are connected to a Query Factory.
> returning from findObjViaStringFile...
> A Query Monitor is available to your OrderOptIterator.
> root [1] QB->gca_query();
>   Initial query will be 600<num_Pion_p<602
> will register query with estimator
> retrieved my token = 368be963-3075ec
> set the predicate clause
> New query token: 368be963-3075ec
> Doing quick estimate
> qo:: QueryEstimator exception: dataSetInfo::name2id() could not find
> property "num_Pion_p" (searched 57 properties)
> Quick estimate is between 0 and 0 events.
> Doing full estimate...
> qo:: QueryEstimator exception: qe::scanProperty("num_Pion_p") failed to
> open file "/star/sol/db/Index/StarIndex/p_num_Pion_p.bin"
> Full estimate is 0 events in 0 files.
> Would you like to proceed with this query (y or n)?  n
> qo:: query done
>  qoF:: Released the query named = /var/tmp/caa008z9h
> Would you like to build a predicate query (y or n)?  y
> 
>         Attributes available to predicate queries are:
> 
>         n_event0        n_event1        prod_run        glb_trk_tot
>         glb_trk_good    glb_trk_prim    glb_trk_plus    glb_trk_minus
>         n_vert_total    n_vert_V0       n_vert_K0       n_vert_Lambda
>         n_vert_ALambda  n_vert_pileup   mult_eta0       mult_eta1
>         mult_eta2       mult_eta3       mult_eta4       mult_pt0
>         mult_pt1        mult_pt2        mult_pt3        mult_pt4
>         mult_phi0       mult_phi1       mult_phi2       mult_phi3
>         mult_phi4       mean_pt         mean_eta        T_average
>         T_eta_bins0     T_eta_bins1     T_eta_bins2     energy_emc_eta0
>         energy_emc_eta1 energy_emc_eta2 energy_emc_eta3 energy_emc_eta4
>         energy_emc_phi0 energy_emc_phi1 energy_emc_phi2 energy_emc_phi3
>         energy_emc_phi4 prim_vrtx0      prim_vrtx1      prim_vrtx2
>         prim_vrtx_chisq tagrand         nTags           EventID.dbaseID
>         EventID.contID  EventID.pageID  EventID.slotID  Set
>         file_ID
> 
> Enter your query:  mean_pt<0.12543
> will register query with estimator
> retrieved my token = 368be97c-41a207
> set the predicate clause
> New query token: 368be97c-41a207
> Doing quick estimate
> Quick estimate is between 1 and 7669 events.
> Doing full estimate...
> Full estimate is 2 events in 1 files.
> Would you like to proceed with this query (y or n)?  y
>  return value from query->execute() is TRUE
> Number of events:  2
> Number of files:   1
> DEBUG OOI:  requesting sublist 1 QM says QM_EI_REGISTERED
> DEBUG OOI:  requesting sublist 2 QM says QM_NO_MORE_FILES
> DEBUG OOI:  retrieving sublist 1 QM says QM_FILE_DELIVERED
> DEBUG OOI:  sublist 1 fileId is 3 ObjRef count is 2
>  OID retrieved:
>   Database  = 3
>   Container = 2
>   Page      = 204
>   Slot      = 209
>  OID retrieved:
>   Database  = 3
>   Container = 2
>   Page      = 510
>   Slot      = 255
> DEBUG OOI:  releasing 3
> DEBUG OOI:  no more data after retrieving 1 files and 2 object
> references
> 
> OOI:  **************** Iterator Statistics ****************
> OOI:
> OOI:  1 files and 2 object references in 0.152096 seconds.
> OOI:
> OOI:  Time includes sleep() padding of 0 seconds.
> OOI:
> OOI:       Elapsed times in seconds for CORBA calls:
> OOI:    method        min         max         mean       stddev
> sample_size
> OOI:   request()   0.00426495  0.132358  0.0683115  0.0905754      2
> OOI:   retrieve()  0.00761902  0.00761902  0.00761902  0      1
> OOI:   release()   0.00399399  0.00399399  0.00399399  0      1
> OOI:
> OOI:  Total time spent in CORBA calls was 0.148236 seconds.
> OOI:
> OOI:  *****************************************************
> 
>  qoF:: Released the query named = /var/tmp/daa0FFwcK
> Would you like to build a predicate query (y or n)?  n
> root [2] .q
> 
> This is the end of ROOT -- Goodbye

-- BEGIN included message

Hi Doug & David,

Once I found that my root problem was due to CINT not being
thread-safe & successfully made some tests with QO in root,
I went ahead and developed a GCA-root prototype.  To do this I
needed to begin the "clean-up" of the various codes & makefile
that David M. & I had built up over the past few months.  The
results can be found in:

/star/u2c/porter/test_GCA/GCA

There's more cleaning to be done, but it's a start. I'll leave this
directory as is for now as it reflect what could exist in a CVS
repository.
Just copy it over & build via instructions in the README file.

About the Makefiles:

- For simplicity I used the makefile setup that I had for the QO module
It is completely different from the one David has been using.
- I use a copy of the GCA "common" area as it now exist in CVS
- I chose to separate "generated" source code from edited ones. Thus
when you "make" you'll create "orb" &/or "dict" subdirectories for
handling the idl-generated & rootcint-generated codes.
- libraries & binaries (root4gca) are in lib & bin; This'll need to be
changed to say, ".arch/lib" & ".arch/bin".

About the Prototype:

What I did here was to take much of the work that David M had done
with gcaResources, tagdbResources, & Usercode, & piece it together
as a gca-root-user code.  I think that David & I can iterate on this to
develop the full functionality that we'll want to have available.
The root wrapper class is defined in Root/include/QueryBuilder.h
Note that this header file defines the "root-cint dictionary" and needs
to be vanilla C++;  i.e. no CORBA, Objy, Templates, ... These extras
we can use in the 'body' of the QueryBuilder.C code, just not in the
class definition.  The actual analysis run is done in a global function,

RunGCAEventLoop & here one calls the global function "usercode".

The prototype does use Objectivity; though only at the level of
transaction handling & getting OID components from an ooRef.
That's simply because the Federation I'm using to test this with
only exists now as a boot-file + catalog&schema.  David Zimmerman
has said he'll try to copy over a small test federation so I can test
navigating the OID.

Below is a screen dump of a test I ran.  Note here that an old
hard-coded test query is applied at the beginning. It is not understood
in this Index/Federation & the exceptions thrown are handled correctly
... a good thing.

Thanks, Jeff


%%%%%%%%%% Sample Test %%%%%%%%%%%%%%

[rmds03] ~/test_GCA/GCA/bin > root4gca
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   2.00/13  13 November 1998   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

CINT/ROOT C/C++ Interpreter version 5.13.79, Oct 30 1998
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

Welcome to the ROOT tutorials


Type ".x STAR_Demos.C" to get a toolbar from which to execute the STAR
demos

Type ".x demos.C" to get a toolbar from which to execute the demos

Type ".x demoshelp.C" to see the help window

root [0] QueryBuilder* QB=new
QueryBuilder("/grandch/u/GCA/tmp/gc.config.alt");
gcaResources:  Attempting to read configFile
/grandch/u/GCA/tmp/gc.config.alt
Using configuration file "/grandch/u/GCA/tmp/gc.config.alt".
the QE file is /grandch/u/GCA/tmp/SM_QE_hn.ref
QueryFactory has made contact with Query Estimator
You are connected to a Query Factory.
returning from findObjViaStringFile...
A Query Monitor is available to your OrderOptIterator.
root [1] QB->gca_query();
  Initial query will be 600<num_Pion_p<602
will register query with estimator
retrieved my token = 368be963-3075ec
set the predicate clause
New query token: 368be963-3075ec
Doing quick estimate
qo:: QueryEstimator exception: dataSetInfo::name2id() could not find
property "num_Pion_p" (searched 57 properties)
Quick estimate is between 0 and 0 events.
Doing full estimate...
qo:: QueryEstimator exception: qe::scanProperty("num_Pion_p") failed to
open file "/star/sol/db/Index/StarIndex/p_num_Pion_p.bin"
Full estimate is 0 events in 0 files.
Would you like to proceed with this query (y or n)?  n
qo:: query done
 qoF:: Released the query named = /var/tmp/caa008z9h
Would you like to build a predicate query (y or n)?  y

        Attributes available to predicate queries are:

        n_event0        n_event1        prod_run        glb_trk_tot
        glb_trk_good    glb_trk_prim    glb_trk_plus    glb_trk_minus
        n_vert_total    n_vert_V0       n_vert_K0       n_vert_Lambda
        n_vert_ALambda  n_vert_pileup   mult_eta0       mult_eta1
        mult_eta2       mult_eta3       mult_eta4       mult_pt0
        mult_pt1        mult_pt2        mult_pt3        mult_pt4
        mult_phi0       mult_phi1       mult_phi2       mult_phi3
        mult_phi4       mean_pt         mean_eta        T_average
        T_eta_bins0     T_eta_bins1     T_eta_bins2     energy_emc_eta0
        energy_emc_eta1 energy_emc_eta2 energy_emc_eta3 energy_emc_eta4
        energy_emc_phi0 energy_emc_phi1 energy_emc_phi2 energy_emc_phi3
        energy_emc_phi4 prim_vrtx0      prim_vrtx1      prim_vrtx2
        prim_vrtx_chisq tagrand         nTags           EventID.dbaseID
        EventID.contID  EventID.pageID  EventID.slotID  Set
        file_ID

Enter your query:  mean_pt<0.12543
will register query with estimator
retrieved my token = 368be97c-41a207
set the predicate clause
New query token: 368be97c-41a207
Doing quick estimate
Quick estimate is between 1 and 7669 events.
Doing full estimate...
Full estimate is 2 events in 1 files.
Would you like to proceed with this query (y or n)?  y
 return value from query->execute() is TRUE
Number of events:  2
Number of files:   1
DEBUG OOI:  requesting sublist 1 QM says QM_EI_REGISTERED
DEBUG OOI:  requesting sublist 2 QM says QM_NO_MORE_FILES
DEBUG OOI:  retrieving sublist 1 QM says QM_FILE_DELIVERED
DEBUG OOI:  sublist 1 fileId is 3 ObjRef count is 2
 OID retrieved:
  Database  = 3
  Container = 2
  Page      = 204
  Slot      = 209
 OID retrieved:
  Database  = 3
  Container = 2
  Page      = 510
  Slot      = 255
DEBUG OOI:  releasing 3
DEBUG OOI:  no more data after retrieving 1 files and 2 object
references

OOI:  **************** Iterator Statistics ****************
OOI:
OOI:  1 files and 2 object references in 0.152096 seconds.
OOI:
OOI:  Time includes sleep() padding of 0 seconds.
OOI:
OOI:       Elapsed times in seconds for CORBA calls:
OOI:    method        min         max         mean       stddev
sample_size
OOI:   request()   0.00426495  0.132358  0.0683115  0.0905754      2
OOI:   retrieve()  0.00761902  0.00761902  0.00761902  0      1
OOI:   release()   0.00399399  0.00399399  0.00399399  0      1
OOI:
OOI:  Total time spent in CORBA calls was 0.148236 seconds.
OOI:
OOI:  *****************************************************

 qoF:: Released the query named = /var/tmp/daa0FFwcK
Would you like to build a predicate query (y or n)?  n
root [2] .q

This is the end of ROOT -- Goodbye



-- END included message

begin:vcard 
n:Porter;R. Jeff
tel;fax:516-344-4206
tel;work:516-344-7953
x-mozilla-html:FALSE
org:Brookhaven National Lab
version:2.1
email;internet:porter@bnl.gov
adr;quoted-printable:;;=0D=0APhysics Department,=0D=0ABld 510A;Upton;NY;11973;
x-mozilla-cpt:;15856
fn:R. Jeff Porter
end:vcard