File indexing completed on 2024-04-06 12:00:04
0001 #ifndef ECALPNGRAPHS_h
0002 #define ECALPNGRAPHS_h
0003
0004 #include <FWCore/Framework/interface/one/EDAnalyzer.h>
0005 #include <FWCore/Framework/interface/Event.h>
0006 #include <FWCore/Framework/interface/MakerMacros.h>
0007 #include <DataFormats/EcalDigi/interface/EcalDigiCollections.h>
0008 #include <DataFormats/EcalDetId/interface/EcalDetIdCollections.h>
0009
0010 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveDigi.h>
0011 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h>
0012
0013 #include "CaloOnlineTools/EcalTools/interface/EcalFedMap.h"
0014 #include <iostream>
0015 #include <vector>
0016
0017 #include "TFile.h"
0018 #include "TGraph.h"
0019
0020 class EcalPnGraphs : public edm::one::EDAnalyzer<> {
0021 public:
0022 EcalPnGraphs(const edm::ParameterSet& ps);
0023 ~EcalPnGraphs() override;
0024
0025 private:
0026 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0027 void beginJob() override;
0028 void endJob() override;
0029
0030 std::string intToString(int num);
0031
0032 EcalFedMap* fedMap;
0033
0034 protected:
0035 edm::EDGetTokenT<EcalPnDiodeDigiCollection> digiProducer_;
0036
0037 std::vector<int> feds_;
0038 std::vector<std::string> ebs_;
0039
0040 int verbosity;
0041 int eventCounter;
0042 int first_Pn;
0043 bool inputIsOk;
0044
0045 std::string fileName;
0046
0047 std::vector<int> listChannels;
0048 std::vector<int> listAllChannels;
0049 std::vector<int> listPns;
0050 std::vector<int> listAllPns;
0051
0052 int numPn;
0053
0054 int abscissa[50];
0055 int ordinate[50];
0056
0057 std::vector<TGraph> graphs;
0058
0059 TFile* root_file;
0060 };
0061
0062 #endif