GSI Forum - RDF feed
https://forum.gsi.de/index.php
error undefined symbol TSpectrum
https://forum.gsi.de/index.phpindex.php?t=rview&goto=21949&th=5926#msg_21949
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.]]>EliGaliana2017-12-14T12:26:21-00:00Re: error undefined symbol TSpectrum
https://forum.gsi.de/index.phpindex.php?t=rview&goto=21952&th=5926#msg_21952
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:
Best regards,
Dima
]]>Dmytro Kresan2017-12-14T12:38:44-00:00Re: error undefined symbol TSpectrum
https://forum.gsi.de/index.phpindex.php?t=rview&goto=21954&th=5926#msg_21954
Many thanks! now it is working without problems.
Cheers,
Eli
]]>EliGaliana2017-12-14T14:37:33-00:00