test
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::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RawDataSelector (const edm::ParameterSet &)
 
 ~RawDataSelector ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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.

41  :
42  dataLabel(pset.getUntrackedParameter<edm::InputTag>("InputLabel",edm::InputTag("source"))) {
43 
44  fedRange = std::pair<int,int>(pset.getParameter<int>("lowerBound"), pset.getParameter<int>("upperBound"));
45 
47 
48  produces<FEDRawDataCollection>();
49 
50 }
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 53 of file RawDataSelector.cc.

References selector.

53  {
54  delete selector;
55 }
RawDataFEDSelector * selector

Member Function Documentation

void RawDataSelector::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 58 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().

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

Member Data Documentation

edm::InputTag RawDataSelector::dataLabel
private

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

RawDataFEDSelector* RawDataSelector::selector
private

Definition at line 34 of file RawDataSelector.cc.

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