Problems to compile in root 6.08.06

Hello,
I have a problem working with root6.08.06 because there is a crash but in the version 5.34.34 my program works
I need to work with the latest because then I will work with pyRoot.

There is a crash

ocalhost.localdomain:/MC-Analyzer-master < 47 >root MC_Analyzer.cc
   ------------------------------------------------------------
  | Welcome to ROOT 6.08/06                http://root.cern.ch |
  |                               (c) 1995-2016, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-08-06, 2 March 2017                            |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 
Processing MC_Analyzer.cc...
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:20:
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_S1.cc:48:2: error: no
      matching function for call to 'optPhot_S1'
        optPhot_S1(datafile,26,50,22,output_dir,export_format,batch);
        ^~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_S1.cc:44:6: note: candidate
      function not viable: requires at most 4 arguments, but 7 were provided
void optPhot_S1(string datafile, string output_dir = "", string export_f...
     ^
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:21:
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_S2.cc:47:2: error: no
      matching function for call to 'optPhot_S2'
        optPhot_S2(datafile,26,50,22,output_dir,export_format,batch);
        ^~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_S2.cc:43:6: note: candidate
      function not viable: requires at most 4 arguments, but 7 were provided
void optPhot_S2(string datafile, string output_dir = "", string export_f...
     ^
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:23:
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_comparison.cc:45:2: error: 
      no matching function for call to 'optPhot_comparison'
        optPhot_comparison(datafile_kr,"",AFT_S2_Kr,datafile_mc,bin_z,bi...
        ^~~~~~~~~~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_comparison.cc:44:6: note: 
      candidate function not viable: requires at most 10 arguments, but 11 were
      provided
void optPhot_comparison(string datafile_kr, double AFT_S2_Kr, string dat...
     ^
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:24:
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_matching.cc:46:2: error: no
      matching function for call to 'optPhot_matching'
        optPhot_matching(datafile_kr,"",AFT_S2_Kr,datafile_mc,bin_z,bin_...
        ^~~~~~~~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_matching.cc:45:6: note: 
      candidate function not viable: requires at most 11 arguments, but 12 were
      provided
void optPhot_matching(string datafile_kr, double AFT_S2_Kr, string dataf...
     ^
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:25:
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_parameter_variations.cc:49:2: error: 
      no matching function for call to 'optPhot_parameter_variations'
        optPhot_parameter_variations(datadir,parameter,30,output_dir,exp...
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/optPhot_parameter_variations.cc:48:6: note: 
      candidate function not viable: requires at most 5 arguments, but 6 were
      provided
void optPhot_parameter_variations(string datadir, string parameter, stri...
     ^
In file included from input_line_8:1:
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:26:
/home/local1/Desktop/MC-Analyzer-master/src/calibration_source.cc:48:2: error: 
      no matching function for call to 'calibration_source'
        calibration_source(datafile,50,45,22,output_dir,export_format,true);
        ^~~~~~~~~~~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/calibration_source.cc:44:6: note: 
      candidate function not viable: requires at most 3 arguments, but 7 were
      provided
void calibration_source(string datafile, string output_dir = "", string ...
     ^
In file included from input_line_8:1:
/home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:109:3: error: no matching
      function for call to 'data_maps'
                data_maps(datafile,9,4,4);
                ^~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/data_maps.cc:41:6: note: candidate
      function not viable: requires at least 5 arguments, but 4 were provided
void data_maps(string datafile, int bin_z, int bin_r, int bin_rr, strin...

Here my code

MC_Analyzer.cc (9.0 KB)
fileoperations.cc (1.2 KB)
plot_info.C (2.1 KB)
plot_LCE_fits.C (4.7 KB)
calibration_source.cc (26.8 KB)
data_maps.cc (17.4 KB)
plot_LCE_ZSlices.C (5.3 KB)
optPhot_parameter_variations.cc (37.4 KB)
optPhot_S2.cc (17.0 KB)
optPhot_matching.cc (38.4 KB)
TPC_Definition.cc (3.7 KB)
optPhot_S1.cc (51.2 KB)
optPhot_comparison.cc (97.8 KB)

I am sorry for bothering you but I do not understand the problems.

Hi @ivancovish,

I am not sure if it helps or not. Can you try to swap the position of definition of the two functions and check if it workes.

First function

void optPhot_S1(string datafile, string output_dir, string export_format, bool batch)

Second function:

void optPhot_S1(string datafile, int bin_z, int bin_r, int bin_rr, string output_dir, string export_format, bool batch)

Hello @ramkrishna,
thank you for answering I have tried compiling with your suggestion. The output is

localhost.localdomain:/MC-Analyzer-master < 169 >root MC_Analyzer.cc
   ------------------------------------------------------------
  | Welcome to ROOT 6.08/06                http://root.cern.ch |
  |                               (c) 1995-2016, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-08-06, 2 March 2017                            |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 
Processing MC_Analyzer.cc...
In file included from input_line_8:1:
/home/local1/Desktop/MC-Analyzer-master/MC_Analyzer.cc:109:3: error: no matching function for call to 'data_maps'
                data_maps(datafile,9,4,4);
                ^~~~~~~~~
/home/local1/Desktop/MC-Analyzer-master/src/data_maps.cc:39:6: note: candidate function not viable: requires at least 5 arguments, but 4 were provided
void data_maps(string datafile, int bin_z, int bin_r, int bin_rr, string strnbinst, string output_dir = "", string export_format = "png", bool batch = true) {
     ^
root [1] 

Hi @ivancovish,

Are you sure this was working in root5?

Since the defined function:

void data_maps(string datafile, int bin_z, int bin_r, int bin_rr, string strnbinst, string output_dir = "", string export_format = "png", bool batch = true) 

has total of 8 arguments and out of them only last 3 has default values defined. So, you need to give at least 5 arguments to the function data_maps. But you are giving only 4 arguments. I think this is the casue of error.

For this you can see the example here (http://www.geeksforgeeks.org/default-arguments-c/) about the default arguments.

Hello @ramkrishna,

Yes, I am. Here is in root 5.34.34

localhost.localdomain:/MC-Analyzer-master < 17 >root MC_Analyzer.cc
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.34/34    2 October 2015   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.34/34 (v5-34-34@v5-34-34, Oct 02 2015, 16:30:37 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] 
Processing MC_Analyzer.cc...
============================================================
============================================================
= Starting MC-Analyzer =====================================
============================================================
============================================================
= (1) S1 - MC analysis =====================================
============================================================
= (2) data maps (Kr83m) ====================================
============================================================
= (3) S1 - comparison of MC vs. data maps ==================
= (4) S1 - parameter variations (of dir) ===================
============================================================
= (5) calibration source ===================================
============================================================
= (6) matching prepare MC values ===========================
= (7) matching process =====================================
============================================================
= (8) S2 - MC analysis =====================================
============================================================

But, after verifying more thoroughly I found a crash.

============================================================
1
= S1 - MC analysis =========================================
============================================================
Which datafile(s) do you want to analyse?
------------------------------------------------------------
(l) for: 
2017-10-20_4-26-30_events.root
= reading datafile ===== single file =======================
 file: 2017-10-20_4-26-30_events.root 100 events 
============================================================
Error: No memory for static ColPalette\a4b\0  src/optPhot_S1.cc:194:
*** Interpreter error recovered ***
root [1] 

and I’ve tried compiling with

.x MC_Analyzer.cc+

root [1] .x MC_Analyzer.cc+
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:20:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S1.cc: In function ‘void optPhot_S1(std::string, std::string, std::string, bool)’:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S1.cc:50:61: error: invalid conversion from ‘int’ to const char*’ [-fpermissive]
  optPhot_S1(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:20:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S1.cc:50:61: error: invalid conversion from ‘int’ to const char*’ [-fpermissive]
  optPhot_S1(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:20:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S1.cc:50:61: error: too many arguments to function ‘void optPhot_S1(std::string, std::string, std::string, bool)’
  optPhot_S1(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S1.cc:46:6: note: declared here
 void optPhot_S1(string datafile, string output_dir = "", string export_format = "png", bool batch = true) {
      ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:21:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S2.cc: In function ‘void optPhot_S2(std::string, std::string, std::string, bool)’:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S2.cc:47:61: error: invalid conversion from ‘int’ to const char*’ [-fpermissive]
  optPhot_S2(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:21:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S2.cc:47:61: error: invalid conversion from ‘int’ to const char*’ [-fpermissive]
  optPhot_S2(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:21:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S2.cc:47:61: error: too many arguments to function ‘void optPhot_S2(std::string, std::string, std::string, bool)’
  optPhot_S2(datafile,26,50,22,output_dir,export_format,batch);
                                                             ^
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_S2.cc:43:6: note: declared here
 void optPhot_S2(string datafile, string output_dir = "", string export_format = "png", bool batch = true) {
      ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:23:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_comparison.cc: In function ‘void optPhot_comparison(std::string, double, std::string, int, int, int, std::string, std::string, std::string, bool)’:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_comparison.cc:46:117: error: cannot convert ‘const char*’ to ‘double’ for argument ‘2’ to ‘void optPhot_comparison(std::string, double, std::string, int, int, int, std::string, std::string, std::string, bool)’
  optPhot_comparison(datafile_kr,"",AFT_S2_Kr,datafile_mc,bin_z,bin_r,bin_rr,strnbinst,output_dir,export_format,batch);
                                                                                                                     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:24:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_matching.cc: In function ‘void optPhot_matching(std::string, double, std::string, int, int, int, std::string, int, int, std::string, bool)’:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_matching.cc:47:133: error: cannot convert ‘const char’ to ‘double’ for argument ‘2’ to ‘void optPhot_matching(std::string, double, std::string, int, int, int, std::string, int, int, std::string, bool)’
  optPhot_matching(datafile_kr,"",AFT_S2_Kr,datafile_mc,bin_z,bin_r,bin_rr,strnbinst,filenumber_start,filenumber_end,output_dir,batch);
                                                                                                                                     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:25:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_parameter_variations.cc: In function ‘void optPhot_parameter_variations(std::string, std::string, std::string, std::string, bool)’:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_parameter_variations.cc:49:82: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
  optPhot_parameter_variations(datadir,parameter,30,output_dir,export_format,batch);
                                                                                  ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:25:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/optPhot_parameter_variations.cc:49:82: error: cannot convert std::string {aka std::basic_string<char>}’ to ‘bool’ for argument ‘5’ to ‘void optPhot_parameter_variations(std::string, std::string, std::string, std::string, bool)’
  optPhot_parameter_variations(datadir,parameter,30,output_dir,export_format,batch);
                                                                                  ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:26:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/calibration_source.cc: In function ‘void calibration_source(std::string, std::string, std::string)’:
/home/local1/Desktop/MC-Analyzer-master/./src/calibration_source.cc:48:68: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
  calibration_source(datafile,50,45,22,output_dir,export_format,true);
                                                                    ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:26:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/calibration_source.cc:48:68: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
  calibration_source(datafile,50,45,22,output_dir,export_format,true);
                                                                    ^
In file included from /usr/include/c++/4.8.2/string:53:0,
                 from /usr/local/root/5.34.34/include/root/TSchemaHelper.h:25,
                 from /usr/local/root/5.34.34/include/root/TGenericClassInfo.h:17,
                 from /usr/local/root/5.34.34/include/root/Rtypes.h:270,
                 from /usr/local/root/5.34.34/include/root/TObject.h:31,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:32,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/usr/include/c++/4.8.2/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-fpermissive]
     basic_string<_CharT, _Traits, _Alloc>::
     ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:26:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/calibration_source.cc:48:68: error: too many arguments to function ‘void calibration_source(std::string, std::string, std::string)’
  calibration_source(datafile,50,45,22,output_dir,export_format,true);
                                                                    ^
/home/local1/Desktop/MC-Analyzer-master/./src/calibration_source.cc:44:6: note: declared here
 void calibration_source(string datafile, string output_dir = "", string export_format = "png") {
      ^
In file included from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc: In function ‘void MC_Analyzer()’:
/home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:109:27: error: too few arguments to function ‘void data_maps(std::string, int, int, int, std::string, std::string, std::string, bool)’
   data_maps(datafile,9,4,4);
                           ^
In file included from /home/local1/Desktop/MC-Analyzer-master/./MC_Analyzer.cc:22:0,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.h:34,
                 from /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.cxx:17:
/home/local1/Desktop/MC-Analyzer-master/./src/data_maps.cc:40:6: note: declared here
 void data_maps(string datafile, int bin_z, int bin_r, int bin_rr, string strnbinst, string output_dir, string export_format, bool batch)
      ^
g++: error: /home/local1/Desktop/MC-Analyzer-master/MC_Analyzer_cc_ACLiC_dict.o: No such file or directory
Error: Function MC_Analyzer() is not defined in current scope  src/optPhot_S1.cc:161:
*** Interpreter error recovered ***
root [2] 

In root 5 I obtained more details than root 6 but in my code, I had to block
It seems to me that after changing the order is worse.

root [1] .x MC_Analyzer.cc
Warning: template pair duplicate definition /usr/local/root/5.34.34/lib/root/cint/cint/stl/_pair.h:31:
Warning: template reverse_iterator duplicate definition /usr/local/root/5.34.34/lib/root/cint/cint/stl/_iterator.h:269:
Warning: template vector duplicate definition /usr/local/root/5.34.34/lib/root/cint/cint/stl/_vector.h:44:



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fe52306e27c in waitpid () from /usr/lib64/libc.so.6
#1  0x00007fe522ff1c72 in do_system () from /usr/lib64/libc.so.6
#2  0x00007fe523d24429 in TUnixSystem::StackTrace() () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#3  0x00007fe523d2604c in TUnixSystem::DispatchSignals(ESignals) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#4  <signal handler called>
#5  0x00007fe52301b165 in fgetpos

GLIBC_2.2.5 () from /usr/lib64/libc.so.6
#6  0x00007fe5226f1344 in G__interpret_func () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#7  0x00007fe52279b0a5 in G__getfunction () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#8  0x00007fe522741b16 in G__getitem () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#9  0x00007fe522746f75 in G__getexpr () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#10 0x00007fe52275284b in G__calc_internal () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#11 0x00007fe5227a988f in G__process_cmd () from /usr/local/root/5.34.34/lib/root/libCint.so.5.34
#12 0x00007fe523cef400 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#13 0x00007fe523cebacb in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#14 0x00007fe523cc76ac in TApplication::ExecuteFile(char const*, int*, bool) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#15 0x00007fe523cc6c10 in TApplication::ProcessLine(char const*, bool, int*) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#16 0x00007fe5238aeac9 in TRint::HandleTermInput() () from /usr/local/root/5.34.34/lib/root/libRint.so.5.34
#17 0x00007fe523d25815 in TUnixSystem::CheckDescriptors() () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#18 0x00007fe523d2633a in TUnixSystem::DispatchOneEvent(bool) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#19 0x00007fe523cb5ad6 in TSystem::InnerLoop() () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#20 0x00007fe523cb6680 in TSystem::Run() () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#21 0x00007fe523cc4eaf in TApplication::Run(bool) () from /usr/local/root/5.34.34/lib/root/libCore.so.5.34
#22 0x00007fe5238afbd7 in TRint::Run(bool) () from /usr/local/root/5.34.34/lib/root/libRint.so.5.34
#23 0x0000000000400ffc in main ()
===========================================================

Sorry for bothering you, help me please.

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