Handling VecOps::RVec vectors

Dear root experts,

I am trying to access some VecOps::RVec vectors.
The code seems to work but there are some errors as following:

Error in <TExMap::Add>: key 1 is not unique
Error in <TExMap::Add>: key 1 is not unique
Error in <TExMap::Add>: key 1 is not unique
Error in <TExMap::Add>: key 1 is not unique

Do you have any idea how to get rid of these errors?
I attached the zip file which contains the codes and inputs.
You can run it by doing: root -l -q -b runProcess.C
codeAndInput.zip (11.8 KB)

Best,

Diallo.

Hi @diboye,

thanks for your question. I am trying to reproduce your issue but the root file you provided doesn’t exactly match what your macro includes, namely I need p8_ee_ZZ_ecm240_sel0_NoCuts.root but I only have p8_ee_ZZ_ecm240_sel0_NoCuts_histo_2e.root.

Cheers,
Marta

Hello @mczurylo ,

Thanks for your reply.
You are right and sorry about that.
I put the input file here: p8_ee_ZZ_ecm240_sel0_NoCuts_2e_MET10.root - Google Drive
Now you have to change the file name in runProcess.C to p8_ee_ZZ_ecm240_sel0_NoCuts_2e_MET10

Best,

Diallo.

Hi,

Thanks for your reproducer, I first got an error about a missing TTreeBranch:
Error in <TTreeReaderValueBase::CreateProxy()>: The tree does not have a branch called chargeOfelectrons. You could check with TTree::Print() for available branches. libc++abi: terminating due to uncaught exception of type std::out_of_range: RVecN::at: size is 0 but out-of-bounds index 0 was requested.
If I comment out this line:
TTreeReaderValue<Float_t> chargeOfelectrons = {fReader, "chargeOfelectrons"}; in plottingBis.h, it seems the program is running.

Cheers,
Marta

Hi,

Thanks for your reply. The program runs for me too, but it gives the errors I showed in my first message.
Did you get those errors?
Here is the root version I am using, which could be the issue:

| Welcome to ROOT 6.22/09 https://root.cern |
| (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for macosx64 on Oct 30 2021, 09:15:00 |
| From heads/v6-22-00-patches@v6-22-08-24-gdd3f79d017 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’

Hi @diboye,

Indeed, that could be an issue - 6.22 is pretty old, I would suggest that you install the newest version 6.30.04.

Cheers,
Marta

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