CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

RawDataSelector Class Reference

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

List of all members.

Public Member Functions

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

Private Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &)
virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

edm::InputTag dataLabel
std::pair< int, int > fedRange
RawDataFEDSelectorselector

Detailed Description

Definition at line 22 of file RawDataSelector.cc.


Constructor & Destructor Documentation

RawDataSelector::RawDataSelector ( const edm::ParameterSet pset) [explicit]

Definition at line 42 of file RawDataSelector.cc.

References fedRange, edm::ParameterSet::getParameter(), and selector.

                                                            :
  dataLabel(pset.getUntrackedParameter<edm::InputTag>("InputLabel",edm::InputTag("source"))) {

  fedRange = std::pair<int,int>(pset.getParameter<int>("lowerBound"), pset.getParameter<int>("upperBound"));

  selector = new RawDataFEDSelector();

  produces<FEDRawDataCollection>();

}
RawDataSelector::~RawDataSelector ( )

Definition at line 54 of file RawDataSelector.cc.

References selector.

                                  {
  delete selector;
}

Member Function Documentation

void RawDataSelector::beginRun ( const edm::Run ,
const edm::EventSetup  
) [private]
void RawDataSelector::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 59 of file RawDataSelector.cc.

References dataLabel, fedRange, edm::Event::getByLabel(), edm::Event::put(), RawDataFEDSelector::select(), and selector.

                                                                           {

  using namespace edm;
  using namespace std;

  Handle<FEDRawDataCollection> rawData;
  iEvent.getByLabel( dataLabel, rawData);

  /* here eventually perform some operation to get the list of FED's 
     to be written in the new collection.
     In this case we simply take the range from the ParameterSet */


  // the filtered raw data collections
  auto_ptr<FEDRawDataCollection> selectedRawData = selector->select(rawData, fedRange);


  iEvent.put(selectedRawData);
  
}

Member Data Documentation

Definition at line 37 of file RawDataSelector.cc.

Referenced by produce().

std::pair<int,int> RawDataSelector::fedRange [private]

Definition at line 38 of file RawDataSelector.cc.

Referenced by produce(), and RawDataSelector().

Definition at line 35 of file RawDataSelector.cc.

Referenced by produce(), RawDataSelector(), and ~RawDataSelector().