FFT algorithm crash

I have been trying to load the data from a CSV file into a tree, then creating ntuples which I would pass on to the FFT algorithm. However, when I pass the ntuples to the FFT algorithm I receive the following error message:

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f8a7a42858a in waitpid () from /lib64/libc.so.6
#1  0x00007f8a7a3a142b in do_system () from /lib64/libc.so.6
#2  0x00007f8a7b4bea82 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x142d4f0) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:2118
#3  TUnixSystem::StackTrace (this=0x142d4f0) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:2412
#4  0x00007f8a7b4c0f0c in TUnixSystem::DispatchSignals (this=0x142d4f0, sig=kSigSegmentationViolation) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:3632
#5  <signal handler called>
#6  TFFTRealComplex::SetPoints (this=0x4339c60, data=0x0) at /home/tarabostes-delectus/root/math/fftw/src/TFFTRealComplex.cxx:461
#7  0x00007f8a7bc137aa in ?? ()
#8  0x00007fff60b36890 in ?? ()
#9  0x000000000416b210 in ?? ()
#10 0x0000000000000000 in ?? ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6  TFFTRealComplex::SetPoints (this=0x4339c60, data=0x0) at /home/tarabostes-delectus/root/math/fftw/src/TFFTRealComplex.cxx:461
#7  0x00007f8a7bc137aa in ?? ()
#8  0x00007fff60b36890 in ?? ()
#9  0x000000000416b210 in ?? ()
#10 0x0000000000000000 in ?? ()
===========================================================

Any help is appreciated.

Hi,

did you check that the tree is well defined? Perhaps this is not an issue of the FFT. It is hard to say with the information provided.

Cheers,
Danilo

Hello Danilo,

