GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: error undefined symbol TSpectrum
items: Re: error undefined symbol TSpectrum

error undefined symbol TSpectrum
type: item
description: 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.
creator: EliGaliana
date: 2017-12-14T12:26:21-00:00

Re: error undefined symbol TSpectrum
type: item
description: 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
creator: Dmytro Kresan
date: 2017-12-14T12:38:44-00:00

Re: error undefined symbol TSpectrum
type: item
description: Hi Dima, Many thanks! now it is working without problems. Cheers, Eli
creator: EliGaliana
date: 2017-12-14T14:37:33-00:00