GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » R3BRoot » Data Analysis » error undefined symbol TSpectrum (error undefined symbol TSpectrum)
error undefined symbol TSpectrum [message #21949] Thu, 14 December 2017 13:26 Go to next message
EliGaliana is currently offline  EliGaliana
Messages: 4
Registered: December 2017
Location: USC
occasional visitor
From: *usc.es

Hi,
In the FinishTaks() method of class R3BCalifaMapped2CrystalCalPar.cxx (which is a FairTask) I implemented a TSpectrum call in order to find some calibration parameters, such as,

#include <TSpectrum.h>
...
TSpectrum *ss = new TSpectrum(fNumPeaks);
for (Int_t i=0;i<fNumCrystals;i++){

nfound = ss->Search(fh_raw_energy_crystal[i],fSigma,"",fThreshold);
fChannelPeaks = (Double_t*) ss->GetPositionX();
TMath::Sort(nfound, fChannelPeaks, idx, kTRUE);
...
}
When I compile everything is ok. However, when I try to run the macro using the fairtask R3BCalifaMapped2CrystalCalPar, appears the following error:

/home/fpddv1/elisabet.galiana/Escritorio/FairSoft/FairSoft_Install/bin/r oot.exe: symbol lookup error: /home/fpddv1/elisabet.galiana/Escritorio/R3BRoot/R3BRoot_build/lib/libR3 BCalifa.so.SOVERSION: undefined symbol: _ZN9TSpectrumC1Eid

I have checked for another usages of TSpectrum in R3BRoot and I found that in tof/R3BTofdCal2HitPar.cxx it is used but currently commented out.
In addition, I try to solve it by introducing the solution found in the ROOT forum: https://root-forum.cern.ch/t/undefined-symbol-with-tspectrum/24109 but it doesn't work either.

Could you give me some light about it, please?

Many thanks in advance.
Re: error undefined symbol TSpectrum [message #21952 is a reply to message #21949] Thu, 14 December 2017 13:38 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: *gsi.de
Hi,

The ROOT class TSpectrum is compiled into shared library libSpectrum.so. In order that your code works, you need to specify a dependency of libR3BCalifa.so on libSpectrum.so. To do so, open califa/CMakeLists.txt and change lines 62-63 to the following:

set(DEPENDENCIES
    Spectrum R3Bbase R3BData R3BPassive R3BXBall)


Best regards,
Dima
Re: error undefined symbol TSpectrum [message #21954 is a reply to message #21952] Thu, 14 December 2017 15:37 Go to previous message
EliGaliana is currently offline  EliGaliana
Messages: 4
Registered: December 2017
Location: USC
occasional visitor
From: *usc.es
Hi Dima,

Many thanks! now it is working without problems.

Cheers,
Eli
Previous Topic: UCESB multi-dimensional array
Next Topic: reading container parameter
Goto Forum:
  


Current Time: Tue Dec 03 21:22:20 CET 2024

Total time taken to generate the page: 0.00868 seconds