Adrian Sevcenco | 1 Oct 07:19 2011
Picon
Picon

[ROOT] compile ROOT with icpc :: cannot open source file "iostream.h"

Hi! I try to compile root with the intel compiler :
adrian <at> sevdell : v5-28 $ icpc -v
icpc version 12.1.0 (gcc version 4.5.0 compatibility)

on fedora 15 x86_64 and i have the following error:
adrian <at> sevdell : v5-28 $ make
bin/rmkdepend -R -fcint/cint/src/dict/libstrm.d -Y -w 1000 -- -pipe -m64
-Wall -W -Woverloaded-virtual -fPIC -Iinclude  -DG__REGEXP -DG__UNIX
-DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION
-DG__64BIT -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY
-I/home/physics-tools/root/v5-28/cint/cint/inc
-I/home/physics-tools/root/v5-28/cint/cint/src
-I/home/physics-tools/root/v5-28/cint/cint/src/dict -pthread
-Icint/cint/lib/libstrm -Icint/cint/lib/stream -I. -D__cplusplus --
cint/cint/src/dict/libstrm.cxx
icpc -g -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude
-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT
-DG__REDIRECTIO -DG__STD_EXCEPTION -DG__64BIT -DG__HAVE_CONFIG
-DG__NOMAKEINFO -DG__CINTBODY
-I/home/physics-tools/root/v5-28/cint/cint/inc
-I/home/physics-tools/root/v5-28/cint/cint/src
-I/home/physics-tools/root/v5-28/cint/cint/src/dict -pthread
-Icint/cint/lib/libstrm -Icint/cint/lib/stream -I. -o
cint/cint/src/dict/libstrm.o -c cint/cint/src/dict/libstrm.cxx
cint/cint/lib/stream/iostrm.h(24): catastrophic error: cannot open
source file "iostream.h"
  #include <iostream.h>
                       ^

compilation aborted for cint/cint/src/dict/libstrm.cxx (code 4)
(Continue reading)

Fons Rademakers | 1 Oct 08:55 2011
Picon
Picon

Re: [ROOT] compile ROOT with icpc :: cannot open source file "iostream.h"

Currently only the trunk is supported by icc 12.1. See config/Makefile.linuxx8664icc of trunk for needed
change. 

Cheers, Fons.

On 1 Oct 2011, at 07:19, Adrian Sevcenco <Adrian.Sevcenco <at> cern.ch> wrote:

> Hi! I try to compile root with the intel compiler :
> adrian <at> sevdell : v5-28 $ icpc -v
> icpc version 12.1.0 (gcc version 4.5.0 compatibility)
> 
> on fedora 15 x86_64 and i have the following error:
> adrian <at> sevdell : v5-28 $ make
> bin/rmkdepend -R -fcint/cint/src/dict/libstrm.d -Y -w 1000 -- -pipe -m64
> -Wall -W -Woverloaded-virtual -fPIC -Iinclude  -DG__REGEXP -DG__UNIX
> -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION
> -DG__64BIT -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY
> -I/home/physics-tools/root/v5-28/cint/cint/inc
> -I/home/physics-tools/root/v5-28/cint/cint/src
> -I/home/physics-tools/root/v5-28/cint/cint/src/dict -pthread
> -Icint/cint/lib/libstrm -Icint/cint/lib/stream -I. -D__cplusplus --
> cint/cint/src/dict/libstrm.cxx
> icpc -g -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude
> -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT
> -DG__REDIRECTIO -DG__STD_EXCEPTION -DG__64BIT -DG__HAVE_CONFIG
> -DG__NOMAKEINFO -DG__CINTBODY
> -I/home/physics-tools/root/v5-28/cint/cint/inc
> -I/home/physics-tools/root/v5-28/cint/cint/src
> -I/home/physics-tools/root/v5-28/cint/cint/src/dict -pthread
> -Icint/cint/lib/libstrm -Icint/cint/lib/stream -I. -o
(Continue reading)

