Giter Site home page Giter Site logo

Comments (8)

cnatzke avatar cnatzke commented on August 16, 2024

I was reading through the commit history and found this commit:

commit 7cb47846125c646204ff4e1dfe274986f8966586
Author: VinzenzBildstein <[email protected]>
Date:   Mon Jul 10 10:25:52 2023 -0400

    Don't use TLevelScheme with standard less than c++17

The precompiled ROOT binaries for Ubuntu 20.04 use the c++14 standard. I suspect this might be part of the issue.

from grsisort.

VinzenzBildstein avatar VinzenzBildstein commented on August 16, 2024

Yes, see also #1362

from grsisort.

VinzenzBildstein avatar VinzenzBildstein commented on August 16, 2024

But that shouldn't be an issue anymore, since we have a check for the c++ standard being used:

#ifndef TLEVELSCHEME_H
#define TLEVELSCHEME_H

#if __cplusplus >= 201703L

Can you check that your TLevelScheme.h looks the same?

from grsisort.

cnatzke avatar cnatzke commented on August 16, 2024

Mine looks the same:

#ifndef TLEVELSCHEME_H
#define TLEVELSCHEME_H

#if __cplusplus >= 201703L

#include <iostream>

from grsisort.

cnatzke avatar cnatzke commented on August 16, 2024

I build ROOT from source using the cmake flag -DCMAKE_CXX_STANDARD=17 and could compile the latest version of GRSISort.

from grsisort.

cnatzke avatar cnatzke commented on August 16, 2024

I did get this error when trying to run a helper that I used in GRSISort v4.0.0.2, but this may be a completely unrelated issue.

----------  starting compilation of user code  ----------
In file included from /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.cxx:1:
/data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.hh:74:33: error: invalid covariant return type for ‘virtual ROOT::RDF::RResultPtr<TList> TimingGateOptimizationHelper::Book(ROOT::RDataFrame*)’
   74 |    ROOT::RDF::RResultPtr<TList> Book(ROOT::RDataFrame *d) override
      |                                 ^~~~
In file included from /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.hh:8,
                 from /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.cxx:1:
/home/cnatzke/programs/griffin-collaboration/GRSISort/include/TGRSIHelper.h:58:62: note: overridden function is ‘virtual ROOT::RDF::RResultPtr<std::map<std::__cxx11::basic_string<char>, TList> > TGRSIHelper::Book(ROOT::RDataFrame*)’
   58 |  virtual ROOT::RDF::RResultPtr<std::map<std::string, TList>> Book(ROOT::RDataFrame*) {
      |                                                              ^~~~
In file included from /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.cxx:1:
/data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.hh: In member function ‘virtual ROOT::RDF::RResultPtr<TList> TimingGateOptimizationHelper::Book(ROOT::RDataFrame*)’:
/data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.hh:76:57: error: could not convert ‘ROOT::RDF::RInterface<T, V>::Book(Helper&&, const ColumnNames_t&) [with FirstColumn = TGriffin; OtherColumns = {TGriffinBgo, TZeroDegree}; Helper = TimingGateOptimizationHelper; Proxied = ROOT::Detail::RDF::RLoopManager; DataSource = void; typename std::decay<T>::type::Result_t = std::map<std::__cxx11::basic_string<char>, TList>; ROOT::RDF::ColumnNames_t = std::vector<std::__cxx11::basic_string<char> >]((* & std::move<TimingGateOptimizationHelper&>((*(TimingGateOptimizationHelper*)this))), std::vector<std::__cxx11::basic_string<char> >(std::initializer_list<std::__cxx11::basic_string<char> >{((const std::__cxx11::basic_string<char>*)(& const std::__cxx11::basic_string<char> [3]{std::__cxx11::basic_string<char>(((const char*)"TGriffin"), std::allocator<char>()), std::__cxx11::basic_string<char>(((const char*)"TGriffinBgo"), std::allocator<char>()), std::__cxx11::basic_string<char>(((const char*)"TZeroDegree"), std::allocator<char>())})), 3}, std::allocator<std::__cxx11::basic_string<char> >()))’ from ‘RResultPtr<std::map<std::__cxx11::basic_string<char>, TList>>’ to ‘RResultPtr<TList>’
   76 |       return d->Book<TGriffin, TGriffinBgo, TZeroDegree>(std::move(*this), {"TGriffin", "TGriffinBgo", "TZeroDegree"});
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         RResultPtr<std::map<std::__cxx11::basic_string<char>, TList>>
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to compile source file /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.cxx using 'g++ -c -fPIC -g `grsi-config --cflags --GRSIData-cflags` `root-config --cflags --glibs` -I/data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019 -o /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.o /data_fast/cnatzke/two-photon/72Ge/analysis/helpers/2019/TimingGateOptimizationHelper.cxx
'

Aborted (core dumped)

from grsisort.

cnatzke avatar cnatzke commented on August 16, 2024

This was an unrelated issue. The override statement in the header for the Book function changed between versions 4.0.0.2 and 4.0.03. I had to change

ROOT::RDF::RResultPtr<TList> Book(ROOT::RDataFrame *d) override

to

 ROOT::RDF::RResultPtr<std::map<std::string, TList>> Book(ROOT::RDataFrame* d) override 

I think this issue can be closed unless there is anything else you would like me to check on.

from grsisort.

VinzenzBildstein avatar VinzenzBildstein commented on August 16, 2024

Yes, we can close this issue. It's still unclear to me why this wouldn't work with ROOT compiled against c++14, the makefile should be set up now to use the same standard as ROOT, and when using c++14 the TLevelScheme files should have looked like empty files to the compiler.

from grsisort.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.