Compile errors running "tutorials/eve/alice_esd_split.C"

I get the following errors when running the example. Any ideas of what I may be missing?
Thank you. -Pietro

root alice_esd_split.C
   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/02                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Oct 16 2020, 10:01:00                 |
  | From tag , 17 August 2020                                        |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 
Processing alice_esd_split.C...
Info in <TUnixSystem::ACLiC>: creating shared library /home/pbr/root_src/tutorials/eve/SplitGLView_C.so
In file included from input_line_12:6:
./root_src/tutorials/eve/SplitGLView.C:304:4: error: use of undeclared identifier 'gVirtualX'
   gVirtualX->Update();
   ^
./root_src/tutorials/eve/SplitGLView.C:1021:29: error: use of undeclared identifier 'TROOT'
            TString rootx = TROOT::GetBinDir() + "/root -a &";
                            ^
./root_src/tutorials/eve/SplitGLView.C:1082:7: error: use of undeclared identifier 'gVirtualX'
      gVirtualX->TranslateCoordinates(actViewer->GetFrame()->GetId(),
      ^
./root_src/tutorials/eve/SplitGLView.C:1231:10: error: use of undeclared identifier 'gVirtualX'
         gVirtualX->SetInputFocus(ev->GetGLWidget()->GetId());
         ^
Error in <ACLiC>: Executing '/home/pbr/anaconda3/envs/pbr_env_38/bin/rootcling -v0 "--lib-list-prefix=/home/pbr/root_src/tutorials/eve/SplitGLView_C_ACLiC_map" -f "/home/pbr/root_src/tutorials/eve/SplitGLView_C_ACLiC_dict.cxx" -I$ROOTSYS/include -I"/home/pbr/anaconda3/envs/pbr_env_38/etc/" -I"/home/pbr/anaconda3/envs/pbr_env_38/etc//cling" -I"/home/pbr/anaconda3/envs/pbr_env_38/include/" -I"/home/pbr/anaconda3/envs/pbr_env_38/include" -D__ACLIC__  "/home/pbr/root_src/tutorials/eve/SplitGLView.C" "/home/pbr/root_src/tutorials/eve/SplitGLView_C_ACLiC_linkdef.h"' failed!
In file included from input_line_16:1:
./alice_esd_split.C:183:21: error: member access into incomplete type 'AliESDEvent'
      TIter next(esd->fESDObjects);
                    ^
aliesdProjectDict dictionary forward declarations' payload:30:430: note: forward declaration of 'AliESDEvent'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDEvent;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:191:57: error: member access into incomplete type 'AliESDEvent'
            esd_tree->SetBranchAddress("ESDfriend.", esd->fESDObjects->GetObjectRef(el));
                                                        ^
aliesdProjectDict dictionary forward declarations' payload:30:430: note: forward declaration of 'AliESDEvent'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDEvent;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:195:50: error: member access into incomplete type 'AliESDEvent'
            esd_tree->SetBranchAddress(bname, esd->fESDObjects->GetObjectRef(el));
                                                 ^
aliesdProjectDict dictionary forward declarations' payload:30:430: note: forward declaration of 'AliESDEvent'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDEvent;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:407:46: error: member access into incomplete type 'AliESDEvent'
   AliESDRun    *esdrun = (AliESDRun*)    esd->fESDObjects->FindObject("AliESDRun");
                                             ^
aliesdProjectDict dictionary forward declarations' payload:30:430: note: forward declaration of 'AliESDEvent'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDEvent;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:408:46: error: member access into incomplete type 'AliESDEvent'
   TClonesArray *tracks = (TClonesArray*) esd->fESDObjects->FindObject("Tracks");
                                             ^
aliesdProjectDict dictionary forward declarations' payload:30:430: note: forward declaration of 'AliESDEvent'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDEvent;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:426:38: error: member access into incomplete type 'AliESDRun'
   trkProp->SetMagField( 0.1 * esdrun->fMagneticField ); // kGaus to Tesla
                                     ^
aliesdProjectDict dictionary forward declarations' payload:6:428: note: forward declaration of 'AliESDRun'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDRun;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:435:30: error: cannot initialize a variable of type 'AliExternalTrackParam *' with an lvalue of type 'AliESDtrack *'
      AliExternalTrackParam* tp = at;
                             ^    ~~
./alice_esd_split.C:437:17: error: member access into incomplete type 'AliESDtrack'
         tp = at->fIp;
                ^
aliesdProjectDict dictionary forward declarations' payload:18:430: note: forward declaration of 'AliESDtrack'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDtrack;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:470:22: error: assigning to 'AliExternalTrackParam *' from incompatible type 'AliESDtrack *'
   if (tp == 0) tp = at;
                     ^~
./alice_esd_split.C:472:19: error: member access into incomplete type 'AliESDtrack'
   rt.fLabel  = at->fLabel;
                  ^
aliesdProjectDict dictionary forward declarations' payload:18:430: note: forward declaration of 'AliESDtrack'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDtrack;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:474:27: error: member access into incomplete type 'AliESDtrack'
   rt.fStatus = (Int_t) at->fFlags;
                          ^
aliesdProjectDict dictionary forward declarations' payload:18:430: note: forward declaration of 'AliESDtrack'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDtrack;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:475:20: error: member access into incomplete type 'AliExternalTrackParam'
   rt.fSign   = (tp->fP[4] > 0) ? 1 : -1;
                   ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:480:18: error: no matching function for call to 'trackGetP'
   Double_t ep = trackGetP(at);
                 ^~~~~~~~~
./alice_esd_split.C:126:12: note: candidate function not viable: cannot convert argument of incomplete type 'AliESDtrack *' to 'AliExternalTrackParam *' for 1st
      argument
Double_t   trackGetP(AliExternalTrackParam* tp);
           ^
./alice_esd_split.C:497:13: error: member access into incomplete type 'AliESDtrack'
   return (t->fFlags & mask) > 0;
            ^
aliesdProjectDict dictionary forward declarations' payload:18:430: note: forward declaration of 'AliESDtrack'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliESDtrack;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:505:12: error: member access into incomplete type 'AliExternalTrackParam'
  r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
           ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:505:27: error: member access into incomplete type 'AliExternalTrackParam'
  r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
                          ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:505:45: error: member access into incomplete type 'AliExternalTrackParam'
  r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
                                            ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:507:28: error: member access into incomplete type 'AliExternalTrackParam'
  Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha), x=r[0];
                           ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
