-- JuanCastillo - 28 Feb 2009


Warning: replacing existing histogram

You are giving the same name to two histograms, maybe in a loop.

      TH1F *ChA[end-beg];
      char hnameA[end-beg], htitleA[end-beg];
      ... (code)
      for(Int_t i= beg; i < end;i++){
         !ChA[i] = new TH1F(hnameA,htitleA,50,0,50);//histo def
      for (int k=0;k<500; k++){

ALERT! NOTE: It's better to plot a few THs big grin before doing the big annalysis, maybe they're not "defined" or "filled" as expected.

If you need a huge amount of "impersonal" histos (use and throw it) wink , name it in this way:

      Histo = new TH1D(Form("H_%d_%d",i,j),"title",10,0,10); 

Of course, i and j are counters of loops or user-defined numeric labels.

warning: deprecated conversion from string constant to char*

Just change where you write a char*, put instead a const char*.
From Williamos blog.

Breaks: segmentation violation

When reading a branch of a tree.

Check that the name of the tree is the proper one.
Check the name of the branch. If you're not sure, open a TBrowser and click on the file.

When running your macro

   *** Break *** segmentation violation
   Generating stack trace...
   0xffffe420 in <unknown function>

Check the members of the objects you created.
Problably you have declared 2 "TF" members corresponding a 2 objects of the same class.
ROOT is having a "key" (not a pointer) for each of its objects, and if you are declaring the same object twice it is becoming crazy and crashing.


Symbol G__exception is not defined in current scope

The error is appearing when CINT catches an exception and try to throw it into the interpreter.
Try to review your code (commenting/uncommenting) to find the "exception.
See ROOT talk about here

dlopen error: undefined symbol

Problem that could appear when compiling your own class against third-party libraries, like the ones of ROOT.
This can be NOT ROOT-related, however, I solved the problem by changing the compilation technique.
In my case, for 2 libraries, one already compiled libMDscaling.so with a certain complexity and one class using it, I got the error while typing in the prompt:

$root -q .x MDweightdist.cxx++

that should open root, compile my class and create a library with it (including the already compiled one), and close it.
Instead, I go to the root prompt and write:

root [0] .L ../../libs/MDscaling/libMDscaling.so
root [1] .x MDweightdist.cxx++

Of course, in my class I was "including" everything necessary to access to the compiled library, I think big grin
There is a ROOT Talk entry about the subject that can be helpful for you.

Unknown function

Unknown function: Myfitmemberfunction

So you are not fitting! big grin If you are calling the function while fitting by its ROOT name, try by its member name.
Something like:

   Myfitmemberfunction = new TF1("FFfitG4",fitgamma4, 0,500, 4); //instance
   //Histo->Fit("FfitG4","R");  //this is giving the "unknown"
   Histo->Fit(Myfitmemberfunction,"R"); //this is working.

The instance for Myfitmemberfunction can be defined there or in another object.
If it's in another, you need to fit like this: Histo->Fit(object->Myfitmemberfunction,"R")

TTree::SetBranchStatus unknown branch

   Error in <TTree::SetBranchStatus>: unknown branch -> MYBRANCH

Open a TBrowser in a ROOT interactive session and check the name of the branch of the tree inside your file.
Check the name in your code. Are you loading the proper branch?

TChain::LoadTree cannot find tree error

Error in <TChain::LoadTree >: cannot find tree with name MyTree in file myfile.root

Open a TBrowser in a ROOT interactive session and check the name of the tree inside your file.
Check the name in your code. Are you loading the proper tree?
Second solution. In the prompt write
   root[]TFile *f= new TFile("myfile.root")
In the output you should read that there is a tree and the name of it.

TStreamerInfo::Build error

Error in <TStreamerInfo::Build> : MyClass::MyMember, discarding: double* Myarray, no [dimension]

Non-fatal error: the run continues apparently without problems. Also the results seem to be fine. Myarray is a double pointer for an array. Pointers to objects without virtual tables cannot easly be made persistent.
I found this error while moving one class to arrays "inside" another. Before it was not displayed. Once the class with an array was declared as a member of another, ROOT looses the track. A dictionary was being generated, but both classes were not "ROOT-based". An easy way of solving the problem is to change the type to ROOT type.

Error in <TStreamerInfo::Build>: MyClass, discarding: int *Myarray, no [dimension].

The new ROOT I/O (i.e. StreamerInfo) supports ONLY the date type 'Int_t' for the index of the variable length array. This means that Myarray has to be defined as:

Int_t *Myarray;

If you want still to avoid ROOT data type, in the header where you have a "naked" pointer that will be used as an array, write a private message to CINT, saying to it that you will use it as an array >:-) Example: instead of:
int *Myarray;
int *MyArray; //!
Now the run-time error dissapears. Curious, isn't? roll eyes (sarcastic)
Another reference to the error you can find here

Other problems

ROOTX11ErroHandler errors. Errors appearing while running ROOT from a Cygwin sesssion.


Non-fatal. Wait until the display appears


Fatal. Attempt to access to private resources denied. I found this problem while doing a "double" ssh. Try to copy the application/macro to your personal folder (accesible through a lxi00X machine)
Topic revision: r5 - 2010-01-19, JuanCastillo
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)