CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EvFFEDSelector.cc
Go to the documentation of this file.
1 #include "EvFFEDSelector.h"
2 
4 
5 namespace evf{
6 
8  : label_(ps.getParameter<edm::InputTag>("inputTag"))
9  , fedlist_(ps.getParameter<std::vector<unsigned int> >("fedList"))
10  {
11 
12  produces<FEDRawDataCollection>();
13  }
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  }
32 }
std::vector< unsigned int > fedlist_
void produce(edm::Event &e, const edm::EventSetup &c)
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
edm::InputTag label_
EvFFEDSelector(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
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