In file included from input_line_16:1:
./alice_esd_split.C:507:55: error: member access into incomplete type 'AliExternalTrackParam'
  Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha), x=r[0];
                                                      ^
aliesdProjectDict dictionary forward declarations' payload:17:440: note: forward declaration of 'AliExternalTrackParam'
  ...__attribute__((annotate("$clingAutoload$aliesdProjectHeaders.h")))  AliExternalTrackParam;
                                                                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In module 'Eve':
/home/pbr/anaconda3/envs/pbr_env_38/include/TEveVSDStructs.h:146:4: warning: inline function 'TEveRecTrackT<float>::TEveRecTrackT' is not defined [-Wundefined-inline]
   TEveRecTrackT() : fLabel(-1), fIndex(-1), fStatus(0), fSign(0), fV(), fP(), fBeta(0), fDcaXY(0), fDcaZ(0), fPVX(0), f...
   ^
./alice_esd_split.C:468:18: note: used here
   TEveRecTrack  rt;
                 ^
In module 'Eve':
/home/pbr/anaconda3/envs/pbr_env_38/include/TEveVSDStructs.h:147:12: warning: inline function 'TEveRecTrackT<float>::~TEveRecTrackT' is not defined [-Wundefined-inline]
   virtual ~TEveRecTrackT() {}
           ^
./alice_esd_split.C:468:18: note: used here
   TEveRecTrack  rt;
                 ^
