CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventSetup Class Reference

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

Detailed Description

Description: Provides access to conditions information from fwlite

Usage: This class provides a friendly interface for accessing conditions information which have been stored into a ROOT TFile.

As in the full framework, conditions data are collected in the EventSetup. The EventSetup holds 'Records' where each 'Record' holds data where all the data in one 'Record' is valid for the same period of time (referred to as an 'Interval of Validity' or IOV for short).

The normal usage of this class is as follows

TFile condFile("conditions.root");

fwlite::EventSetup es(&condFile);

fwlite::RecordID fooID = es.recordID("FooRecord");

for(...) { //looping over some event data eventID and timestamp are obtained from the event es.syncTo(eventID, timestamp);

fwlite::ESHandle<Foo> fooHandle; es.get(fooID).get(fooHandle);

now access the info in Foo std::cout << fooHandle->value()<<std::endl; }

Description: Container for all Records dealing with non-RunState info

Usage: <usage>