cms-sw/cmssw — pull request #1677 by Dr15Jones (2013-12-05 02:26:58+00:00)
Title: Make failed Event::get* calls faster

Vincenzo Innocente's profiling of HLT showed that when an edm::Event::get* call failed to find a product, the code took a great deal of time to create the cms::Exception which explained the problem. However, since the code in quesiton always checked the validity of the returned edm::Handle, the exception was never used and therefore was created for no reason. This change delays creating the cms::Exception until it is absolutely needed. Profiling shows this improves performance.