In module 'Eve':
/home/pbr/anaconda3/envs/pbr_env_38/include/TEveVector.h:82:9: warning: inline function 'TEveVectorT<float>::Set' is not defined [-Wundefined-inline]
   void Set(const Double_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
        ^
./alice_esd_split.C:477:38: note: used here
   trackGetPos(tp, vbuf);      rt.fV.Set(vbuf);
                                     ^
input_line_18:2:3: error: use of undeclared identifier 'run_alice_esd_split'
 (run_alice_esd_split())
  ^
Error in <HandleInterpreterException>: Error evaluating expression (run_alice_esd_split()).
Execution of your code was aborted.```

_ROOT Version: 6.22/02
_Platform: Debian GNU/Linux 10 (buster)
_Compiler: g++ (Debian 8.3.0-6) 8.3.0

Hi Pietro,

There are several problems in this example.
First of all, there are two missing includes in SplitGLView.C macro:

#include "TVirtualX.h"
#include "TROOT.h"

But also macro alice_esd_split.C itself does not work properly - seems to be it was not ported to ROOT6. I attaching modified macros, which are working for me. Just do root run_split.C.
Probably I also update it in repository.

Regards,
Sergey

P.S. Maybe original authors of macro can give more details: @bellenot @matevz

alice_esd_split.C (16.2 KB) run_split.C (3.8 KB) SplitGLView.C (48.5 KB)

1 Like

If you like, you can see in PR #7203.
I also adjust there alice_esd.C macro.

Hi Sergey @linev, thanks so much for the fast reply, it did work! -Pietro

@PBR, look also at alice_vsd.C and MultiView.C … this is what I usually recommend people to start with.

@linev, yes, please commit your fixes to master.

Cheers,
Matevz

Hi @matevz, thanks for the tip.

Just as a -fyi for @linev:
the new alice_esd.C I fetched from the repository has issues that prevent completion.

I first ran into the following error:

run_alice_esd.C:229:21: error: allocation of incomplete type 'MultiView'
   gMultiView = new MultiView;

which I fixed by changing line 131 (was: class MultiView;) with the include below:

#include "MultiView.C"

but that only leads to the following errors and I can’t proceed to completion:

   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/02                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Oct 16 2020, 10:01:00                 |
  | From tag , 17 August 2020                                        |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 
Processing run_alice_esd.C...
*** Opening ESD ***
Info in <TFile::OpenFromCache>: using local cache copy of http://root.cern.ch/files/alice_ESDs.root [./files/alice_ESDs.root]
Warning in <TClass::Init>: no dictionary for class AliFMDMap is available
Warning in <TClass::Init>: no dictionary for class AliESDHeader is available
Warning in <TClass::Init>: no dictionary for class AliESDZDC is available
Warning in <TClass::Init>: no dictionary for class AliESDFMD is available
Warning in <TClass::Init>: no dictionary for class AliFMDFloatMap is available
Warning in <TClass::Init>: no dictionary for class AliESDVZERO is available
Warning in <TClass::Init>: no dictionary for class AliESDTZERO is available
Warning in <TClass::Init>: no dictionary for class AliESDVertex is available
Warning in <TClass::Init>: no dictionary for class AliVertex is available
Warning in <TClass::Init>: no dictionary for class AliMultiplicity is available
Warning in <TClass::Init>: no dictionary for class AliESDCaloTrigger is available
Warning in <TClass::Init>: no dictionary for class AliESDMuonTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDPmdTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDTrdTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDv0 is available
Warning in <TClass::Init>: no dictionary for class AliESDcascade is available
Warning in <TClass::Init>: no dictionary for class AliESDkink is available
Warning in <TClass::Init>: no dictionary for class AliESDCaloCluster is available
Warning in <TClass::Init>: no dictionary for class AliRawDataErrorLog is available
Warning in <TClass::Init>: no dictionary for class AliESDfriendTrack is available
Warning in <TClass::Init>: no dictionary for class AliTrackPointArray is available
IncrementalExecutor::executeFunction: symbol '_ZN11AliESDEventD1Ev' unresolved while linking symbol '__ctor_0'!
You are probably missing the definition of AliESDEvent::~AliESDEvent()
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZN11AliESDEventC1Ev' unresolved while linking symbol '__ctor_0'!
You are probably missing the definition of AliESDEvent::AliESDEvent()
Maybe you need to load the corresponding shared library?
Error in <TClingCallFunc::make_ctor_wrapper>: Failed to compile
  ==== SOURCE BEGIN ====
__attribute__((used)) extern "C" void __ctor_0(void** ret, void* arena, unsigned long nary)
{
   if (!arena) {
      if (!nary) {
         *ret = new AliESDEvent;
      }
      else {
         *ret = new AliESDEvent[nary];
      }
   }
   else {
      if (!nary) {
         *ret = new (arena) AliESDEvent;
      }
      else {
         *ret = new (arena) AliESDEvent[nary];
      }
   }
}

  ==== SOURCE END ====
Error in <TClingCallFunc::ExecDefaultConstructor>: Called with no wrapper, not implemented!
Error in <TClingClassInfo::New()>: Call of default constructor failed to return an object for class: AliESDEvent
Error in <TClass::New>: cannot create object of class AliESDEvent
Error in <TBufferFile::ReadObject>: could not create object of class AliESDEvent
Error in <TBufferFile::CheckByteCount>: object of class TList read too few bytes: 102 instead of 505636
#0  0x00007f248575d437 in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f24856db5df in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f2485e44894 in TUnixSystem::StackTrace() () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#3  0x00007f248153a4d8 in cling::MultiplexInterpreterCallbacks::PrintStackTrace() () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#4  0x00007f2481539dc0 in cling_runtime_internal_throwIfInvalidPointer () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#5  0x00007f2480e92eb9 in ?? ()
#6  0x000056360d815fb8 in ?? ()
#7  0x00007f248258bacb in llvm::SectionMemoryManager::applyMemoryGroupPermissions(llvm::SectionMemoryManager::MemoryGroup&, unsigned int) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#8  0x0000000000000080 in ?? ()
#9  0x000056360edf15f0 in ?? ()
#10 0x00007f2483d8c7f2 in llvm::StringMapImpl::FindKey(llvm::StringRef) const () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#11 0x00007f24815b1866 in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::RTDyldObjectLinkingLayer::ConcreteLinkedObject<std::shared_ptr<llvm::RuntimeDyld::MemoryManager>, std::shared_ptr<llvm::JITSymbolResolver>, llvm::orc::RTDyldObjectLinkingLayer::addObject(std::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile> >, std::shared_ptr<llvm::JITSymbolResolver>)::{lambda(std::_List_iterator<std::unique_ptr<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject, std::default_delete<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject> > >, llvm::RuntimeDyld&, std::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile> > const&, std::function<void ()>)#1}>::getSymbolMaterializer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#12 0x00007f24815bc32f in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::LazyEmittingLayer<llvm::orc::IRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler> >::EmissionDeferredModule::find(llvm::StringRef, bool, llvm::orc::IRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler>&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#13 0x00007f24815b0b15 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#14 0x00007f248153bd3a in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#15 0x00007f248153f2ea 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/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#16 0x00007f24816090b9 in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#17 0x00007f2481619778 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#18 0x00007f2481619a67 in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#19 0x00007f24816022b0 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#20 0x00007f24814a4ae0 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#21 0x00007f24814b9b06 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#22 0x00007f24814b9f72 in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#23 0x00007f2485ce1bd6 in TApplication::ExecuteFile(char const*, int*, bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#24 0x00007f2485ce13c7 in TApplication::ProcessLine(char const*, bool, int*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#25 0x00007f2485ff45f2 in TRint::ProcessLineNr(char const*, char const*, int*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libRint.so.6.22
#26 0x00007f2485ff618d in TRint::Run(bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libRint.so.6.22
#27 0x000056360be1fbaf in main ()
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
In file included from input_line_11:1:
/home/pbr/run_alice_esd.C:161:15: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
   esd_objs = esd->fESDObjects;
              ^~~

Hi,

This should be not necessary - MultiView.C macro should be loaded and compiled when running
alice_esd.C. I will try to check that happens with 6.22/02 version

Strange, but I cannot reproduce error with 6.22 version.
Which OS/compiler version your are using?

I am using one from a conda distribution, pls. see below (but the same happens with a manual install of “ROOT 6.22/07” and “gcc version 8.3.0 (Debian 8.3.0-6)”)

g++ -v
Reading specs from /home/pbr/anaconda3/envs/pbr_env_38/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/pbr/anaconda3/envs/pbr_env_38/bin/../libexec/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/lto-wrapper
Target: x86_64-conda_cos6-linux-gnu
Configured with: /home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda_cos6-linux-gnu --prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built --with-sysroot=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.23.0.449-a04d0' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpfr=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-mpc=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --with-isl=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/.build/x86_64-conda_cos6-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/rdonnelly/mc/conda-bld/compilers_linux-64_1534865402226/work/gcc_built/x86_64-conda_cos6-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 7.3.0 (crosstool-NG 1.23.0.449-a04d0)

Can you try to copy recent tutorial into separate directory and try again?
I saw strange effect that after using alice_esd_split.C macro I was not able to run alice_esd.C - got many errors. Only after I clean all generated files and libraries it works for me.

Hi Sergey,
I created a “tmp” directory one level down with some logical links to the relevant sources and nothing else.

If I roll back line 131 to class MultiView; I get the same error as before:

(pbr_env_38) pbr@debian-cern-root:~/tmp$ ls -lrt
total 0
lrwxrwxrwx 1 pbr pbr 14 Feb 14 14:24 MultiView.C -> ../MultiView.C
lrwxrwxrwx 1 pbr pbr 27 Feb 14 14:24 alice_esd_html_summary.C -> ../alice_esd_html_summary.C
lrwxrwxrwx 1 pbr pbr 18 Feb 14 14:24 run_alice_esd.C -> ../run_alice_esd.C
lrwxrwxrwx 1 pbr pbr 14 Feb 14 14:25 alice_esd.C -> ../alice_esd.C
(pbr_env_38) pbr@debian-cern-root:~/tmp$ root run_alice_esd.C
   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/02                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Oct 16 2020, 10:01:00                 |
  | From tag , 17 August 2020                                        |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 
Processing run_alice_esd.C...
In file included from input_line_11:1:
/home/pbr/run_alice_esd.C:229:21: error: allocation of incomplete type 'MultiView'
   gMultiView = new MultiView;
                    ^~~~~~~~~
/home/pbr/run_alice_esd.C:131:7: note: forward declaration of 'MultiView'
class MultiView;                       // #include "MultiView.C"
      ^
/home/pbr/run_alice_esd.C:231:14: error: member access into incomplete type 'MultiView'
   gMultiView->ImportGeomRPhi(gGeomGentle);
             ^
/home/pbr/run_alice_esd.C:131:7: note: forward declaration of 'MultiView'
class MultiView;                       // #include "MultiView.C"

If I put the “include” back in, it goes a little further, but I get the same as before:

(pbr_env_38) pbr@debian-cern-root:~/tmp$ root run_alice_esd.C
   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/02                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Oct 16 2020, 10:01:00                 |
  | From tag , 17 August 2020                                        |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 
Processing run_alice_esd.C...
*** Opening ESD ***
[TFile::Cp] Total 0.83 MB	|====================| 100.00 % [1.0 MB/s]
Info in <TFile::OpenFromCache>: using local cache copy of http://root.cern.ch/files/alice_ESDs.root [./files/alice_ESDs.root]
Warning in <TClass::Init>: no dictionary for class AliFMDMap is available
Warning in <TClass::Init>: no dictionary for class AliESDHeader is available
Warning in <TClass::Init>: no dictionary for class AliESDZDC is available
Warning in <TClass::Init>: no dictionary for class AliESDFMD is available
Warning in <TClass::Init>: no dictionary for class AliFMDFloatMap is available
Warning in <TClass::Init>: no dictionary for class AliESDVZERO is available
Warning in <TClass::Init>: no dictionary for class AliESDTZERO is available
Warning in <TClass::Init>: no dictionary for class AliESDVertex is available
Warning in <TClass::Init>: no dictionary for class AliVertex is available
Warning in <TClass::Init>: no dictionary for class AliMultiplicity is available
Warning in <TClass::Init>: no dictionary for class AliESDCaloTrigger is available
Warning in <TClass::Init>: no dictionary for class AliESDMuonTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDPmdTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDTrdTrack is available
Warning in <TClass::Init>: no dictionary for class AliESDv0 is available
Warning in <TClass::Init>: no dictionary for class AliESDcascade is available
Warning in <TClass::Init>: no dictionary for class AliESDkink is available
Warning in <TClass::Init>: no dictionary for class AliESDCaloCluster is available
Warning in <TClass::Init>: no dictionary for class AliRawDataErrorLog is available
Warning in <TClass::Init>: no dictionary for class AliESDfriendTrack is available
Warning in <TClass::Init>: no dictionary for class AliTrackPointArray is available
IncrementalExecutor::executeFunction: symbol '_ZN11AliESDEventD1Ev' unresolved while linking symbol '__ctor_1'!
You are probably missing the definition of AliESDEvent::~AliESDEvent()
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZN11AliESDEventC1Ev' unresolved while linking symbol '__ctor_1'!
You are probably missing the definition of AliESDEvent::AliESDEvent()
Maybe you need to load the corresponding shared library?
Error in <TClingCallFunc::make_ctor_wrapper>: Failed to compile
  ==== SOURCE BEGIN ====
__attribute__((used)) extern "C" void __ctor_1(void** ret, void* arena, unsigned long nary)
{
   if (!arena) {
      if (!nary) {
         *ret = new AliESDEvent;
      }
      else {
         *ret = new AliESDEvent[nary];
      }
   }
   else {
      if (!nary) {
         *ret = new (arena) AliESDEvent;
      }
      else {
         *ret = new (arena) AliESDEvent[nary];
      }
   }
}

  ==== SOURCE END ====
Error in <TClingCallFunc::ExecDefaultConstructor>: Called with no wrapper, not implemented!
Error in <TClingClassInfo::New()>: Call of default constructor failed to return an object for class: AliESDEvent
Error in <TClass::New>: cannot create object of class AliESDEvent
Error in <TBufferFile::ReadObject>: could not create object of class AliESDEvent
Error in <TBufferFile::CheckByteCount>: object of class TList read too few bytes: 102 instead of 505636
#0  0x00007fc7e9e5f437 in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fc7e9ddd5df in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fc7ea546894 in TUnixSystem::StackTrace() () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#3  0x00007fc7e5c3c4d8 in cling::MultiplexInterpreterCallbacks::PrintStackTrace() () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#4  0x00007fc7e5c3bdc0 in cling_runtime_internal_throwIfInvalidPointer () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#5  0x00007fc7e5594eb9 in ?? ()
#6  0x000055e813e3bdc0 in ?? ()
#7  0x000055e813ef5460 in ?? ()
#8  0x000055e813926b50 in ?? ()
#9  0x00007fc7e6c8fa10 in std::_Rb_tree<llvm::object::SectionRef, std::pair<llvm::object::SectionRef const, unsigned int>, std::_Select1st<std::pair<llvm::object::SectionRef const, unsigned int> >, std::less<llvm::object::SectionRef>, std::allocator<std::pair<llvm::object::SectionRef const, unsigned int> > >::_M_erase(std::_Rb_tree_node<std::pair<llvm::object::SectionRef const, unsigned int> >*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#10 0x00007fff874d8b70 in ?? ()
#11 0x00007fff874d8e00 in ?? ()
#12 0x0000000000000015 in ?? ()
#13 0x000055e813b9e740 in ?? ()
#14 0x000055e813e16270 in ?? ()
#15 0x000055e813926b50 in ?? ()
#16 0x00007fc7e5cb3866 in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::RTDyldObjectLinkingLayer::ConcreteLinkedObject<std::shared_ptr<llvm::RuntimeDyld::MemoryManager>, std::shared_ptr<llvm::JITSymbolResolver>, llvm::orc::RTDyldObjectLinkingLayer::addObject(std::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile> >, std::shared_ptr<llvm::JITSymbolResolver>)::{lambda(std::_List_iterator<std::unique_ptr<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject, std::default_delete<llvm::orc::RTDyldObjectLinkingLayerBase::LinkedObject> > >, llvm::RuntimeDyld&, std::shared_ptr<llvm::object::OwningBinary<llvm::object::ObjectFile> > const&, std::function<void ()>)#1}>::getSymbolMaterializer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#17 0x00007fc7e5cbe32f in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::LazyEmittingLayer<llvm::orc::IRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler> >::EmissionDeferredModule::find(llvm::StringRef, bool, llvm::orc::IRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler>&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#18 0x00007fc7e5cb2b15 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#19 0x00007fc7e5c3dd3a in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#20 0x00007fc7e5c412ea 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/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#21 0x00007fc7e5d0b0b9 in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#22 0x00007fc7e5d1b778 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#23 0x00007fc7e5d1ba67 in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#24 0x00007fc7e5d042b0 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#25 0x00007fc7e5ba6ae0 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#26 0x00007fc7e5bbbb06 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#27 0x00007fc7e5bbbf72 in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCling.so
#28 0x00007fc7ea3e3bd6 in TApplication::ExecuteFile(char const*, int*, bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#29 0x00007fc7ea3e33c7 in TApplication::ProcessLine(char const*, bool, int*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libCore.so.6.22
#30 0x00007fc7ea6f65f2 in TRint::ProcessLineNr(char const*, char const*, int*) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libRint.so.6.22
#31 0x00007fc7ea6f818d in TRint::Run(bool) () from /home/pbr/anaconda3/envs/pbr_env_38/lib/libRint.so.6.22
#32 0x000055e810b39baf in main ()
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
In file included from input_line_11:1:
/home/pbr/run_alice_esd.C:161:15: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
   esd_objs = esd->fESDObjects;
              ^~~

if I do a “find ~ -type f -mtime 0 -ls” and “grep” for today’s date, I get the following hits:

(pbr_env_38) pbr@debian-cern-root:~/tmp$ grep 'Feb 15' _mt*_2.txt
  1072474     16 -rw-r--r--   1 pbr      pbr         13671 Feb 15 13:29 /home/pbr/.root_hist
  1082062     16 -rw-r--r--   1 pbr      pbr         15211 Feb 15 13:13 /home/pbr/run_alice_esd.C
  1183873      0 -rw-r--r--   1 pbr      pbr             0 Feb 15 13:19 /home/pbr/tmp/files/alice_ESDs.root
  1048607      4 -rw-------   1 pbr      pbr          3010 Feb 15 11:26 /home/pbr/.xsession-errors

the new subdirectory “files” contains:

(pbr_env_38) pbr@debian-cern-root:~/tmp$ ls -lrt files
total 856
lrwxrwxrwx 1 pbr pbr     15 Feb 15 13:28 alice_ESDs.root.ROOT.cachefile -> alice_ESDs.root
-rw-r--r-- 1 pbr pbr 875041 Feb 15 13:28 alice_ESDs.root

-Pietro

It is really strange CLING error. Maybe @Axel can comment on it.
I attach another way how MultiView.C can be add to the macro. Please try it:

alice_esd.C (3.3 KB) MultiView.C (4.7 KB) alice_esd_html_summary.C (9.8 KB) run_alice_esd.C (14.8 KB)

May be reason for problem was that in MultiView.C defined struct MultiView, but in run_alice_esd.C macro via forward declaration as class MultiView. I will provide PR where such ambiguity solved and MultiView.C just included as extra source file.

OK I get the following error:

Processing run_alice_esd.C...
In file included from input_line_11:1:
/home/pbr/tmp/alice_esd/run_alice_esd.C:80:10: fatal error: 'aliesd/AliESDEvent.h' file not found
#include "aliesd/AliESDEvent.h"
         ^~~~~~~~~~~~~~~~~~~~~~

and in my original root directory I have a “aliesd” folder (created by alice_esd_split?):

(pbr_env_38) pbr@debian-cern-root:~/tmp/alice_esd$ ls -l ~/aliesd
total 1144
-rw-r--r-- 1 pbr pbr   2278 Feb 13 08:00 AliESDCaloCluster.h
-rw-r--r-- 1 pbr pbr    935 Feb 13 08:00 AliESDCaloTrigger.h
-rw-r--r-- 1 pbr pbr   1323 Feb 13 08:00 AliESDcascade.h
-rw-r--r-- 1 pbr pbr   1121 Feb 13 08:00 AliESDEvent.h
-rw-r--r-- 1 pbr pbr    985 Feb 13 08:00 AliESDFMD.h
-rw-r--r-- 1 pbr pbr    807 Feb 13 08:00 AliESDfriend.h
-rw-r--r-- 1 pbr pbr   1234 Feb 13 08:00 AliESDfriendTrack.h
-rw-r--r-- 1 pbr pbr   1103 Feb 13 08:00 AliESDHeader.h
-rw-r--r-- 1 pbr pbr   2237 Feb 13 08:00 AliESDkink.h
-rw-r--r-- 1 pbr pbr   1100 Feb 13 08:00 aliesdLinkDef.h
-rw-r--r-- 1 pbr pbr   2251 Feb 13 08:00 AliESDMuonTrack.h
-rw-r--r-- 1 pbr pbr   1123 Feb 13 08:00 AliESDPmdTrack.h
-rw-r--r-- 1 pbr pbr 115280 Feb 13 08:00 aliesdProjectDict.cxx
-rw-r--r-- 1 pbr pbr  15325 Feb 13 08:00 aliesdProjectDict_rdict.pcm
-rw-r--r-- 1 pbr pbr    736 Feb 13 08:00 aliesdProjectHeaders.h
-rw-r--r-- 1 pbr pbr      0 Feb 13 08:00 aliesdProjectInstances.h
-rw-r--r-- 1 pbr pbr  31148 Feb 13 08:00 aliesdProjectSource.cxx
-rw-r--r-- 1 pbr pbr 548376 Feb 13 08:00 aliesdProjectSource.o
-rw-r--r-- 1 pbr pbr   1082 Feb 13 08:00 AliESDRun.h
-rwxr-xr-x 1 pbr pbr 323456 Feb 13 08:00 aliesd.so
-rw-r--r-- 1 pbr pbr   5996 Feb 13 08:00 AliESDtrack.h
-rw-r--r-- 1 pbr pbr   1427 Feb 13 08:00 AliESDTrdTrack.h
-rw-r--r-- 1 pbr pbr    979 Feb 13 08:00 AliESDTZERO.h
-rw-r--r-- 1 pbr pbr   2610 Feb 13 08:00 AliESDv0.h
-rw-r--r-- 1 pbr pbr   1015 Feb 13 08:00 AliESDVertex.h
-rw-r--r-- 1 pbr pbr   1097 Feb 13 08:00 AliESDVZERO.h
-rw-r--r-- 1 pbr pbr   1137 Feb 13 08:00 AliESDZDC.h
-rw-r--r-- 1 pbr pbr   1080 Feb 13 08:00 AliExternalTrackParam.h
-rw-r--r-- 1 pbr pbr    831 Feb 13 08:00 AliFMDFloatMap.h
-rw-r--r-- 1 pbr pbr    902 Feb 13 08:00 AliFMDMap.h
-rw-r--r-- 1 pbr pbr   1305 Feb 13 08:00 AliMultiplicity.h
-rw-r--r-- 1 pbr pbr   1262 Feb 13 08:00 AliRawDataErrorLog.h
-rw-r--r-- 1 pbr pbr   1301 Feb 13 08:00 AliTrackPointArray.h
-rw-r--r-- 1 pbr pbr   1011 Feb 13 08:00 AliVertex.h
-rwxr-xr-x 1 pbr pbr   9147 Feb 13 08:00 MAKEP

Generated files by alice_esd.C and alice_esd_split.C macros are not compatible.
You need to start from clean directory

OK. What is the step? or macro? that generates the “aliesd” directory that is appropriate for the alice_esd.C tutorial?

When you start alice_esd.C macro, it generates aliesd folder with all extra sources.
It is main reason why I split alice_esd.C and run_alice_esd.C macros

Perfect, did a “root alice_esd.C” and it works! Thanks!

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