Passing std::vector<TLorentzVector>

Hi all,

I am quite new to C++/CINT but I think the following should work:

//*******************************************************************************
//test.C

void setvec(std::vector<TLorentzVector>&,std::vector<TLorentzVector>);

void test(){

   std::vector<TLorentzVector> vec1;
   TLorentzVector one,two;
   vec1.push_back(one);
   vec1.push_back(two);

   std::vector<TLorentzVector> vec2;
   setvec(vec2,vec1);
   cout<<hello.size()<<endl;

}

void setvec(std::vector<TLorentzVector>& setee,std::vector<TLorentzVector> 
setter){

   setee=setter;
}

//********************************************************************************

However when I run interactively in ROOT I get the following:

root [0] .L test.C
Attempt to add function operator+ failed - ifunc_table overflow!
Attempt to add function operator- failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator/ failed - ifunc_table overflow!
Attempt to add function operator+ failed - ifunc_table overflow!
Attempt to add function operator- failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator+ failed - ifunc_table overflow!
Attempt to add function operator- failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator/ failed - ifunc_table overflow!
Attempt to add function operator+ failed - ifunc_table overflow!
Attempt to add function operator- failed - ifunc_table overflow!
Attempt to add function operator* failed - ifunc_table overflow!
Attempt to add function operator/ failed - ifunc_table overflow!
root [1] test();

  *** Break *** segmentation violation

[2]+  Stopped                 root

After I stop with ^Z

Could anyone help with this? It is very much appreciated!

-Kyle

ps. using root Version 5.14/00h

Hi,

Cint does not support well interpreted vector of object as the moment.
The best work around is to compile your script (.L test.C+). You can also generate the dictionary for each and every of the STL container of object that you are using (in your case std::vector)

Cheers,
Philippe