DigiInvestigatorHistogramMaker

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#ifndef DPGAnalysis_SiStripTools_DigiInvestigatorHistogramMaker_H
#define DPGAnalysis_SiStripTools_DigiInvestigatorHistogramMaker_H

#include <string>
#include <map>
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "DPGAnalysis/SiStripTools/interface/RunHistogramManager.h"

namespace edm {
  class ParameterSet;
  class Event;
  class Run;
}  // namespace edm
class TH1F;
class TProfile;
class TFileDirectory;

class DigiInvestigatorHistogramMaker {
public:
  DigiInvestigatorHistogramMaker(edm::ConsumesCollector&& iC);
  DigiInvestigatorHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC);

  ~DigiInvestigatorHistogramMaker();

  void book(const std::string dirname, const std::map<unsigned int, std::string>& labels);
  void book(const std::string dirname);
  void beginRun(const edm::Run& iRun);
  void fill(const edm::Event& iEvent, const std::map<unsigned int, int>& ndigi);

private:
  std::string _hitname;
  const int _nbins;
  const unsigned int m_maxLS;
  const unsigned int m_LSfrac;
  int _scalefact;
  const bool _runHisto;
  const bool _fillHisto;
  std::map<unsigned int, int> _binmax;
  std::map<unsigned int, std::string> _labels;

  RunHistogramManager _rhm;
  RunHistogramManager _fhm;
  std::map<unsigned int, TProfile**> _nmultvsorbrun;
  std::map<unsigned int, TProfile**> _nmultvsbxrun;
  std::map<unsigned int, TProfile**> _nmultvsbxfill;
  std::map<unsigned int, TH1F*> _nmult;
  std::map<unsigned int, TFileDirectory*> _subdirs;
};

#endif  //  DPGAnalysis_SiStripTools_DigiInvestigatorHistogramMaker_H