Multimap in root

HI Philippe,
I am using one of the minos clusters and the root installed in them. I assume this has been done properly. I am attaching the entire code.

There are two instances when I refer to multimap:

inside the function const Float_t cnt::CalcXCurv

the error that I see comes from this line. I refer to this again later on when the function returns a multimap, but strangely this part doesn’t give me any error:

const multimap<Float_t> cnt::ArrayXAlongTrack(const Int_t trkl_nstps,
const Float_t trkl_stpu[],
const Float_t trkl_stpv[],
const Float_t trkl_stpx[],
const Float_t trkl_stpy[],
const Float_t trkl_stpz[]) const{
makefile.C (39.8 KB)

I am extremely sorry for creating a new thread, I did it by mistake.

Hi,

We do not provide the dictionary for multimap<float,float> by default. If you want to use from the interpreter your should generate it (aka compile a file with #pragma link C++ class multimap<float,float>;). However it might be better to simply compile your code.

On a different note, I am not sure what you are using the multimap for but it is usually a design/coding error to index a map or multimap on a float or double. I have seen cases where the map implementation was not able to properly insert (really) the value because the different part of the implementation where usually different ‘precision’ (yes different precision) to compare the index value … For floating point value that were close (or even ‘equal’) to meant that the various part ‘ranked’ the 2 values differently and even lead to data loss and/or corruption.

You might be better off to store the value in a vector and then sort them.

Cheers,
Philippe.