CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
RawDataSelector Class Reference
Inheritance diagram for RawDataSelector:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 RawDataSelector (const edm::ParameterSet &)
 
 ~RawDataSelector ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

42  :
43  dataLabel(pset.getUntrackedParameter<edm::InputTag>("InputLabel",edm::InputTag("source"))) {
44 
45  fedRange = std::pair<int,int>(pset.getParameter<int>("lowerBound"), pset.getParameter<int>("upperBound"));
46 
48 
49  produces<FEDRawDataCollection>();
50 
51 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::pair< int, int > fedRange
RawDataFEDSelector * selector
edm::InputTag dataLabel
RawDataSelector::~RawDataSelector ( )

Definition at line 54 of file RawDataSelector.cc.

References selector.

54  {
55  delete selector;
56 }
RawDataFEDSelector * selector

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 59 of file RawDataSelector.cc.

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

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

59  {
60 
61  using namespace edm;
62  using namespace std;
63 
65  iEvent.getByLabel( dataLabel, rawData);
66 
67  /* here eventually perform some operation to get the list of FED's
68  to be written in the new collection.
69  In this case we simply take the range from the ParameterSet */
70 
71 
72  // the filtered raw data collections
73  auto_ptr<FEDRawDataCollection> selectedRawData = selector->select(rawData, fedRange);
74 
75 
76  iEvent.put(selectedRawData);
77 
78 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
std::pair< int, int > fedRange
RawDataFEDSelector * selector
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::auto_ptr< FEDRawDataCollection > select(const edm::Handle< FEDRawDataCollection > &rawData)
edm::InputTag dataLabel

Member Data Documentation

edm::InputTag RawDataSelector::dataLabel
private

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().

RawDataFEDSelector* RawDataSelector::selector
private

Definition at line 35 of file RawDataSelector.cc.

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