CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EcalTBTDCRawInfoDumper Class Reference

#include <EcalTBTDCRawInfoDumper.h>

Inheritance diagram for EcalTBTDCRawInfoDumper:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
 EcalTBTDCRawInfoDumper (const edm::ParameterSet &ps)
 
virtual void endJob ()
 
virtual ~EcalTBTDCRawInfoDumper ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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)
 

Detailed Description

Definition at line 17 of file EcalTBTDCRawInfoDumper.h.

Constructor & Destructor Documentation

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.

13 {
14  rawInfoCollection_ = ps.getParameter<std::string>("rawInfoCollection");
15  rawInfoProducer_ = ps.getParameter<std::string>("rawInfoProducer");
16  rootfile_ = ps.getUntrackedParameter<std::string>("rootfile","ecalTDCRawInfoPlots.root");
17 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
EcalTBTDCRawInfoDumper::~EcalTBTDCRawInfoDumper ( )
virtual

Definition at line 19 of file EcalTBTDCRawInfoDumper.cc.

19  {
20 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 39 of file EcalTBTDCRawInfoDumper.cc.

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

40 {
41  // Get input
43  const EcalTBTDCRawInfo* tdcRawInfo = 0;
44  //evt.getByLabel( digiProducer_, digiCollection_, pDigis);
45  e.getByLabel( rawInfoProducer_, ecalRawTDC);
46  if (!ecalRawTDC.isValid()) {
47  edm::LogError("EcalTBTDCRecInfoError") << "Error! can't get the product " << rawInfoCollection_.c_str() ;
48  } else {
49  tdcRawInfo = ecalRawTDC.product();
50  }
51 
52 
53  if (tdcRawInfo)
54  {
55  int tdcd = (*tdcRawInfo)[0].tdcValue();
56  h_TDCrawValue_->Fill(tdcd);
57  }
58  // Create empty output
59 }
bool isValid() const
Definition: HandleBase.h:75
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
T const * product() const
Definition: Handle.h:81
void EcalTBTDCRawInfoDumper::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 24 of file EcalTBTDCRawInfoDumper.cc.

References h_TDCrawValue_.

25 {
26  //========================================================================
27  h_TDCrawValue_ = new TH1F("h_TDCrawValue","TDC raw value",2048,-0.5,2047.5);
28 }
void EcalTBTDCRawInfoDumper::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 32 of file EcalTBTDCRawInfoDumper.cc.

References f, h_TDCrawValue_, and rootfile_.

32  {
33 //========================================================================
34  TFile f(rootfile_.c_str(),"RECREATE");
35  h_TDCrawValue_->Write();
36  f.Close();
37 }
double f[11][100]

Member Data Documentation

TH1F* EcalTBTDCRawInfoDumper::h_TDCrawValue_
private

Definition at line 32 of file EcalTBTDCRawInfoDumper.h.

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

std::string EcalTBTDCRawInfoDumper::rawInfoCollection_
private

Definition at line 30 of file EcalTBTDCRawInfoDumper.h.

Referenced by analyze(), and EcalTBTDCRawInfoDumper().

std::string EcalTBTDCRawInfoDumper::rawInfoProducer_
private

Definition at line 29 of file EcalTBTDCRawInfoDumper.h.

Referenced by analyze(), and EcalTBTDCRawInfoDumper().

std::string EcalTBTDCRawInfoDumper::rootfile_
private

Definition at line 31 of file EcalTBTDCRawInfoDumper.h.

Referenced by EcalTBTDCRawInfoDumper(), and endJob().