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::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 ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

std::vector< unsigned int > fedlist_
 
edm::InputTag label_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 13 of file EvFFEDSelector.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file EvFFEDSelector.cc.

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

Definition at line 18 of file EvFFEDSelector.h.

18 {};

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 14 of file EvFFEDSelector.cc.

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

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

15  {
18  e.getByLabel(label_,rawdata);
19  std::vector<unsigned int>::iterator it = fedlist_.begin();
20  for(;it!=fedlist_.end();it++)
21  {
22  const FEDRawData& data = rawdata->FEDData(*it);
23  if(data.size()>0){
24  FEDRawData& fedData=fedcoll->FEDData(*it);
25  fedData.resize(data.size());
26  memcpy(fedData.data(),data.data(),data.size());
27  }
28  }
29  std::auto_ptr<FEDRawDataCollection> bare_product(fedcoll);
30  e.put(bare_product);
31  }
std::vector< unsigned int > fedlist_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
Definition: FEDRawData.cc:33
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
edm::InputTag label_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
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:29
dictionary rawdata
Definition: lumiPlot.py:393

Member Data Documentation

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

Definition at line 24 of file EvFFEDSelector.h.

Referenced by produce().

edm::InputTag evf::EvFFEDSelector::label_
private