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 
3 namespace evf{
4 
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  }
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  }
30 }
std::vector< unsigned int > fedlist_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
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
edm::EDGetTokenT< FEDRawDataCollection > token_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
edm::InputTag label_
EvFFEDSelector(const edm::ParameterSet &)
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