I have made another post (https://root-forum.cern.ch/t/fft-function-crash/25042) with how I defined the tree and the operations I performed and the resulting error.

Do you think you could take a look and provide a hint as to what went wrong?

Thank you in advance,
Tarabostes

Hard to say without the full input. What happens if you try to plot with, say, ttree draw the content of the branches?
D

The commands that I have tried are

tapr28->Draw("By>> hapr28By");
hapr28By->Draw();

And they work. A histogram with the values of the By branch on the x axis and the frequency with which they occur on the y axis is displayed.

Due to the fact that I need to make some progress with this analysis I have also tried running the FFT function on some data arrays I have created from the tree. I have done this using the following code:

//Create tree to store data
     TTree *tapr28 = new TTree("Data", "Magnetic field  readings Apr 28 Start: 1705");
     
     //Read columns from csv file into branches in the tree
      tapr28->ReadFile("/home/tarabostes-delectus/build/PicoLog data/apr_28_1705 to 270 h later11 (csv).csv", "Time::Bx::By::Bz::T::B0x::B0y::B0z" ,',');
      
      //Check that data is in tree
      tapr28->Print();
      
      //Create histograms for all the branches of interest
      TH1D *hapr28Bx = new TH1D("hapr28Bx", "Bx readings April 28", 1000, 0, 340090);
      TH1D *hapr28By = new TH1D("hapr28By", "By readings April 28", 340091, 0, 340090);
      TH1D *hapr28Bz = new TH1D("hapr28Bz", "Bz readings April 28", 340091, 0, 1000);
      TH1D *hapr28B0x = new TH1D("hapr28B0x", "B0x readings April 28",50, 0, 1000);
      TH1D *hapr28B0y = new TH1D("hapr28B0y", "B0y readings April 28", 50, 0, 1000);
      TH1D *hapr28B0z = new TH1D("hapr28B0z", "B0z readings April 28", 50, 0, 1000);
      
      //Create input vectors from tree branches
      Float_t Bx,By,Bz,B0x,B0y,B0z;
      tapr28->SetBranchAddress("Bx",&Bx);
      tapr28->SetBranchAddress("By",&By);
      tapr28->SetBranchAddress("Bz",&Bz);
      tapr28->SetBranchAddress("B0x",&B0x);
      tapr28->SetBranchAddress("B0y",&B0y);
      tapr28->SetBranchAddress("B0z",&B0z);

      
      Int_t n = (Int_t) tapr28->GetEntries();
      printf("number of points in branch: %d\n", n);
      
      Double_t *inBx = new Double_t[2*((n+1)/2+1)];
      Double_t *inBy = new Double_t[2*((n+1)/2+1)];
      Double_t *inBz = new Double_t[2*((n+1)/2+1)];
      Double_t *inB0x = new Double_t[2*((n+1)/2+1)];
      Double_t *inB0y = new Double_t[2*((n+1)/2+1)];
      Double_t *inB0z = new Double_t[2*((n+1)/2+1)];
      
      for (Int_t i=0;i<=n;i++)
      {
          tapr28->GetEntry(i);
          inBx[i]=Bx;
          inBy[i]=By;
          inBz[i]=Bz;
          inB0x[i]=B0x;
          inB0y[i]=B0y;
          inB0z[i]=B0z;
      }
      
     
      //Create the canvas(es) for drawing
        TCanvas *myc1 = new TCanvas("myc1", "Fast Fourier Transform of Bx", 2000, 2000);
        TCanvas *myc2 = new TCanvas("myc2", "Fast Fourier Transform of By", 2000, 2000);
        TCanvas *myc3 = new TCanvas("myc3", "Fast Fourier Transform of Bz", 2000, 2000);
        TCanvas *myc4 = new TCanvas("myc4", "Fast Fourier Transform of B0x", 2000, 2000);
        TCanvas *myc5 = new TCanvas("myc5", "Fast Fourier Transform of B0y", 2000, 2000);
        TCanvas *myc6 = new TCanvas("myc6", "Fast Fourier Transform of B0z", 2000, 2000);
        
        
        myc1->SetFillColor(45);
        myc2->SetFillColor(45);
        myc3->SetFillColor(45);
        myc4->SetFillColor(45);
        myc5->SetFillColor(45);
        myc6->SetFillColor(45);
        
        myc1->cd();
        TPad *c1_1 = new TPad("c1_1", "c1_1",0.01,0.01,0.49,0.99);
        TPad *c1_2 = new TPad("c1_2", "c1_2",0.51,0.01,0.99,0.99);
        
        c1_1->Draw();
        c1_2->Draw();
       
        c1_1->SetFillColor(30);
        c1_1->SetFrameFillColor(42);
        c1_2->SetFillColor(30);
        c1_2->SetFrameFillColor(42);
        
        myc2->cd();
        TPad *c2_1 = new TPad("c2_1", "c2_1",0.01,0.01,0.49,0.99);
        TPad *c2_2 = new TPad("c2_2", "c2_2",0.51,0.01,0.99,0.99);
        
        c2_1->Draw();
        c2_2->Draw();
       
        c2_1->SetFillColor(30);
        c2_1->SetFrameFillColor(42);
        c2_2->SetFillColor(30);
        c2_2->SetFrameFillColor(42);
       
        myc3->cd();
        TPad *c3_1 = new TPad("c3_1", "c3_1",0.01,0.01,0.49,0.99);
        TPad *c3_2 = new TPad("c3_2", "c3_2",0.51,0.01,0.99,0.99);
        
        c3_1->Draw();
        c3_2->Draw();
       
        c3_1->SetFillColor(30);
        c3_1->SetFrameFillColor(42);
        c3_2->SetFillColor(30);
        c3_2->SetFrameFillColor(42);
        
        myc4->cd();
        TPad *c4_1 = new TPad("c4_1", "c4_1",0.01,0.01,0.49,0.99);
        TPad *c4_2 = new TPad("c4_2", "c4_2",0.51,0.01,0.99,0.99); 
        
        c4_1->Draw();
        c4_2->Draw();
       
        c4_1->SetFillColor(30);
        c4_1->SetFrameFillColor(42);
        c4_2->SetFillColor(30);
        c4_2->SetFrameFillColor(42);
        
        myc5->cd();
        TPad *c5_1 = new TPad("c5_1", "c5_1",0.01,0.01,0.49,0.99);
        TPad *c5_2 = new TPad("c5_2", "c5_2",0.51,0.01,0.99,0.99); 
        
        c5_1->Draw();
        c5_2->Draw();
       
        c5_1->SetFillColor(30);
        c5_1->SetFrameFillColor(42);
        c5_2->SetFillColor(30);
        c5_2->SetFrameFillColor(42);
        
        myc6->cd();
        TPad *c6_1 = new TPad("c6_1", "c6_1",0.01,0.01,0.49,0.99);
        TPad *c6_2 = new TPad("c6_2", "c6_2",0.51,0.01,0.99,0.99); 
        
        c6_1->Draw();
        c6_2->Draw();
       
        c6_1->SetFillColor(30);
        c6_1->SetFrameFillColor(42);
        c6_2->SetFillColor(30);
        c6_2->SetFrameFillColor(42);
        
        

        myc1->cd();
        TH1::AddDirectory(kFALSE);
        Int_t n_size = n+1;
        //Put histogram of Bx in c1_1
        
        c1_1->cd();
        tapr28->Draw("Bx:Time>> hapr28Bx");
        hapr28Bx->Draw();
        
        //Put FFT of Bx in c1_2
        TVirtualFFT *fft_ownBx = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownBx) return;
        fft_ownBx->SetPoints(inBx);
        fft_ownBx->Transform();
        fft_ownBx->GetPoints(inBx);
        c1_2->cd();
        TH1 *hmBx = 0;
        hmBx = TH1::TransformHisto(fft_ownBx, hmBx, "MAG");
        hmBx->SetTitle("Magnitude of Bx component transform");
        hmBx->Draw();
        hmBx->SetStats(kFALSE);
        hmBx->GetXaxis()->SetLabelSize(0.05);
        hmBx->GetYaxis()->SetLabelSize(0.05);

        
        //Load By histogram in c2_1
        myc2->cd();
        c2_1->cd();
        tapr28->Draw("By:Time>> hapr28By");
        hapr28By->Draw();
        
        //Put FFT of By in c2_2
        TVirtualFFT *fft_ownBy = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownBy) return;
        fft_ownBy->SetPoints(inBy);
        fft_ownBy->Transform();
        fft_ownBy->GetPoints(inBy);
        c2_2->cd();
        TH1 *hmBy = 0;
        hmBy = TH1::TransformHisto(fft_ownBy, hmBy, "MAG");
        hmBy->SetTitle("Magnitude of By component transform");
        hmBy->Draw();
        hmBy->SetStats(kFALSE);
        hmBy->GetXaxis()->SetLabelSize(0.05);
        hmBy->GetYaxis()->SetLabelSize(0.05);
        
        //Load Bz histogram in the c3_1
        myc3->cd();
        c3_1->cd();
        tapr28->Draw("Bz:Time>> hapr28Bz");
        hapr28Bz->Draw();
        
        //Put FFT of Bz in c3_2
        TVirtualFFT *fft_ownBz = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownBz) return;
        fft_ownBz->SetPoints(inBz);
        fft_ownBz->Transform();
        fft_ownBz->GetPoints(inBz);
        c3_2->cd();
        TH1 *hmBz = 0;
        hmBz = TH1::TransformHisto(fft_ownBz, hmBz, "MAG");
        hmBz->SetTitle("Magnitude of Bz component  transform");
        hmBz->Draw();
        hmBz->SetStats(kFALSE);
        hmBz->GetXaxis()->SetLabelSize(0.05);
        hmBz->GetYaxis()->SetLabelSize(0.05);
        
        //Put B0x histogram in c4_1
        myc4->cd();
        c4_1->cd();
        tapr28->Draw("B0x:Time>> hapr28B0x");
        hapr28B0x->Draw();
        
        //Put FFT of B0x in c4_2
        TVirtualFFT *fft_ownB0x = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownB0x) return;
        fft_ownB0x->SetPoints(inB0x);
        fft_ownB0x->Transform();
        fft_ownB0x->GetPoints(inB0x);
        c4_2->cd();
        TH1 *hmB0x = 0;
        hmB0x = TH1::TransformHisto(fft_ownB0x, hmB0x, "MAG");
        hmB0x->SetTitle("Magnitude of B0x component transform");
        hmB0x->Draw();
        hmB0x->SetStats(kFALSE);
        hmB0x->GetXaxis()->SetLabelSize(0.05);
        hmB0x->GetYaxis()->SetLabelSize(0.05);
        
        //Put B0y in c5_1
        myc5->cd();
        c5_1->cd();
        tapr28->Draw("B0y:Time>> hapr28B0y");
        hapr28B0y->Draw();
        
        //Put FFT of B0y in c5_2
        TVirtualFFT *fft_ownB0y = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownB0y) return;
        fft_ownB0y->SetPoints(inB0y);
        fft_ownB0y->Transform();
        fft_ownB0y->GetPoints(inB0y);
        c5_2->cd();
        TH1 *hmB0y = 0;
        hmB0y = TH1::TransformHisto(fft_ownB0y, hmB0y, "MAG");
        hmB0y->SetTitle("Magnitude of B0y component transform");
        hmB0y->Draw();
        hmB0y->SetStats(kFALSE);
        hmB0y->GetXaxis()->SetLabelSize(0.05);
        hmB0y->GetYaxis()->SetLabelSize(0.05);
        
        //Put B0z in c6_1
        myc6->cd();
        c6_1->cd();
        tapr28->Draw("B0z:Time>> hapr28B0z");
        hapr28B0z->Draw();
        
        //Put FFT of B0z in c6_2
        TVirtualFFT *fft_ownB0z = TVirtualFFT::FFT(1, &n_size, "R2C ES K");
        if (!fft_ownB0z) return;
        fft_ownB0z->SetPoints(inB0z);
        fft_ownB0z->Transform();
        fft_ownB0z->GetPoints(inB0z);
        c6_2->cd();
        TH1 *hmB0z = 0;
        hmB0z = TH1::TransformHisto(fft_ownB0z, hmB0z, "MAG");
        hmB0z->SetTitle("Magnitude of B0z component transform");
        hmB0z->Draw();
        hmB0z->SetStats(kFALSE);
        hmB0z->GetXaxis()->SetLabelSize(0.05);
        hmB0z->GetYaxis()->SetLabelSize(0.05);

