GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » R3BRoot » Installation and Compilation » R3B classes unknown in root macro
R3B classes unknown in root macro [message #18852] Thu, 07 January 2016 14:02 Go to next message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *gsi.de
Hi Dima,

thanks for solving the compiler issue. Next problem:

The root interpreter doesn't know the R3B classes like R3BUcesbSource:

rplag@lxg0858:~/R3BRoot/macros/r3b/unpack/s438b$ root -l
root [0] .L unpack_ucesb.C
In file included from input_line_9:1:
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:36:2: error: unknown type name 'R3BUcesbSource'
R3BUcesbSource* source = new R3BUcesbSource(filename, ntuple_options,
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:36:31: error: unknown type name 'R3BUcesbSource'
R3BUcesbSource* source = new R3BUcesbSource(filename, ntuple_options,
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:39:24: error: unknown type name 'R3BUnpackReader'
source->AddReader(new R3BUnpackReader(&ucesb_struct));
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:45:2: error: unknown type name 'FairRunOnline'
FairRunOnline* run = new FairRunOnline(source);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:45:27: error: unknown type name 'FairRunOnline'
FairRunOnline* run = new FairRunOnline(source);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:51:2: error: unknown type name 'R3BAladinFieldMap'
R3BAladinFieldMap* magField = new R3BAladinFieldMap("AladinMaps");
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:51:36: error: unknown type name 'R3BAladinFieldMap'
R3BAladinFieldMap* magField = new R3BAladinFieldMap("AladinMaps");
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:59:2: error: unknown type name 'R3BLandRawAna'
R3BLandRawAna* ana = new R3BLandRawAna("LandRawAna", 1);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:59:27: error: unknown type name 'R3BLandRawAna'
R3BLandRawAna* ana = new R3BLandRawAna("LandRawAna", 1);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:65:2: error: use of undeclared identifier 'FairLogger'
FairLogger::GetLogger()->SetLogScreenLevel("INFO");
^

I tried to include("r3bucesbsource.h") but it doesn't even know the include path (and it needs to include files from many locations like even the ucesb hbook directory). So that can't be the option...

Cheers,
Ralf


Re: R3B classes unknown in root macro [message #18854 is a reply to message #18852] Thu, 07 January 2016 14:07 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: 93.77.23*
Hi Ralf,

In this case all R3BRoot / FairRoot related classes are not known. Did you call the configuration script? Just run "echo ${LD_LIBRARY_PATH}" and your R3B library directory should be in the list.

Cheers,
Dima
Re: R3B classes unknown in root macro [message #18855 is a reply to message #18852] Thu, 07 January 2016 14:13 Go to previous messageGo to next message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *gsi.de
Yes, I did run config.sh. And the library path seems to be ok, see end of output:


rplag@lxg0858:~$ cd build
rplag@lxg0858:~/build$ . ./config.sh
System during compilation: Debian GNU/Linux 7.9 (wheezy)
x86_64
System now : Debian GNU/Linux 7.9 (wheezy)
x86_64
rplag@lxg0858:~/build$ module use /cvmfs/it.gsi.de/modulefiles/
rplag@lxg0858:~/build$ module load compiler/gcc/4.8.4
rplag@lxg0858:~/build$ export CXX=g++
rplag@lxg0858:~/build$ root -l ../R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C
root [0]
Processing ../R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C...
In file included from input_line_9:1:
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:36:2: error: unknown type name 'R3BUcesbSource'
R3BUcesbSource* source = new R3BUcesbSource(filename, ntuple_options,
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:36:31: error: unknown type name 'R3BUcesbSource'
R3BUcesbSource* source = new R3BUcesbSource(filename, ntuple_options,
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:39:24: error: unknown type name 'R3BUnpackReader'
source->AddReader(new R3BUnpackReader(&ucesb_struct));
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:45:2: error: unknown type name 'FairRunOnline'
FairRunOnline* run = new FairRunOnline(source);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:45:27: error: unknown type name 'FairRunOnline'
FairRunOnline* run = new FairRunOnline(source);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:51:2: error: unknown type name 'R3BAladinFieldMap'
R3BAladinFieldMap* magField = new R3BAladinFieldMap("AladinMaps");
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:51:36: error: unknown type name 'R3BAladinFieldMap'
R3BAladinFieldMap* magField = new R3BAladinFieldMap("AladinMaps");
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:59:2: error: unknown type name 'R3BLandRawAna'
R3BLandRawAna* ana = new R3BLandRawAna("LandRawAna", 1);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:59:27: error: unknown type name 'R3BLandRawAna'
R3BLandRawAna* ana = new R3BLandRawAna("LandRawAna", 1);
^
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:65:2: error: use of undeclared identifier 'FairLogger'
FairLogger::GetLogger()->SetLogScreenLevel("INFO");
^
root [1] .q
rplag@lxg0858:~/build$ echo $LD_LIBRARY_PATH
/cvmfs/it.gsi.de/compiler/gcc/4.8.4/lib64:/u/rplag/build/lib:/cvmfs/fair root.gsi.de/gcc_4.8.4/fairroot/v-15.11_fairsoft-nov15p1_root6/lib:/cvmfs /fairroot.gsi.de/gcc_4.8.4/fairsoft/nov15p1_root6/lib/root:/cvmfs/fairro ot.gsi.de/gcc_4.8.4/fairsoft/nov15p1_root6/lib
Re: R3B classes unknown in root macro [message #18857 is a reply to message #18855] Thu, 07 January 2016 14:18 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: 93.77.23*
Please try:

root -l
[] .L unpack_ucesb.C
[] unpack_ucesb()
Re: R3B classes unknown in root macro [message #18858 is a reply to message #18857] Thu, 07 January 2016 14:23 Go to previous messageGo to next message
Bastian Löher is currently offline  Bastian Löher
Messages: 8
Registered: October 2015
occasional visitor
From: *gsi.de
Please show the output of

> which root
Re: R3B classes unknown in root macro [message #18859 is a reply to message #18857] Thu, 07 January 2016 14:23 Go to previous messageGo to next message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *gsi.de
I already tried but this makes no difference.

rplag@lxg0858:~/R3BRoot/macros/r3b/unpack/s438b$ root -l
root [0] .L unpack_ucesb.C
In file included from input_line_9:1:
/u/rplag/R3BRoot/macros/r3b/unpack/s438b/unpack_ucesb.C:36:2: error: unknown type name 'R3BUcesbSource'
R3BUcesbSource* source = new R3BUcesbSource(filename, ntuple_options,
^
[...]

Interestingly, I can still run the r3bsim macro:

rplag@lxg0858:~/R3BRoot/macros/r3b$ root -l r3bsim.C
root [0]
Processing r3bsim.C...
[INFO ] FairRootManager::OpenOutFile("r3bsim.root")
[INFO ] Media file used: /u/rplag/R3BRoot/geometry/media_r3b.geo
[INFO ] ============== FairRunSim: Initialising simulation run ==============
Info in <TGeoManager::TGeoManager>: Geometry FAIRGeom, FAIR geometry created
[INFO ] FairGeoMedia: Read media
[...]

[Updated on: Thu, 07 January 2016 14:24]

Report message to a moderator

Re: R3B classes unknown in root macro [message #18860 is a reply to message #18858] Thu, 07 January 2016 14:27 Go to previous messageGo to next message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *gsi.de
rplag@lxg0858:~/R3BRoot/macros/r3b$ which root
/cvmfs/fairroot.gsi.de/gcc_4.8.4/fairsoft/nov15p1_root6/bin/root
Re: R3B classes unknown in root macro [message #18861 is a reply to message #18852] Thu, 07 January 2016 14:35 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: 93.77.23*
Was your r3bsource directory compiled? Please check the output of cmake configuration (whether UCESB was found) and the corresponding libR3Bsource.so library in the R3BRoot lib dir.

Cheers,
Dima
Re: R3B classes unknown in root macro [message #18863 is a reply to message #18861] Thu, 07 January 2016 15:06 Go to previous messageGo to next message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *gsi.de
Ah! Thanks! Now we are getting closer...
I had set UCESB_PATH but UCESB_DIR was required *facepalm*

After fixing this, I still get the following config output:

-- Looking for ucesb...
- UCESB_DIR = /u/rplag/ucesb/unpacker
- ucesb_INCLUDE_DIR = /u/rplag/ucesb/unpacker/hbook
- ucesb_LIBRARY_SHARED = ext_data_clnt
- ucesb_LIBRARY_STATIC = ext_data_clnt.o
- ucesb_LIBRARY_DIR = ucesb_LIBRARY_DIR-NOTFOUND
-- Looking for ucesb... - Not found

I have now set:

echo $UCESB_DIR
/u/rplag/ucesb/unpacker

I'm wondering whether my ucesb directory structure is fine: My 'upexps' is on the same level as 'unpacker'. I have compiled and working: unpacker/empty and upexps/s438b. What exactly is the config script looking for?

rplag@lxg0858:~/ucesb$ ls
unpacker unpackexps upexps

Cheers,
Ralf
Re: R3B classes unknown in root macro [message #18865 is a reply to message #18863] Thu, 07 January 2016 15:22 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: 93.77.23*
This is the fragment from R3BRoot/cmake/modules/Finducesb.cmake :

find_path(ucesb_LIBRARY_DIR NAMES "lib${ucesb_LIBRARY_SHARED}.so"
PATHS $ENV{UCESB_DIR}
$ENV{UCESB_DIR}/hbook
NO_DEFAULT_PATH
DOC "Path to ucesb library files."
)

find_library(ucesb_LIBRARY_STATIC NAMES ${ucesb_LIBRARY_STATIC}
PATHS $ENV{UCESB_DIR}/hbook
NO_DEFAULT_PATH
DOC "Path to ${LIBucesb_STATIC}."
)


It means that libext_data_clnt.so and ext_data_clnt.o have to be in UCESB_DIR/hbook

Cheers,
Dima
Re: R3B classes unknown in root macro [message #18866 is a reply to message #18863] Thu, 07 January 2016 15:24 Go to previous messageGo to next message
Dmytro Kresan is currently offline  Dmytro Kresan
Messages: 166
Registered: June 2004
first-grade participant
From: 93.77.23*
Since you have solved your UCESB_DIR issue, I would also recommend to try with completely fresh build directory.
Re: R3B classes unknown in root macro [message #18868 is a reply to message #18866] Fri, 08 January 2016 10:52 Go to previous message
Ralf Plag is currently offline  Ralf Plag
Messages: 25
Registered: September 2015
continuous participant
From: *hsi13.unitymediagroup.de
Hi Dima,

yup, libext_data_clnt.so was missing. Kinda strange since the struct_writer and root_writer were successfully built. Anyway, another "make struct_writer" in the hbook directory fixed it.
Now, ucesb is found by the config script und the root macro runs.
Thanks again!

Ralf

Previous Topic: Problem with Geant4
Next Topic: error in dfcln.h with external packages
Goto Forum:
  


Current Time: Sat Nov 30 06:44:37 CET 2024

Total time taken to generate the page: 0.00649 seconds