CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

RawDataSelector Class Reference

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

List of all members.

Public Member Functions

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

Private Member Functions

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

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 41 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 53 of file RawDataSelector.cc.

References selector.

                                  {
  delete selector;
}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 58 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 36 of file RawDataSelector.cc.

Referenced by produce().

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

Definition at line 37 of file RawDataSelector.cc.

Referenced by produce(), and RawDataSelector().

Definition at line 34 of file RawDataSelector.cc.

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