CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalTBTDCRawInfoDumper Class Reference

#include <EcalTBTDCRawInfoDumper.h>

Inheritance diagram for EcalTBTDCRawInfoDumper:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
 EcalTBTDCRawInfoDumper (const edm::ParameterSet &ps)
 
void endJob () override
 
 ~EcalTBTDCRawInfoDumper () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

TH1F * h_TDCrawValue_
 
std::string rawInfoCollection_
 
std::string rawInfoProducer_
 
std::string rootfile_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 17 of file EcalTBTDCRawInfoDumper.h.

Constructor & Destructor Documentation

◆ EcalTBTDCRawInfoDumper()

EcalTBTDCRawInfoDumper::EcalTBTDCRawInfoDumper ( const edm::ParameterSet ps)
explicit

Definition at line 12 of file EcalTBTDCRawInfoDumper.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), rawInfoCollection_, rawInfoProducer_, rootfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

12  {
13  rawInfoCollection_ = ps.getParameter<std::string>("rawInfoCollection");
14  rawInfoProducer_ = ps.getParameter<std::string>("rawInfoProducer");
15  rootfile_ = ps.getUntrackedParameter<std::string>("rootfile", "ecalTDCRawInfoPlots.root");
16 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const

◆ ~EcalTBTDCRawInfoDumper()

EcalTBTDCRawInfoDumper::~EcalTBTDCRawInfoDumper ( )
override

Definition at line 18 of file EcalTBTDCRawInfoDumper.cc.

18 {}

Member Function Documentation

◆ analyze()

void EcalTBTDCRawInfoDumper::analyze ( const edm::Event e,
const edm::EventSetup es 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 34 of file EcalTBTDCRawInfoDumper.cc.

References MillePedeFileConverter_cfg::e, h_TDCrawValue_, edm::HandleBase::isValid(), edm::Handle< T >::product(), rawInfoCollection_, and rawInfoProducer_.

34  {
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 }
T const * product() const
Definition: Handle.h:70
Log< level::Error, false > LogError
bool isValid() const
Definition: HandleBase.h:70

◆ beginJob()

void EcalTBTDCRawInfoDumper::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 21 of file EcalTBTDCRawInfoDumper.cc.

References h_TDCrawValue_.

21  {
22  //========================================================================
23  h_TDCrawValue_ = new TH1F("h_TDCrawValue", "TDC raw value", 2048, -0.5, 2047.5);
24 }

◆ endJob()

void EcalTBTDCRawInfoDumper::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 27 of file EcalTBTDCRawInfoDumper.cc.

References f, h_TDCrawValue_, and rootfile_.

27  {
28  //========================================================================
29  TFile f(rootfile_.c_str(), "RECREATE");
30  h_TDCrawValue_->Write();
31  f.Close();
32 }
double f[11][100]

Member Data Documentation

◆ h_TDCrawValue_

TH1F* EcalTBTDCRawInfoDumper::h_TDCrawValue_
private

Definition at line 29 of file EcalTBTDCRawInfoDumper.h.

Referenced by analyze(), beginJob(), and endJob().

◆ rawInfoCollection_

std::string EcalTBTDCRawInfoDumper::rawInfoCollection_
private

Definition at line 27 of file EcalTBTDCRawInfoDumper.h.

Referenced by analyze(), and EcalTBTDCRawInfoDumper().

◆ rawInfoProducer_

std::string EcalTBTDCRawInfoDumper::rawInfoProducer_
private

Definition at line 26 of file EcalTBTDCRawInfoDumper.h.

Referenced by analyze(), and EcalTBTDCRawInfoDumper().

◆ rootfile_

std::string EcalTBTDCRawInfoDumper::rootfile_
private

Definition at line 28 of file EcalTBTDCRawInfoDumper.h.

Referenced by EcalTBTDCRawInfoDumper(), and endJob().