37 std::unique_ptr<const EcalElectronicsMapping>
ec_mapping;
47 : delta_(iConfig.getParameter<double>(
"delta")),
48 tok_seed_(consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
edm::
InputTag>(
"regSeedLabel"))),
50 ec_mapping = std::make_unique<EcalElectronicsMapping>();
52 produces<FEDRawDataCollection>();
53 produces<EcalListOfFEDS>();
55 for (
int p = 0;
p < 1200;
p++) {
61 for (
int p = 0;
p < 1200;
p++) {
65 auto producedData = std::make_unique<FEDRawDataCollection>();
67 auto fedList = std::make_unique<EcalListOfFEDS>();
71 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
78 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
79 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
80 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
84 const std::vector<int> EC_FED_IDs =
ec_mapping->GetListofFEDs(ecEtaPhi);
89 bool rightFED =
false;
90 for (uint32_t
k = 0;
k < EC_FED_IDs.size();
k++) {
110 FEDRawData& fedDataProd = producedData->FEDData(
j);
111 if (fedDataProd.
size() != 0) {
117 unsigned char* dataProd = fedDataProd.
data();
118 const unsigned char*
data = fedData.
data();
119 for (
unsigned int k = 0;
k <
size; ++
k) {
134 desc.add<
double>(
"delta", 1.0);
135 descriptions.
add(
"ecalFED",
desc);
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
#define DEFINE_FWK_MODULE(type)
T const * product() const
size_t size() const
Lenght of the data buffer in bytes.
ECALRegFEDSelector(const edm::ParameterSet &)
static int fedIndex(const uint32_t index)
std::unique_ptr< const EcalElectronicsMapping > ec_mapping
void resize(size_t newsize)
std::vector< unsigned int > const fedList
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
~ECALRegFEDSelector() override=default
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.