CMS 3D CMS Logo

GenericHandle Class Reference

#include <FWCore/Framework/interface/GenericHandle.h>

Detailed Description

Description: Allows interaction with data in the Event without actually using the C++ class

Usage: The GenericHandle allows one to get data back from the edm::Event as an ObjectWithDict instead of as the actual C++ class type.

make a handle to hold an instance of 'MyClass' edm::GenericHandle myHandle("MyClass");

event.getByLabel("mine",myHandle);

call the print method of 'MyClass' instance myHandle->invoke("print);