Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-05 22:25:51

0001 #ifndef ECALRAWTODIGI_ECALDIGIDISPLAY_h
0002 #define ECALRAWTODIGI_ECALDIGIDISPLAY_h
0003 
0004 #include <memory>
0005 #include <vector>
0006 #include <string>
0007 
0008 #include <FWCore/Framework/interface/one/EDAnalyzer.h>
0009 #include <FWCore/Framework/interface/Event.h>
0010 #include <FWCore/Framework/interface/EventSetup.h>
0011 #include <FWCore/Framework/interface/MakerMacros.h>
0012 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0013 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
0014 #include "CaloOnlineTools/EcalTools/interface/EcalFedMap.h"
0015 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
0016 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0017 
0018 // class declaration
0019 
0020 class EcalDigiDisplay : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0021 public:
0022   //Constractor
0023   EcalDigiDisplay(const edm::ParameterSet& ps);
0024   //Distractor
0025   ~EcalDigiDisplay() override;
0026 
0027 private:
0028   void analyze(edm::Event const& e, edm::EventSetup const& c) override;
0029   void beginRun(edm::Run const&, edm::EventSetup const& c) override;
0030   void endRun(edm::Run const&, edm::EventSetup const& c) override;
0031   void endJob() override;
0032 
0033 protected:
0034   void readEBDigis(edm::Handle<EBDigiCollection> digis, int Mode);
0035   void readEEDigis(edm::Handle<EEDigiCollection> digis, int Mode);
0036   void readPNDigis(edm::Handle<EcalPnDiodeDigiCollection> PNs, int Mode);
0037 
0038   EcalFedMap* fedMap;
0039 
0040   const std::string ebDigiCollection_;
0041   const std::string eeDigiCollection_;
0042   const std::string digiProducer_;
0043 
0044   const edm::EDGetTokenT<EcalRawDataCollection> rawDataToken_;
0045   const edm::EDGetTokenT<EBDigiCollection> ebDigiToken_;
0046   const edm::EDGetTokenT<EEDigiCollection> eeDigiToken_;
0047   const edm::EDGetTokenT<EcalPnDiodeDigiCollection> pnDiodeDigiToken_;
0048   const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> ecalMappingToken_;
0049 
0050   std::vector<int> requestedFeds_;
0051   std::vector<std::string> requestedEbs_;
0052 
0053   bool inputIsOk;
0054   bool cryDigi;
0055   bool ttDigi;
0056   bool pnDigi;
0057 
0058   int mode;
0059 
0060   std::vector<int> listChannels;
0061   std::vector<int> listTowers;
0062   std::vector<int> listPns;
0063 
0064   const EcalElectronicsMapping* ecalElectronicsMap_;
0065 };
0066 #endif