CMS 3D CMS Logo

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 () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
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)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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 ( )
override

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 
)
overrideprivate

Definition at line 58 of file RawDataSelector.cc.

References dataLabel, DEFINE_FWK_MODULE, fedRange, edm::Event::getByLabel(), eostools::move(), 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  std::unique_ptr<FEDRawDataCollection> selectedRawData = selector->select(rawData, fedRange);
73 
74 
75  iEvent.put(std::move(selectedRawData));
76 
77 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
std::unique_ptr< FEDRawDataCollection > select(const edm::Handle< FEDRawDataCollection > &rawData)
std::pair< int, int > fedRange
RawDataFEDSelector * selector
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:535
edm::InputTag dataLabel
HLT enums.
def move(src, dest)
Definition: eostools.py:511

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