Re: [BLAST_ANAWARE] libBlast question

From: Chris Crawford (chris2@lns.mit.edu)
Date: Thu Nov 06 2003 - 12:54:41 EST


hi aaron,

  to elaborate on chi's comment, i suggest you follow the format in
'simple.cc' which will give you a script that can be either compiled or
run from Cint. if you want a a plain minimal unnamed script (be sure to
'cvs up' first),

{
  gSystem->Load("libBlast.so");
  Setup(); //this gives you: gOpt, gGeom, gField, gRecon, gRaw, gWire,
gHits,...
  ...
}

note: all of the default constructors use the global 'gOpt' for their
parameters, so you must initialize 'gOpt' first (done in Setup()). you
can probably just use the global objects listed at the beginning of
"TOpt.h" instead on initializing your own ones.

--chris

zhangchi wrote:

>this is probably because gOpt is not set up yet.
>
>try the following:
>
>{
> gROOT->Reset();
> gSystem.Load("libBlast.so");
> gSystem->SetProgname("lrn");//optional
> int arc=gApplication->Argc();
> char** arv=gApplication->Argv();
> Setup(arc, arv);
>
> ...
>}
>
>as you can see from: definition of Setup() in TOpt.cc, it contains the
>following line:
> gOpt = new TOpt(argc, argv);
>which initializes gOpt.
>
>otherwise, gOpt is a uninitialized pointer, any dereference operation
>would result in seg fault.
>
>hoep it works.
>
>Chi
>
>
>
>On Wed, 5 Nov 2003, Aaron Joseph Maschinot wrote:
>
>
>
>>when i try to run the following script:
>>
>>{
>> gROOT->Reset();
>> gSystem.Load("libBlast.so");
>> TBLWc1WireCal * wireCal = new TBLWc1WireCal();
>>}
>>
>>i get a segmentation violation. as best i can tell, i don't think gOpt is
>>being recognized for some reason (the TBLWc1WireCal constructor makes
>>calls to gOpt). do you guys have any idea what i'm doing wrong or not
>>including?
>>
>>thanks,
>>
>>aaron
>>
>>
>>



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:30 EST