umd-lhcb / TupleToolSemiLeptonic

TupleTool classes for semileptonic analysis
0 stars 0 forks source link

Compilation error with DaVinci/v45 #1

Closed yipengsun closed 4 years ago

yipengsun commented 5 years ago

With latest stable DaVinci/v45r1, I got the following compilation error:

cmake --build /afs/cern.ch/user/s/suny/build/DaVinciDev_v45r1/build.x86_64-centos7-gcc8-opt --target all -- 
[1/9] Building CXX object Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolationVetoDst.cpp.o
[2/9] Building CXX object Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolation.cpp.o
[3/9] Building CXX object Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTagDiscardDstMu.cpp.o
[4/9] Building CXX object Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTauMuDiscrVars.cpp.o
FAILED: /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/LBSCRIPTS_v9r2p6/InstallArea/scripts/lcg-g++-8.2.0  -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SPIRIT_USE_PHOENIX_V3 -DGAUDI_V20_COMPAT -DPACKAGE_NAME=\"TupleToolSemiLeptonic\" -DPACKAGE_VERSION=\"v45r1\" -DTupleToolSemiLeptonic_EXPORTS -D_GNU_SOURCE -Df2cFortran -Dlinux -Dunix -IPhys/TupleToolSemiLeptonic -I../Phys/TupleToolSemiLeptonic -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/HepMC/2.06.09/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Python/2.7.16/x86_64-centos7-gcc8-opt/include/python2.7 -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/vdt/0.4.3/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/clhep/2.4.1.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/GSL/2.5/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/rangev3/0.5.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/AIDA/3.2.1/x86_64-centos7-gcc8-opt/src/cpp -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/cppgsl/2.0.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/tbb/2019_U7/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/ROOT/6.18.00/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Boost/1.70.0/x86_64-centos7-gcc8-opt/include -I../ -Iinclude -I/cvmfs/lhcb.cern.ch/lib/lhcb/DAVINCI/DAVINCI_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/ANALYSIS/ANALYSIS_v21r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/STRIPPING/STRIPPING_v14r4/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/PHYS/PHYS_v26r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/REC/REC_v24r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LBCOM/LBCOM_v23r0p1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LHCB/LHCB_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include -march=x86-64 -msse4.2 -fmessage-length=0 -pipe -Wall -Wextra -Werror=return-type -pthread -pedantic -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wnon-virtual-dtor -Wsuggest-override -std=c++17 -O3 -DNDEBUG -fPIC -MD -MT Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTagDiscardDstMu.cpp.o -MF Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTagDiscardDstMu.cpp.o.d -o Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTagDiscardDstMu.cpp.o -c ../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:4:
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning is a GCC extension
 #warning "obsolete empty header, please remove it"
  ^~~~~~~
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning "obsolete empty header, please remove it" [-Wcpp]
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:7:
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.h:46:22: warning: ‘virtual StatusCode TupleToolTagDiscardDstMu::initialize()’ can be marked override [-Wsuggest-override]
   virtual StatusCode initialize();
                      ^~~~~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.h:48:14: warning: ‘virtual StatusCode TupleToolTagDiscardDstMu::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’ can be marked override [-Wsuggest-override]
   StatusCode fill(const LHCb::Particle*, const LHCb::Particle*,
              ^~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:35:1: error: expected constructor, destructor, or type conversion before ‘TupleToolTagDiscardDstMu’
 TupleToolTagDiscardDstMu::TupleToolTagDiscardDstMu(const std::string& type,
 ^~~~~~~~~~~~~~~~~~~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp: In member function ‘virtual StatusCode TupleToolTagDiscardDstMu::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’:
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:133:10: warning: unused variable ‘vtxChi2’ [-Wunused-variable]
   double vtxChi2 = vtx->chi2();
          ^~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:150:7: warning: unused variable ‘i1’ [-Wunused-variable]
   int i1 = 0;
       ^~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:151:25: warning: unused variable ‘mu’ [-Wunused-variable]
   const LHCb::Particle *mu, *pislow, *muMu, *tauMu, *D;
                         ^~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:151:46: warning: unused variable ‘tauMu’ [-Wunused-variable]
   const LHCb::Particle *mu, *pislow, *muMu, *tauMu, *D;
                                              ^~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:152:19: warning: unused variable ‘a1’ [-Wunused-variable]
   LHCb::Particle* a1;
                   ^~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:153:8: warning: unused variable ‘foundD’ [-Wunused-variable]
   bool foundD = false;
        ^~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTagDiscardDstMu.cpp:154:19: warning: unused variable ‘newD’ [-Wunused-variable]
   LHCb::Particle* newD;
                   ^~~~
FAILED: /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/LBSCRIPTS_v9r2p6/InstallArea/scripts/lcg-g++-8.2.0  -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SPIRIT_USE_PHOENIX_V3 -DGAUDI_V20_COMPAT -DPACKAGE_NAME=\"TupleToolSemiLeptonic\" -DPACKAGE_VERSION=\"v45r1\" -DTupleToolSemiLeptonic_EXPORTS -D_GNU_SOURCE -Df2cFortran -Dlinux -Dunix -IPhys/TupleToolSemiLeptonic -I../Phys/TupleToolSemiLeptonic -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/HepMC/2.06.09/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Python/2.7.16/x86_64-centos7-gcc8-opt/include/python2.7 -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/vdt/0.4.3/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/clhep/2.4.1.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/GSL/2.5/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/rangev3/0.5.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/AIDA/3.2.1/x86_64-centos7-gcc8-opt/src/cpp -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/cppgsl/2.0.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/tbb/2019_U7/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/ROOT/6.18.00/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Boost/1.70.0/x86_64-centos7-gcc8-opt/include -I../ -Iinclude -I/cvmfs/lhcb.cern.ch/lib/lhcb/DAVINCI/DAVINCI_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/ANALYSIS/ANALYSIS_v21r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/STRIPPING/STRIPPING_v14r4/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/PHYS/PHYS_v26r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/REC/REC_v24r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LBCOM/LBCOM_v23r0p1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LHCB/LHCB_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include -march=x86-64 -msse4.2 -fmessage-length=0 -pipe -Wall -Wextra -Werror=return-type -pthread -pedantic -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wnon-virtual-dtor -Wsuggest-override -std=c++17 -O3 -DNDEBUG -fPIC -MD -MT Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTauMuDiscrVars.cpp.o -MF Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTauMuDiscrVars.cpp.o.d -o Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolTauMuDiscrVars.cpp.o -c ../Phys/TupleToolSemiLeptonic/src/TupleToolTauMuDiscrVars.cpp
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolTauMuDiscrVars.cpp:5:
../Phys/TupleToolSemiLeptonic/src/TupleToolTauMuDiscrVars.h:104:22: warning: ‘virtual StatusCode TupleToolTauMuDiscrVars::initialize()’ can be marked override [-Wsuggest-override]
   virtual StatusCode initialize();
                      ^~~~~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTauMuDiscrVars.h:106:14: warning: ‘virtual StatusCode TupleToolTauMuDiscrVars::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’ can be marked override [-Wsuggest-override]
   StatusCode fill(const LHCb::Particle*, const LHCb::Particle*,
              ^~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolTauMuDiscrVars.cpp:34:1: error: expected constructor, destructor, or type conversion before ‘TupleToolTauMuDiscrVars’
 TupleToolTauMuDiscrVars::TupleToolTauMuDiscrVars(const std::string& type,
 ^~~~~~~~~~~~~~~~~~~~~~~
FAILED: /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/LBSCRIPTS_v9r2p6/InstallArea/scripts/lcg-g++-8.2.0  -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SPIRIT_USE_PHOENIX_V3 -DGAUDI_V20_COMPAT -DPACKAGE_NAME=\"TupleToolSemiLeptonic\" -DPACKAGE_VERSION=\"v45r1\" -DTupleToolSemiLeptonic_EXPORTS -D_GNU_SOURCE -Df2cFortran -Dlinux -Dunix -IPhys/TupleToolSemiLeptonic -I../Phys/TupleToolSemiLeptonic -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/HepMC/2.06.09/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Python/2.7.16/x86_64-centos7-gcc8-opt/include/python2.7 -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/vdt/0.4.3/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/clhep/2.4.1.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/GSL/2.5/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/rangev3/0.5.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/AIDA/3.2.1/x86_64-centos7-gcc8-opt/src/cpp -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/cppgsl/2.0.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/tbb/2019_U7/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/ROOT/6.18.00/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Boost/1.70.0/x86_64-centos7-gcc8-opt/include -I../ -Iinclude -I/cvmfs/lhcb.cern.ch/lib/lhcb/DAVINCI/DAVINCI_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/ANALYSIS/ANALYSIS_v21r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/STRIPPING/STRIPPING_v14r4/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/PHYS/PHYS_v26r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/REC/REC_v24r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LBCOM/LBCOM_v23r0p1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LHCB/LHCB_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include -march=x86-64 -msse4.2 -fmessage-length=0 -pipe -Wall -Wextra -Werror=return-type -pthread -pedantic -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wnon-virtual-dtor -Wsuggest-override -std=c++17 -O3 -DNDEBUG -fPIC -MD -MT Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolationVetoDst.cpp.o -MF Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolationVetoDst.cpp.o.d -o Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolationVetoDst.cpp.o -c ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:4:
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning is a GCC extension
 #warning "obsolete empty header, please remove it"
  ^~~~~~~
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning "obsolete empty header, please remove it" [-Wcpp]
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:20:
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/DeclareFactoryEntries.h:4:2: warning: #warning is a GCC extension
 #warning "obsolete empty header, please remove it"
  ^~~~~~~
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/DeclareFactoryEntries.h:4:2: warning: #warning "obsolete empty header, please remove it" [-Wcpp]
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:7:
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.h:26:2: warning: extra ‘;’ [-Wpedantic]
 };  // namespace LHCb
  ^
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.h:56:22: warning: ‘virtual StatusCode TupleToolApplyIsolationVetoDst::initialize()’ can be marked override [-Wsuggest-override]
   virtual StatusCode initialize();
                      ^~~~~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.h:58:14: warning: ‘virtual StatusCode TupleToolApplyIsolationVetoDst::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’ can be marked override [-Wsuggest-override]
   StatusCode fill(const LHCb::Particle*, const LHCb::Particle*,
              ^~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:49:53: error: expected constructor, destructor, or type conversion before ‘;’ token
 DECLARE_TOOL_FACTORY(TupleToolApplyIsolationVetoDst);
                                                     ^
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp: In member function ‘virtual StatusCode TupleToolApplyIsolationVetoDst::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’:
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:171:25: warning: ISO C++ forbids variable length array ‘maxbdt’ [-Wvla]
   double maxbdt[m_nWrite];
                         ^
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:172:42: warning: ISO C++ forbids variable length array ‘SelParts’ [-Wvla]
   const LHCb::Particle* SelParts[m_nWrite];
                                          ^
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:182:7: warning: unused variable ‘iloop’ [-Wunused-variable]
   int iloop = 0;
       ^~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp: In member function ‘void TupleToolApplyIsolationVetoDst::writeParticle(const LHCb::Particle*, double, std::__cxx11::string, Tuples::Tuple&, std::__cxx11::string, const LHCb::Particle*)’:
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolationVetoDst.cpp:597:17: warning: unused variable ‘motherid’ [-Wunused-variable]
             int motherid = head->particleID().abspid();
                 ^~~~~~~~
FAILED: /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/LBSCRIPTS_v9r2p6/InstallArea/scripts/lcg-g++-8.2.0  -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SPIRIT_USE_PHOENIX_V3 -DGAUDI_V20_COMPAT -DPACKAGE_NAME=\"TupleToolSemiLeptonic\" -DPACKAGE_VERSION=\"v45r1\" -DTupleToolSemiLeptonic_EXPORTS -D_GNU_SOURCE -Df2cFortran -Dlinux -Dunix -IPhys/TupleToolSemiLeptonic -I../Phys/TupleToolSemiLeptonic -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/HepMC/2.06.09/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Python/2.7.16/x86_64-centos7-gcc8-opt/include/python2.7 -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/vdt/0.4.3/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/clhep/2.4.1.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/GSL/2.5/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/rangev3/0.5.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/AIDA/3.2.1/x86_64-centos7-gcc8-opt/src/cpp -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/cppgsl/2.0.0/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/tbb/2019_U7/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/ROOT/6.18.00/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_96/Boost/1.70.0/x86_64-centos7-gcc8-opt/include -I../ -Iinclude -I/cvmfs/lhcb.cern.ch/lib/lhcb/DAVINCI/DAVINCI_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/ANALYSIS/ANALYSIS_v21r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/STRIPPING/STRIPPING_v14r4/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/PHYS/PHYS_v26r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/REC/REC_v24r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LBCOM/LBCOM_v23r0p1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/LHCB/LHCB_v45r1/InstallArea/x86_64-centos7-gcc8-opt/include -I/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include -march=x86-64 -msse4.2 -fmessage-length=0 -pipe -Wall -Wextra -Werror=return-type -pthread -pedantic -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wnon-virtual-dtor -Wsuggest-override -std=c++17 -O3 -DNDEBUG -fPIC -MD -MT Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolation.cpp.o -MF Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolation.cpp.o.d -o Phys/TupleToolSemiLeptonic/CMakeFiles/TupleToolSemiLeptonic.dir/src/TupleToolApplyIsolation.cpp.o -c ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.cpp
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.cpp:4:
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning is a GCC extension
 #warning "obsolete empty header, please remove it"
  ^~~~~~~
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/ToolFactory.h:4:2: warning: #warning "obsolete empty header, please remove it" [-Wcpp]
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.cpp:20:
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/DeclareFactoryEntries.h:4:2: warning: #warning is a GCC extension
 #warning "obsolete empty header, please remove it"
  ^~~~~~~
/cvmfs/lhcb.cern.ch/lib/lhcb/GAUDI/GAUDI_v32r1/InstallArea/x86_64-centos7-gcc8-opt/include/GaudiKernel/DeclareFactoryEntries.h:4:2: warning: #warning "obsolete empty header, please remove it" [-Wcpp]
In file included from ../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.cpp:7:
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.h:26:2: warning: extra ‘;’ [-Wpedantic]
 };  // namespace LHCb
  ^
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.h:55:22: warning: ‘virtual StatusCode TupleToolApplyIsolation::initialize()’ can be marked override [-Wsuggest-override]
   virtual StatusCode initialize();
                      ^~~~~~~~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.h:57:14: warning: ‘virtual StatusCode TupleToolApplyIsolation::fill(const LHCb::Particle*, const LHCb::Particle*, const string&, Tuples::Tuple&)’ can be marked override [-Wsuggest-override]
   StatusCode fill(const LHCb::Particle*, const LHCb::Particle*,
              ^~~~
../Phys/TupleToolSemiLeptonic/src/TupleToolApplyIsolation.cpp:49:46: error: expected constructor, destructor, or type conversion before ‘;’ token
 DECLARE_TOOL_FACTORY(TupleToolApplyIsolation);
                                              ^
ninja: build stopped: subcommand failed.
make: *** [all] Error 1
yipengsun commented 5 years ago

We should check out the source for the official DecayTreeTuple. To do so with DaVinci/v45r1:

git lb-use Analysis
git lb-checkout Analysis/v21r1 Phys/DecayTreeTuple
yipengsun commented 4 years ago

Problem solved. The main idea is to remove all Gaudi*/* headers but GaudiAlg/Tuple.h, and replace DECLARE_TOOL_FACTORY with DECLARE_COMPONENT.