CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
Event Class Reference

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

Public Member Functions

bool operator< (const Event &rhs) const
 
void outputEvent ()
 
void resetPredictedValue ()
 

Public Attributes

Double_t CSCPt
 
std::vector< Double_t > data
 
Double_t DTPt
 
Int_t id
 
Int_t Mode
 
Double_t predictedValue
 
Int_t Quality
 
Double_t tmvaPt
 
Double_t tmvaPt1
 
Double_t trueValue
 

Static Public Attributes

static Int_t sortingIndex = 1
 

Detailed Description

Description: Provide event data access in FWLite

Usage: This class is meant to allow one to loop over all events in a TFile and then read the data in an Event in a manner analogous to how data is read in the full framework. A typical use would be

TFile f("foo.root");
for(ev.toBeing(); ! ev.atEnd(); ++ev) {
foos.getByLabel(ev, "myFoos");
}

The above example will work for both ROOT and compiled code. However, it is possible to exactly match the full framework if you only intend to compile your code. In that case the access would look like

TFile f("foo.root");
edm::InputTag fooTag("myFoos");
for(ev.toBeing(); ! ev.atEnd(); ++ev) {
ev.getByLabel(fooTag, foos);
}

Description: This is the primary interface for accessing EDProducts from a single collision and inserting new derived products.

For its usage, see "FWCore/Framework/interface/PrincipalGetAdapter.h"

Definition at line 16 of file Event.h.

Member Function Documentation

bool Event::operator< ( const Event rhs) const
inline

Definition at line 32 of file Event.h.

References data, and sortingIndex.

33  {
34  return data[sortingIndex] < rhs.data[sortingIndex];
35  }
static Int_t sortingIndex
Definition: Event.h:28
std::vector< Double_t > data
Definition: Event.h:30
void Event::outputEvent ( )
inline

Definition at line 37 of file Event.h.

References gather_cfg::cout, data, i, predictedValue, and trueValue.

38  {
39  std::cout << "trueValue = " << trueValue << std::endl;
40  std::cout << "predictedValue = " << predictedValue << std::endl;
41  std::cout << "id = " << id << std::endl;
42  for(unsigned int i=0; i<data.size(); i++)
43  {
44  std::cout << "x"<< i << "=" << data[i] << ", ";
45  }
46  std::cout << std::endl;
47 
48  }
Double_t predictedValue
Definition: Event.h:20
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:145
Double_t trueValue
Definition: Event.h:19
std::vector< Double_t > data
Definition: Event.h:30
void Event::resetPredictedValue ( )
inline

Definition at line 50 of file Event.h.

References predictedValue.

50 { predictedValue = 0; }
Double_t predictedValue
Definition: Event.h:20

Member Data Documentation

Double_t Event::CSCPt

Definition at line 22 of file Event.h.

std::vector<Double_t> Event::data
Double_t Event::DTPt

Definition at line 21 of file Event.h.

Int_t Event::id

Definition at line 29 of file Event.h.

Referenced by MixingWorker::addSignals(), compareEventsById(), and Forest::generate().

Int_t Event::Mode

Definition at line 25 of file Event.h.

Double_t Event::predictedValue
Int_t Event::Quality

Definition at line 26 of file Event.h.

Int_t Event::sortingIndex = 1
static

Definition at line 28 of file Event.h.

Referenced by compareEvents(), Forest::generate(), operator<(), and Forest::sortEventVectors().

Double_t Event::tmvaPt

Definition at line 23 of file Event.h.

Double_t Event::tmvaPt1

Definition at line 24 of file Event.h.

Double_t Event::trueValue