CMS 3D CMS Logo

EcalTBTDCRawInfoDumper.cc
Go to the documentation of this file.
7 
8 #include <TFile.h>
11 
13  rawInfoCollection_ = ps.getParameter<std::string>("rawInfoCollection");
14  rawInfoProducer_ = ps.getParameter<std::string>("rawInfoProducer");
15  rootfile_ = ps.getUntrackedParameter<std::string>("rootfile", "ecalTDCRawInfoPlots.root");
16 }
17 
19 
20 //========================================================================
22  //========================================================================
23  h_TDCrawValue_ = new TH1F("h_TDCrawValue", "TDC raw value", 2048, -0.5, 2047.5);
24 }
25 
26 //========================================================================
28  //========================================================================
29  TFile f(rootfile_.c_str(), "RECREATE");
30  h_TDCrawValue_->Write();
31  f.Close();
32 }
33 
35  // Get input
37  const EcalTBTDCRawInfo* tdcRawInfo = nullptr;
38  //evt.getByLabel( digiProducer_, digiCollection_, pDigis);
39  e.getByLabel(rawInfoProducer_, ecalRawTDC);
40  if (!ecalRawTDC.isValid()) {
41  edm::LogError("EcalTBTDCRecInfoError") << "Error! can't get the product " << rawInfoCollection_.c_str();
42  } else {
43  tdcRawInfo = ecalRawTDC.product();
44  }
45 
46  if (tdcRawInfo) {
47  int tdcd = (*tdcRawInfo)[0].tdcValue();
48  h_TDCrawValue_->Fill(tdcd);
49  }
50  // Create empty output
51 }
Handle.h
MessageLogger.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalTBTDCRawInfoDumper::beginJob
void beginJob() override
Definition: EcalTBTDCRawInfoDumper.cc:21
EcalTBTDCRawInfoDumper::rawInfoProducer_
std::string rawInfoProducer_
Definition: EcalTBTDCRawInfoDumper.h:26
ESHandle.h
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
EcalTBTDCRawInfoDumper.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
EcalTBTDCRawInfoDumper::rootfile_
std::string rootfile_
Definition: EcalTBTDCRawInfoDumper.h:28
EcalTBTDCRawInfoDumper::rawInfoCollection_
std::string rawInfoCollection_
Definition: EcalTBTDCRawInfoDumper.h:27
MakerMacros.h
EcalTBTDCRawInfoDumper::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EcalTBTDCRawInfoDumper.cc:34
edm::ParameterSet
Definition: ParameterSet.h:47
EcalTBTDCRawInfoDumper::endJob
void endJob() override
Definition: EcalTBTDCRawInfoDumper.cc:27
EcalTBTDCRawInfo.h
EcalTBTDCRawInfo
Definition: EcalTBTDCRawInfo.h:13
EcalTBTDCRawInfoDumper::EcalTBTDCRawInfoDumper
EcalTBTDCRawInfoDumper(const edm::ParameterSet &ps)
Definition: EcalTBTDCRawInfoDumper.cc:12
EcalTBTDCRawInfoDumper::h_TDCrawValue_
TH1F * h_TDCrawValue_
Definition: EcalTBTDCRawInfoDumper.h:29
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTBTDCRawInfoDumper::~EcalTBTDCRawInfoDumper
~EcalTBTDCRawInfoDumper() override
Definition: EcalTBTDCRawInfoDumper.cc:18
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
EDCollection.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37