37 std::unique_ptr<const EcalElectronicsMapping>
ec_mapping;
52 ec_mapping = std::make_unique<EcalElectronicsMapping>();
54 produces<FEDRawDataCollection>();
55 produces<EcalListOfFEDS>();
57 for (
int p = 0;
p < 1200;
p++) {
65 for (
int p = 0;
p < 1200;
p++) {
69 auto producedData = std::make_unique<FEDRawDataCollection>();
71 auto fedList = std::make_unique<EcalListOfFEDS>();
76 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
84 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
85 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
86 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
90 const std::vector<int> EC_FED_IDs =
ec_mapping->GetListofFEDs(ecEtaPhi);
95 bool rightFED =
false;
96 for (uint32_t
k = 0;
k < EC_FED_IDs.size();
k++) {
116 FEDRawData& fedDataProd = producedData->FEDData(
j);
117 if (fedDataProd.
size() != 0) {
123 unsigned char* dataProd = fedDataProd.
data();
124 const unsigned char*
data = fedData.
data();
125 for (
unsigned int k = 0;
k <
size; ++
k) {
126 dataProd[
k] = data[
k];
140 desc.
add<
double>(
"delta", 1.0);
141 descriptions.
add(
"ecalFED", desc);
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
~ECALRegFEDSelector() override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
ECALRegFEDSelector(const edm::ParameterSet &)
size_t size() const
Lenght of the data buffer in bytes.
static int fedIndex(const uint32_t index)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::unique_ptr< const EcalElectronicsMapping > ec_mapping
void resize(size_t newsize)
std::vector< unsigned int > const fedList
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
tuple size
Write out results.