Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:38

0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: t; tab-width: 8; -*-
0002 
0003 /**
0004  *
0005  * Test module for matacq data producing some histograms.
0006  *
0007  * Parameters:
0008  * <UL> outputRootFile: untracked string, name of the root file to create for
0009  * the histograms
0010  * <LI> nTimePlots: untracked int, number of events whose laser pulse is to
0011  * be plotted.
0012  * <LI> firstTimePlotEvent: untracked int, first event for laser pulse time
0013  * plot starting at 1.
0014  * </UL>
0015  */
0016 
0017 #include <FWCore/Framework/interface/one/EDAnalyzer.h>
0018 #include <FWCore/Framework/interface/Event.h>
0019 #include <FWCore/Framework/interface/MakerMacros.h>
0020 
0021 #include <TFile.h>
0022 #include <memory>
0023 
0024 class TProfile;
0025 class TH1D;
0026 
0027 class EcalMatacqHist : public edm::one::EDAnalyzer<> {
0028 public:
0029   EcalMatacqHist(const edm::ParameterSet& ps);
0030 
0031   virtual ~EcalMatacqHist();
0032 
0033 protected:
0034   void analyze(const edm::Event& e, const edm::EventSetup& c);
0035 
0036 private:
0037   std::string outFileName;
0038   int nTimePlots;
0039   int firstTimePlotEvent;
0040   int iEvent;
0041   double hTTrigMin;
0042   double hTTrigMax;
0043   std::unique_ptr<TFile> outFile;
0044   std::vector<TProfile> profiles;
0045   //profile->MATACQ CH ID map
0046   std::vector<int> profChId;
0047   TH1D* hTTrig;
0048 };