William Zimmerman | 3 Oct 18:47 2011

[ROOT] 2 Dimensional Convolution using RooFit

ROOT Version: 5.24
RooFit Version: 3.0
Machine: x86, CentOs
Hello, I am trying to convolute one of the dimensions of a 2-dimensional 
pdf in RooFit (as per page 41 of the RooFit users' manual). It works 
fine (although very slow) when using numerical convolution through the 
RooNumConvPdf class.

However, when I try it using the FFT convolution scheme via the 
RooFFTConvPdf class, I get strange results: The convolution variable (x 
in the macro) is handled correctly, but the non-convoluted variable (y 
in the macro) ends up with a flat, uniform distribution.

I've confirmed this with a more recent version of ROOT (5.31) and RooFit 
(3.17). Is there any way to preserve the distribution in the 
non-convoluted variable?

Thanks,
     -Bill
Attachment (TwoDimConv.C): text/x-c++src, 1465 bytes
Ida Häggström | 4 Oct 16:19 2011
Picon
Picon

[ROOT] Updating the axis range in a sub pad

Hello!

I have a macro that analyzes a ROOT tree file in which I make a drawing of 6 different histograms in one canvas. I want to manually set the x- and y-axis range of a couple of the pads on the canvas, but I can't get it right it seems! Here's a trimmed code snippet:
----------------------------
   TH2F *hist1= new TH2F("hist1","Transaxial detection position",252,-505.,+505.,252,-505.,+505.);
   TH1F *hist2= new TH1F("hist2","Axial detection position",100.,-100.,+100.);   
   TH1F *hist3= new TH1F("hist3","Isotope decay",100,0,500);
   TH1F *hist4= new TH1F("hist4","Axial sensitivity",100,-100.,+100.);
   TH1F *hist5= new TH1F("hist5","Axial scatter fraction",100,-100.,+100.);
   TH1F *hist5a= new TH1F("hist5a","Axial scatters distribution",100,-100.,+100.);
   TH1F *hist5b = new TH1F("hist5b","",100,-100.,+100.);
   TH1F *hist6= new TH1F("hist6","Isotope decay 2",100,0,500);

// New canvas
   c1 = new TCanvas("c1","TEST",3,28,970,632);
   Int_t pos=1;
   c1->Divide(3,2);
   c1->SetFillColor(0);
   c1->SetBorderMode(0);
// First pad
   c1->cd(pos++);
   hist1->Draw();
// Second pad
   c1->cd(pos++);
   hist2->Draw();
// Third pad
   c1->cd(pos++);
   hist3->Draw();
   tex = new TLatex(10.,(int)(hist3->GetMaximum()/2.),"Some text");
   tex->Draw();
   tex = new TLatex(10.,(int)(hist3->GetMaximum()/2.*0.8),"Some other text");
   tex->Draw();
// Fourth pad
   c1->cd(pos++);
   hist4->Draw();
// Fifth pad
   c1->cd(pos++);
   hist5->Divide(hist5a,hist5b,1.,1.,"");  
   hist5->Draw();
// Sixth pad
   c1->cd(pos++);
   hist6->Draw();
   tex2 = new TLatex(10.,(int)(hist6->GetMaximum()/2.),"Some text");
   tex2->Draw();
   tex2 = new TLatex(10.,(int)(hist6->GetMaximum()/2.*0.8),"Some other text");
   tex2->Draw();

// Setting x- and y-axes...  
   c1->GetPad(3)->GetFrame()->SetY1(0);
   c1->GetPad(3)->GetFrame()->SetX2(500);
   c1->GetPad(6)->GetFrame()->SetY1(0);
   c1->GetPad(6)->GetFrame()->SetX2(500);  

// Update canvas
   c1->Update();   
----------------------------

The axis range commands under "// Setting x- and y-axes...  " don't seem to do anything. How can I set these values and properly update the canvas? 
Any ideas? Thanks! 
/Ida
Olivier Couet | 4 Oct 16:33 2011
Picon
Picon

Re: [ROOT] Updating the axis range in a sub pad

Try something like that:

c1->cd(3);
gPad->DrawFrame(0, 500, 0, 500);
hist3->Draw("SAME");

---
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet <at> cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7670300

On Oct 4, 2011, at 4:19 PM, Ida Häggström wrote:

> Hello!
> I have a macro that analyzes a ROOT tree file in which I make a drawing of 6 different histograms in one
canvas. I want to manually set the x- and y-axis range of a couple of the pads on the canvas, but I can't get it
right it seems! Here's a trimmed code snippet:
> ----------------------------
>    TH2F *hist1= new TH2F("hist1","Transaxial detection position",252,-505.,+505.,252,-505.,+505.);
>    TH1F *hist2= new TH1F("hist2","Axial detection position",100.,-100.,+100.);   
>    TH1F *hist3= new TH1F("hist3","Isotope decay",100,0,500);
>    TH1F *hist4= new TH1F("hist4","Axial sensitivity",100,-100.,+100.);
>    TH1F *hist5= new TH1F("hist5","Axial scatter fraction",100,-100.,+100.);
>    TH1F *hist5a= new TH1F("hist5a","Axial scatters distribution",100,-100.,+100.);
>    TH1F *hist5b = new TH1F("hist5b","",100,-100.,+100.);
>    TH1F *hist6= new TH1F("hist6","Isotope decay 2",100,0,500);
> 
> // New canvas
>    c1 = new TCanvas("c1","TEST",3,28,970,632);
>    Int_t pos=1;
>    c1->Divide(3,2);
>    c1->SetFillColor(0);
>    c1->SetBorderMode(0);
> // First pad
>    c1->cd(pos++);
>    hist1->Draw();
> // Second pad
>    c1->cd(pos++);
>    hist2->Draw();
> // Third pad
>    c1->cd(pos++);
>    hist3->Draw();
>    tex = new TLatex(10.,(int)(hist3->GetMaximum()/2.),"Some text");
>    tex->Draw();
>    tex = new TLatex(10.,(int)(hist3->GetMaximum()/2.*0.8),"Some other text");
>    tex->Draw();
> // Fourth pad
>    c1->cd(pos++);
>    hist4->Draw();
> // Fifth pad
>    c1->cd(pos++);
>    hist5->Divide(hist5a,hist5b,1.,1.,"");  
>    hist5->Draw();
> // Sixth pad
>    c1->cd(pos++);
>    hist6->Draw();
>    tex2 = new TLatex(10.,(int)(hist6->GetMaximum()/2.),"Some text");
>    tex2->Draw();
>    tex2 = new TLatex(10.,(int)(hist6->GetMaximum()/2.*0.8),"Some other text");
>    tex2->Draw();
> 
> // Setting x- and y-axes...  
>    c1->GetPad(3)->GetFrame()->SetY1(0);
>    c1->GetPad(3)->GetFrame()->SetX2(500);
>    c1->GetPad(6)->GetFrame()->SetY1(0);
>    c1->GetPad(6)->GetFrame()->SetX2(500);  
> 
> // Update canvas
>    c1->Update();   
> ----------------------------
> 
> The axis range commands under "// Setting x- and y-axes...  " don't seem to do anything. How can I set these
values and properly update the canvas? 
> Any ideas? Thanks! 
> /Ida

Ida Häggström | 5 Oct 07:47 2011
Picon
Picon

Re: [ROOT] Updating the axis range in a sub pad

Hello Olivier,


Your tip worked like a charm! Thanks a lot!
/Ida

On Tue, Oct 4, 2011 at 4:34 PM, Olivier Couet <Olivier.Couet <at> cern.ch> wrote:
Try something like that:

c1->cd(3);
gPad->DrawFrame(0, 500, 0, 500);
hist3->Draw("SAME");

---
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910
E-Mail: Olivier.Couet <at> cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7670300

Picon
Picon

[ROOT] Save a TCanvas as a ASCII image: is it possible ?

Dear ROOTers,

Does someone know if is possible save the TCanvas content as a ascii image?

Thanks
A.A.

Axel Naumann | 5 Oct 13:53 2011
Picon
Picon

Re: [ROOT] Save a TCanvas as a ASCII image: is it possible ?

Hi Antonio,

See <http://root.cern.ch/phpBB3/viewtopic.php?f=12&t=10786> which can
"draw" e.g. histograms as ASCII art.

Cheers, Axel.

Antonio Augusto Alves Junior wrote on 10/05/2011 12:07 PM:
> Dear ROOTers,
> 
> Does someone know if is possible save the TCanvas content as a ascii image?
> 
> 
> Thanks
> A.A.
> 
> 

Rene Brun | 5 Oct 13:59 2011
Picon
Picon

Re: [ROOT] Save a TCanvas as a ASCII image: is it possible ?

You can save a TCanvas *canvas as a script with
    canvas->SaveAs("mycanvas.C")
and then, in a new session do
   root > .x mycanvas.C

Rene

On 05/10/2011 13:53, Axel Naumann wrote:
> Hi Antonio,
>
> See<http://root.cern.ch/phpBB3/viewtopic.php?f=12&t=10786>  which can
> "draw" e.g. histograms as ASCII art.
>
> Cheers, Axel.
>
>
> Antonio Augusto Alves Junior wrote on 10/05/2011 12:07 PM:
>> Dear ROOTers,
>>
>> Does someone know if is possible save the TCanvas content as a ascii image?
>>
>>
>> Thanks
>> A.A.
>>
>>

Ida Häggström | 11 Oct 15:14 2011
Picon
Picon

[ROOT] Merging with 'hadd' results in 'std::bad_alloc'

Hello!


I'll start with some info:
Root version:  5.28/00a  (21 February 2011)
OS: Ubuntu version 10.10 (as a guest via VirtualBox4.0.4 on host Windows 7)
Memory: 

I'm experiencing some problems when trying to merge some root files. I have six files (around 1.1 GB each) that I want to merge. The files contain the same structure (four different trees + some histograms each). I'm trying to use the 'hadd' method, but after a couple of hours it crashes with the message "terminate called after throwing an instance of 'std::bad_alloc'" (see below). 
I've googled the issue and figured I run out of memory (I'm not so skilled with root or C++!).

