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 override final
 
 ~EvFFEDSelector ()
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
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
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 ( )
inline

Definition at line 22 of file EvFFEDSelector.h.

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
finaloverridevirtual

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:510

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