problem of compilation when using plotting tools with Yarr
When compiling Yarr (that includes plotting tool), this gives :
/home/daquser/git/Yarr/build/external/src/plotting_tools/include/PlotTool.h:192:40: error: ‘kBird’ was not declared in this scope 192 | int i_color=kBird); | ^~~~~
-->To solve it, we added : #include "TColor.h"
Is it missing in the official code ?
- then, after fixing this problem, we got this error message :
/home/daquser/git/Yarr/build/external/src/plotting_tools/src/HistoTDACStack.cxx:58:27: error: no matching function for call to ‘TLegend::SetHeader(const char [5], const char [1])’ 58 | l->SetHeader("TDAC",""); | ^ In file included from /home/daquser/git/Yarr/build/external/src/plotting_tools/include/PlotTool.h:26, from /home/daquser/git/Yarr/build/external/src/plotting_tools/include/Histo1D.h:4, from /home/daquser/git/Yarr/build/external/src/plotting_tools/include/HistoStack.h:4, from /home/daquser/git/Yarr/build/external/src/plotting_tools/include/HistoTDACStack.h:4, from /home/daquser/git/Yarr/build/external/src/plotting_tools/src/HistoTDACStack.cxx:1: /home/daquser/root_cern/root/include/TLegend.h:79:20: note: candidate: ‘virtual void TLegend::SetHeader(const char*)’ 79 | virtual void SetHeader( const char *header = "" ); // MENU | ^~~~~~~~~
and we see that we should remove the second parameter, since the prototype has only one argument, so we rewrite as : l->SetHeader("TDAC");
and then, it compiles
May you -give some hints if we should do something else in order not to change the code ? or -modify the code for the patch ?
thank you