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 Attributes
evf::EvFFEDSelector Class Reference

#include <EvFFEDSelector.h>

Inheritance diagram for evf::EvFFEDSelector:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EvFFEDSelector (const edm::ParameterSet &)
 
void produce (edm::Event &e, const edm::EventSetup &c)
 
 ~EvFFEDSelector ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::vector< unsigned int > fedlist_
 
edm::InputTag label_
 
edm::EDGetTokenT
< FEDRawDataCollection
token_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 15 of file EvFFEDSelector.h.

Constructor & Destructor Documentation

evf::EvFFEDSelector::EvFFEDSelector ( const edm::ParameterSet ps)
explicit

Definition at line 5 of file EvFFEDSelector.cc.

References label_, and token_.

6  : label_(ps.getParameter<edm::InputTag>("inputTag"))
7  , fedlist_(ps.getParameter<std::vector<unsigned int> >("fedList"))
8  {
9  token_ = consumes<FEDRawDataCollection>(label_);
10  produces<FEDRawDataCollection>();
11  }
T getParameter(std::string const &) const
std::vector< unsigned int > fedlist_
edm::EDGetTokenT< FEDRawDataCollection > token_
edm::InputTag label_
evf::EvFFEDSelector::~EvFFEDSelector ( )
inline

Definition at line 20 of file EvFFEDSelector.h.

20 {};

Member Function Documentation

void evf::EvFFEDSelector::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 12 of file EvFFEDSelector.cc.

References FEDRawData::data(), data, FEDRawDataCollection::FEDData(), fedlist_, edm::Event::getByToken(), edm::Event::put(), lumiPlot::rawdata, FEDRawData::resize(), FEDRawData::size(), and token_.

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

13  {
16  e.getByToken(token_,rawdata);
17  std::vector<unsigned int>::iterator it = fedlist_.begin();
18  for(;it!=fedlist_.end();it++)
19  {
20  const FEDRawData& data = rawdata->FEDData(*it);
21  if(data.size()>0){
22  FEDRawData& fedData=fedcoll->FEDData(*it);
23  fedData.resize(data.size());
24  memcpy(fedData.data(),data.data(),data.size());
25  }
26  }
27  std::auto_ptr<FEDRawDataCollection> bare_product(fedcoll);
28  e.put(bare_product);
29  }
std::vector< unsigned int > fedlist_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
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
void resize(size_t newsize)
Definition: FEDRawData.cc:32
edm::EDGetTokenT< FEDRawDataCollection > token_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
dictionary rawdata
Definition: lumiPlot.py:393

Member Data Documentation

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

Definition at line 27 of file EvFFEDSelector.h.

Referenced by produce().

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

Definition at line 26 of file EvFFEDSelector.h.

Referenced by EvFFEDSelector(), and produce().