CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

NTuplingDevice Class Reference

#include <Workspace/NTuplingDevice/src/NTuplingDevice.cc>

Inheritance diagram for NTuplingDevice:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 NTuplingDevice (const edm::ParameterSet &)
 ~NTuplingDevice ()

Private Member Functions

virtual void beginJob ()
virtual void endJob ()
virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

NTuplerntupler_

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 39 of file NTuplingDevice.cc.


Constructor & Destructor Documentation

NTuplingDevice::NTuplingDevice ( const edm::ParameterSet iConfig) [explicit]

Definition at line 64 of file NTuplingDevice.cc.

References reco::get(), edm::ParameterSet::getParameter(), and ntupler_.

{
  //this Ntupler can work with the InputTagDistributor, but should not be configured as such.
  edm::ParameterSet ntPset = iConfig.getParameter<edm::ParameterSet>("Ntupler");
  std::string ntuplerName=ntPset.getParameter<std::string>("ComponentName");
  ntupler_ = NTuplerFactory::get()->create(ntuplerName, ntPset);

  //register the leaves from the ntupler
  ntupler_->registerleaves(this);

  //put a dummy product if the ntupler does not output on edm
  produces<double>("dummy");
}
NTuplingDevice::~NTuplingDevice ( )

Definition at line 79 of file NTuplingDevice.cc.

{}

Member Function Documentation

void NTuplingDevice::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 92 of file NTuplingDevice.cc.

{
}
void NTuplingDevice::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 98 of file NTuplingDevice.cc.

                       {
}
void NTuplingDevice::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 83 of file NTuplingDevice.cc.

References NTupler::fill(), ntupler_, edm::Event::put(), and v.

{
  ntupler_->fill(iEvent);
  std::auto_ptr<double> v(new double(0));
  iEvent.put(v,"dummy");
}

Member Data Documentation

Definition at line 50 of file NTuplingDevice.cc.

Referenced by NTuplingDevice(), and produce().