38 std::unique_ptr<const EcalElectronicsMapping>
ec_mapping;
48 : delta_(iConfig.getParameter<double>(
"delta")),
49 tok_seed_(consumes<
trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<
edm::
InputTag>(
"regSeedLabel"))),
51 ec_mapping = std::make_unique<EcalElectronicsMapping>();
53 produces<FEDRawDataCollection>();
54 produces<EcalListOfFEDS>();
56 for (
int p = 0;
p < 1200;
p++) {
62 for (
int p = 0;
p < 1200;
p++) {
66 auto producedData = std::make_unique<FEDRawDataCollection>();
68 auto fedList = std::make_unique<EcalListOfFEDS>();
72 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
79 for (uint32_t
p = 0;
p < isoPixTrackRefs.size();
p++) {
80 double etaObj_ = isoPixTrackRefs[
p]->track()->eta();
81 double phiObj_ = isoPixTrackRefs[
p]->track()->phi();
85 const std::vector<int> EC_FED_IDs =
ec_mapping->GetListofFEDs(ecEtaPhi);
90 bool rightFED =
false;
91 for (uint32_t
k = 0;
k < EC_FED_IDs.size();
k++) {
111 FEDRawData& fedDataProd = producedData->FEDData(
j);
112 if (fedDataProd.
size() != 0) {
113 edm::LogVerbatim(
"HcalCalib") <<
" More than one FEDRawDataCollection with data in FED " <<
j 114 <<
" Skipping the 2nd";
118 unsigned char* dataProd = fedDataProd.
data();
119 const unsigned char*
data = fedData.
data();
120 for (
unsigned int k = 0;
k <
size; ++
k) {
135 desc.add<
double>(
"delta", 1.0);
136 descriptions.
add(
"ecalFED",
desc);
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_seed_
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)
#define DEFINE_FWK_MODULE(type)
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.