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 | 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 overridefinal
 
 ~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)
 
 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 (const std::string &iProcessName, std::vector< const char * > &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 ()
 

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
< FEDRawDataCollection
token_
 

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_
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(), edm::ParameterSetDescription::add(), and HLT_25ns14e33_v1_cff::InputTag.

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 fedlist_, i, eostools::move(), lumiPlot::rawdata, 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  }
int i
Definition: DBlmapReader.cc:9
std::vector< unsigned int > fedlist_
edm::EDGetTokenT< FEDRawDataCollection > token_
def move
Definition: eostools.py:510
dictionary rawdata
Definition: lumiPlot.py:393

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