I found a thread addressing a similar issue as mine (http://root.cern.ch/phpBB3/viewtopic.php?t=9008) where it was suggested to flush the baskets of each root file, then use hadd. I've tried this according to:
TFile f(fileName.c_str(),"update");
   
   cout << "Flushing \"finalCoinci\"..." << endl;
   TTree *T1 = (TTree*)f.Get("finalCoinci"); 
   T1->FlushBaskets();
   T1->Write();

 but I still get the same error. 

------------------------------------------------
hadd test.root rootOutput*
Target file: test.root
Source file 1: rootOutput_Prompts_t0-1.root
Source file 2: rootOutput_Prompts_t0-2.root
Source file 3: rootOutput_Prompts_t0-3.root
Source file 4: rootOutput_Prompts_t0-4.root
Source file 5: rootOutput_Prompts_t0-5.root
Source file 6: rootOutput_Prompts_t0-6.root
Target path: test.root:/
rootOutput_Prompts_t0-1.root tree:finalCoinci entries=1234567890
rootOutput_Prompts_t0-2.root tree:finalCoinci entries=1234567890
rootOutput_Prompts_t0-3.root tree:finalCoinci entries=1234567890
rootOutput_Prompts_t0-4.root tree:finalCoinci entries=1234567890
rootOutput_Prompts_t0-5.root tree:finalCoinci entries=1234567890
rootOutput_Prompts_t0-6.root tree:finalCoinci entries=1234567890
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
------------------------------------------------


Gmane