Using FindManyP in Gallery
I need some help to read this dataproduct from an Art file using Gallery:
In LArSoft I do, and it works:
art::FindManyP<simb::MCParticle> SignAssn(SignTrue,event,"largeant"); //(being SignTrue a handle of simb::MCTruth)
In Gallery I translated that into this, using a functions in FindMaker.h:
art::FindManyP<simb::MCParticle> SignAssn=gallery::FindMaker().makeFindManyP<simb::MCParticle,void, gallery::Handle< std::vector<simb::MCTruth> >>(SignTrue,event,"largeant");
The macro compiles, but it does not find the product:
terminate called after throwing an instance of 'cet::coded_exception<art::errors::ErrorCodes, &art::ExceptionDetail::translate[abi:cxx11]>' what(): ---- LogicError BEGIN Invalid FindManyP ---- ProductNotFound BEGIN Failed to find product for type = 'art::Assns<simb::MCTruth,simb::MCParticle,void>' module = 'largeant' productInstance = '' process='' ---- ProductNotFound END Attempt to use a FindManyP where the underlying art::Assns product was not found. ---- LogicError END
I attach and a small example with a root file. I run it in larsoft_v09_15_00_e19_prof.
Any idea of what is wrong?