Yes - definitely should avoid try-catch… Thanks Yana.

On Jan 26, 2014, at 2:26 PM, ianna <notifications@github.com>
 wrote:

> In L1Trigger/CSCTriggerPrimitives/plugins/CSCTriggerPrimitivesProducer.cc:
> 
> > @@ -75,6 +75,16 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev,
> >      edm::ESHandle<CSCGeometry> h;
> >      setup.get<MuonGeometryRecord>().get(h);
> >      CSCTriggerGeometry::setGeometry(h);
> > +    lctBuilder_->setCSCGeometry(&*h);
> > +
> > +    edm::ESHandle<GEMGeometry> h_gem;
> > +    try {
> > +      setup.get<MuonGeometryRecord>().get(h_gem);
> > +      lctBuilder_->setGEMGeometry(&*h_gem);
> 
> @dildick - you should get the handle first, then check if it is valid:
> 
> edm::ESHandle h_gem;
> setup.get().get(h_gem);
> if (h_gem.isValid()) {
> lctBuilder_->setGEMGeometry(&*h_gem);
> }
> 
> —
> Reply to this email directly or view it on GitHub.
>