I have what I believe to be one of the simplest root code chunks ever… |-) (ov course besides the hello world examples…) Problem is that the output is just a grey rectangle. If I move the TCanvas and saveas stuff to just past the clone it prints that one ok, but then if I move it out back to the bottom I get just the grey and if I move it to just before the TFile close statement I get a segfualt. I just do not know what is wrong here. Can somebody pass me some pointers… Thanks.
I did not set this up as a macro, but a standalone executable. I have created a directory structure with the needed files and a simple script to build and run the code block. Just untar and then go into the Combine directory. From there just run "./make" (not make since not a real makefile). From there you should be able to just move to the "SomethingWrong" directory and execute the "./run_comb" script. The "files" file just has a list of root files that I want to combine. Thanks for taking a look at this. I have subsequently altered the code to work another way but this has added a restriction.
I should state that I am not sure which version of root that was. It is the standard D0 root version which is and early version 4 I think. I wish I could tell you exactly.
Ohh, shoot. I had mode some mods. Just move the “files” file into the Combine directory and rename it to “desc”. If it just the list of root files that it should combine. I do not have access to a terminal right now to see what version of root I am running.
so it seems the file “files” is needed … so if I move " files" as you suggest it will not work … Any way i just copied the file " files" into Combine/desc and I get:
pcepsft15.cern.ch> run_comb
*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Attaching to program: /proc/19087/exe, process 19087
[Thread debugging using libthread_db enabled]
[New Thread -1218565600 (LWP 19087)]
etc...
I feel like such a . The execute line that I had given you was for the newer version. The first arg for the program needs to be the key name of the histo that you want to combine. So, an example would be “./Combine/comb nj”. The comb program needs to be executed from where the files were found. Thanks for looking at this and I am sorry for giving you the mis-information.
But we will have to wait. I am in Springfield, mo right now and not a good connection (timeouts during kerberos transactions). When I get to FNAL I will get a working copy of this. It is strange though cause that code block should not produce this seg fault. But I will hammer something together and post it. That will be on the 1st or 2nd of June.
Well, the issue seemes to be related to Object Ownership. So for some reason it was going out of scope. So I just added TH1::AddDirectory(kFALSE) and now all is working…