CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
evf::EvFFEDSelector Class Reference

#include <EvFFEDSelector.h>

Inheritance diagram for evf::EvFFEDSelector:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EvFFEDSelector (edm::ParameterSet const &)
 
void produce (edm::StreamID, edm::Event &, edm::EventSetup const &) const final
 
 ~EvFFEDSelector () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

std::vector< unsigned int > fedlist_
 
edm::EDGetTokenT< FEDRawDataCollectiontoken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase 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
 
- 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 18 of file EvFFEDSelector.h.

Constructor & Destructor Documentation

evf::EvFFEDSelector::EvFFEDSelector ( edm::ParameterSet const &  config)
explicit

Definition at line 10 of file EvFFEDSelector.cc.

10  :
11  token_( consumes<FEDRawDataCollection>( config.getParameter<edm::InputTag>("inputTag")) ),
12  fedlist_( config.getParameter<std::vector<unsigned int> >("fedList") )
13  {
14  produces<FEDRawDataCollection>();
15  }
std::vector< unsigned int > fedlist_
Definition: config.py:1
edm::EDGetTokenT< FEDRawDataCollection > token_
evf::EvFFEDSelector::~EvFFEDSelector ( )
inlineoverride

Definition at line 22 of file EvFFEDSelector.h.

References fillDescriptions().

22 { }

Member Function Documentation

void evf::EvFFEDSelector::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 17 of file EvFFEDSelector.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

17  {
19  desc.add<edm::InputTag>("inputTag",edm::InputTag("source"));
20  {
21  std::vector<unsigned int> temp1;
22  temp1.reserve(2);
23  temp1.push_back(812);
24  temp1.push_back(1023);
25  desc.add<std::vector<unsigned int> >("fedList",temp1);
26  }
27  descriptions.add("EvFFEDSelector",desc);
28  }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void evf::EvFFEDSelector::produce ( edm::StreamID  sid,
edm::Event event,
edm::EventSetup const &  setup 
) const
finalvirtual

Implements edm::global::EDProducerBase.

Definition at line 30 of file EvFFEDSelector.cc.

References FEDRawDataCollection::FEDData(), fedlist_, mps_fire::i, eostools::move(), matplotRender::rawdata, FEDRawData::size(), and token_.

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

31  {
33  event.getByToken(token_, rawdata);
34 
35  std::unique_ptr<FEDRawDataCollection> fedcoll( new FEDRawDataCollection() );
36 
37  for (unsigned int i : fedlist_)
38  if (rawdata->FEDData(i).size() > 0)
39  fedcoll->FEDData(i) = rawdata->FEDData(i);
40 
41  event.put(std::move(fedcoll));
42  }
std::vector< unsigned int > fedlist_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::EDGetTokenT< FEDRawDataCollection > token_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

std::vector<unsigned int> evf::EvFFEDSelector::fedlist_
private

Definition at line 29 of file EvFFEDSelector.h.

Referenced by produce().

edm::EDGetTokenT<FEDRawDataCollection> evf::EvFFEDSelector::token_
private

Definition at line 28 of file EvFFEDSelector.h.

Referenced by produce().