Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:04

0001 #ifndef ESElectronicsMapper_H
0002 #define ESElectronicsMapper_H
0003 
0004 #include <iostream>
0005 #include <fstream>
0006 #include <vector>
0007 #include <sstream>
0008 #include <map>
0009 
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "FWCore/ParameterSet/interface/FileInPath.h"
0012 #include "DataFormats/EcalDetId/interface/ESDetId.h"
0013 
0014 class ESElectronicsMapper {
0015 public:
0016   ESElectronicsMapper(const edm::ParameterSet& ps);
0017   ~ESElectronicsMapper(){};
0018 
0019   int getFED(const ESDetId& id);
0020   int getFED(int zside, int plane, int x, int y);
0021   std::vector<int> GetListofFEDs(const std::vector<int>& eeFEDs) const;
0022   void GetListofFEDs(const std::vector<int>& eeFEDs, std::vector<int>& esFEDs) const;
0023   int getKCHIP(const ESDetId& id);
0024   int getKCHIP(int zside, int plane, int x, int y);
0025 
0026 private:
0027   edm::FileInPath lookup_;
0028 
0029   int fed_[2][2][40][40];
0030   int kchip_[2][2][40][40];
0031   std::map<int, std::vector<int> > ee_es_map_;
0032 };
0033 
0034 #endif