However, when I run the code, only the first histogram appears and the following error occurs:

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fc97167658a in waitpid () from /lib64/libc.so.6
#1  0x00007fc9715ef42b in do_system () from /lib64/libc.so.6
#2  0x00007fc97270ca82 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x10d84f0) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:2118
#3  TUnixSystem::StackTrace (this=0x10d84f0) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:2412
#4  0x00007fc97270ef0c in TUnixSystem::DispatchSignals (this=0x10d84f0, sig=kSigSegmentationViolation) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:3632
#5  <signal handler called>
#6  0x0000000000000000 in ?? ()
#7  0x00007fc967085144 in ?? ()
#8  0x00000000063da110 in ?? ()
#9  0x00000000063d0950 in ?? ()
#10 0x0000000001c1a420 in ?? ()
#11 0x000000000957f0c0 in ?? ()
#12 0x0000000001c1aa10 in ?? ()
#13 0x000000000957f3d0 in ?? ()
#14 0x000000000957f860 in ?? ()
#15 0x0000000001e85db0 in ?? ()
#16 0x0000000009580d50 in ?? ()
#17 0x0000000009581300 in ?? ()
#18 0x0000000001e861a0 in ?? ()
#19 0x000000000957be00 in ?? ()
#20 0x000000000955b020 in ?? ()
#21 0x0000000001e86590 in ?? ()
#22 0x000000000955b390 in ?? ()
#23 0x000000000955b780 in ?? ()
#24 0x000000000901b1b0 in ?? ()
#25 0x00000000092b35a0 in ?? ()
#26 0x00000000088525e0 in ?? ()
#27 0x0000000008aea9d0 in ?? ()
#28 0x0000000008d82dc0 in ?? ()
#29 0x00000000095509d0 in ?? ()
#30 0x0000000009560920 in ?? ()
#31 0x000000000956ffb0 in ?? ()
#32 0x0000000001e86b30 in ?? ()
#33 0x4419000042c40000 in ?? ()
#34 0x43dd000043000000 in ?? ()
#35 0x43ed80004410c000 in ?? ()
#36 0x0000000001e870d0 in ?? ()
#37 0x0000000006c75ae0 in ?? ()
#38 0x0000000006c12a00 in ?? ()
#39 0x0005307bb5c7ed40 in ?? ()
#40 0x3fe051eb851eb852 in ?? ()
#41 0x0000000006bf5870 in ?? ()
#42 0x0000000009582440 in ?? ()
#43 0x0005307b716302bc in ?? ()
#44 0x00000000095827b0 in ?? ()
#45 0x0000000009582b20 in ?? ()
#46 0x00000000085ba1f0 in ?? ()
#47 0x00007fc972c69000 in ?? ()
#48 0x00007fffb5c7ed40 in ?? ()
#49 0x00007fffb5c7ed70 in ?? ()
#50 0x0000000005b08e50 in ?? ()
#51 0x00007fffb5c7f340 in ?? ()
#52 0x00007fffb5c7ed90 in ?? ()
#53 0x00007fc96d911649 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) [clone .part.279] () from /home/tarabostes-delectus/build/lib/libCling.so
#54 0x00007fc96d9149ed in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/tarabostes-delectus/build/lib/libCling.so
#55 0x00007fc96d914c41 in cling::Interpreter::echo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#56 0x00007fc96d9a264a in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#57 0x00007fc96d9addc6 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#58 0x00007fc96d9aee7e in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#59 0x00007fc96d99c039 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/tarabostes-delectus/build/lib/libCling.so
#60 0x00007fc96d8a0249 in HandleInterpreterException (metaProcessor=<optimized out>, input_line=<optimized out>, compRes=
0x7fffb5c7f21c: cling::Interpreter::kSuccess, result=result
entry=0x7fffb5c7f340) at /home/tarabostes-delectus/root/core/metacling/src/TCling.cxx:1886
#61 0x00007fc96d8affe6 in TCling::ProcessLine (this=0x1132490, line=<optimized out>, error=0x7fffb5c802bc) at /home/tarabostes-delectus/root/core/metacling/src/TCling.cxx:2033
#62 0x00007fc96d8a2fdd in TCling::ProcessLineSynch (this=0x1132490, line=0x6ad7270 ".X  /home/tarabostes-delectus/build/macros/AT.C", error=0x7fffb5c802bc) at /home/tarabostes-delectus/root/core/metacling/src/TCling.cxx:2885
#63 0x00007fc9725fb197 in TApplication::ExecuteFile (file=<optimized out>, error=0x7fffb5c802bc, keep=<optimized out>) at /home/tarabostes-delectus/root/core/base/src/TApplication.cxx:1137
#64 0x00007fc9725fd183 in TApplication::ProcessLine (this=0x1122a60, line=<optimized out>, sync=<optimized out>, err=0x7fffb5c802bc) at /home/tarabostes-delectus/root/core/base/src/TApplication.cxx:982
#65 0x00007fc972a2b59e in TRint::ProcessLineNr (this=this
entry=0x1122a60, filestem=filestem
entry=0x7fc972a3b355 "ROOT_prompt_", line=0x7fffb5c80379 ".x AT.C", error=0x7fffb5c802bc, error
entry=0x0) at /home/tarabostes-delectus/root/core/rint/src/TRint.cxx:756
#66 0x00007fc972a2b83f in TRint::HandleTermInput (this=0x1122a60) at /home/tarabostes-delectus/root/core/rint/src/TRint.cxx:602
#67 0x00007fc97270e4cd in TUnixSystem::CheckDescriptors (this=this
entry=0x10d84f0) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:1321
#68 0x00007fc97270f79b in TUnixSystem::DispatchOneEvent (this=0x10d84f0, pendingOnly=<optimized out>) at /home/tarabostes-delectus/root/core/unix/src/TUnixSystem.cxx:1076
#69 0x00007fc97265c994 in TSystem::InnerLoop (this=0x10d84f0) at /home/tarabostes-delectus/root/core/base/src/TSystem.cxx:410
#70 0x00007fc97265b5af in TSystem::Run (this=0x10d84f0) at /home/tarabostes-delectus/root/core/base/src/TSystem.cxx:360
#71 0x00007fc9725f944f in TApplication::Run (this=this
entry=0x1122a60, retrn=retrn
entry=false) at /home/tarabostes-delectus/root/core/base/src/TApplication.cxx:1153
#72 0x00007fc972a2cd62 in TRint::Run (this=this
entry=0x1122a60, retrn=retrn
entry=false) at /home/tarabostes-delectus/root/core/rint/src/TRint.cxx:455
#73 0x0000000000400bbc in main (argc=<optimized out>, argv=0x7fffb5c82708) at /home/tarabostes-delectus/root/main/src/rmain.cxx:30
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6  0x0000000000000000 in ?? ()
#7  0x00007fc967085144 in ?? ()
#8  0x00000000063da110 in ?? ()
#9  0x00000000063d0950 in ?? ()
#10 0x0000000001c1a420 in ?? ()
#11 0x000000000957f0c0 in ?? ()
#12 0x0000000001c1aa10 in ?? ()
#13 0x000000000957f3d0 in ?? ()
#14 0x000000000957f860 in ?? ()
#15 0x0000000001e85db0 in ?? ()
#16 0x0000000009580d50 in ?? ()
#17 0x0000000009581300 in ?? ()
#18 0x0000000001e861a0 in ?? ()
#19 0x000000000957be00 in ?? ()
#20 0x000000000955b020 in ?? ()
#21 0x0000000001e86590 in ?? ()
#22 0x000000000955b390 in ?? ()
#23 0x000000000955b780 in ?? ()
#24 0x000000000901b1b0 in ?? ()
#25 0x00000000092b35a0 in ?? ()
#26 0x00000000088525e0 in ?? ()
#27 0x0000000008aea9d0 in ?? ()
#28 0x0000000008d82dc0 in ?? ()
#29 0x00000000095509d0 in ?? ()
#30 0x0000000009560920 in ?? ()
#31 0x000000000956ffb0 in ?? ()
#32 0x0000000001e86b30 in ?? ()
#33 0x4419000042c40000 in ?? ()
#34 0x43dd000043000000 in ?? ()
#35 0x43ed80004410c000 in ?? ()
#36 0x0000000001e870d0 in ?? ()
#37 0x0000000006c75ae0 in ?? ()
#38 0x0000000006c12a00 in ?? ()
#39 0x0005307bb5c7ed40 in ?? ()
#40 0x3fe051eb851eb852 in ?? ()
#41 0x0000000006bf5870 in ?? ()
#42 0x0000000009582440 in ?? ()
#43 0x0005307b716302bc in ?? ()
#44 0x00000000095827b0 in ?? ()
#45 0x0000000009582b20 in ?? ()
#46 0x00000000085ba1f0 in ?? ()
#47 0x00007fc972c69000 in ?? ()
#48 0x00007fffb5c7ed40 in ?? ()
#49 0x00007fffb5c7ed70 in ?? ()
#50 0x0000000005b08e50 in ?? ()
#51 0x00007fffb5c7f340 in ?? ()
#52 0x00007fffb5c7ed90 in ?? ()
#53 0x00007fc96d911649 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) [clone .part.279] () from /home/tarabostes-delectus/build/lib/libCling.so
#54 0x00007fc96d9149ed in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/tarabostes-delectus/build/lib/libCling.so
#55 0x00007fc96d914c41 in cling::Interpreter::echo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#56 0x00007fc96d9a264a in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#57 0x00007fc96d9addc6 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#58 0x00007fc96d9aee7e in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/tarabostes-delectus/build/lib/libCling.so
#59 0x00007fc96d99c039 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/tarabostes-delectus/build/lib/libCling.so
#60 0x00007fc96d8a0249 in HandleInterpreterException (metaProcessor=<optimized out>, input_line=<optimized out>, compRes=
0x7fffb5c7f21c: cling::Interpreter::kSuccess, result=result
entry=0x7fffb5c7f340) at /home/tarabostes-delectus/root/core/metacling/src/TCling.cxx:1886
===========================================================


Do you maybe have any clue what is going wrong there?

Also, when I execute the code again, no histogram of the data from the tree appears, but the histograms of the FFT parts appear.

Edit: I have managed to stop the macro from reporting errors by just using the tree->Draw command. However, the histograms that contain the FFT result have to be rebinned in order for some structure to be read off. Is there some way to look at the vector that holds the amplitudes of the frequencies? Also, do the same adjustments to the axes have to be done here as in the case of histograms (I am following the FFT tutorial from here https://root.cern.ch/root/html/tutorials/fft/FFT.C.html)

Edit2: Found how to modify the ranges in order to read something useful from the FFT histograms. The only questions that remain are:

  1. Do the same operations (that were needed for the axes of the histograms) have to be done here too?

  2. Is there some way to look at the output vector of the FFT?

Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.