CMS 3D CMS Logo

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

#include <DQMSimpleFileSaver.h>

Inheritance diagram for TauDQMSimpleFileSaver:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void endJob () override
 
 TauDQMSimpleFileSaver (const edm::ParameterSet &)
 
 ~TauDQMSimpleFileSaver () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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

int cfgError_
 
std::string outputFileName_
 

Additional Inherited Members

- 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

Class to write all monitor elements registered in DQMStore into ROOT file (without any naming restrictions imposed by "regular" DQMFileSaver)

Author
Christian Veelken, UC Davis

Definition at line 22 of file DQMSimpleFileSaver.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 24 of file DQMSimpleFileSaver.h.

◆ MonitorElement

Definition at line 25 of file DQMSimpleFileSaver.h.

Constructor & Destructor Documentation

◆ TauDQMSimpleFileSaver()

TauDQMSimpleFileSaver::TauDQMSimpleFileSaver ( const edm::ParameterSet cfg)
explicit

Definition at line 14 of file DQMSimpleFileSaver.cc.

References looper::cfg, cfgError_, outputFileName_, and AlCaHLTBitMon_QueryRunRegistry::string.

14  {
15  //std::cout << "<TauDQMSimpleFileSaver::TauDQMSimpleFileSaver>:" << std::endl;
16 
17  usesResource("DQMStore");
18 
19  cfgError_ = 0;
20 
21  outputFileName_ = cfg.getParameter<std::string>("outputFileName");
22  if (outputFileName_.empty()) {
23  edm::LogError("TauDQMSimpleFileSaver") << " No outputFileName specified --> histograms will NOT be saved !!";
24  cfgError_ = 1;
25  } else if (outputFileName_.find(".root") == std::string::npos) {
26  edm::LogError("TauDQMSimpleFileSaver")
27  << " Invalid outputFileName = " << outputFileName_ << " --> histograms will NOT be saved !!";
28  cfgError_ = 1;
29  }
30 }
Log< level::Error, false > LogError

◆ ~TauDQMSimpleFileSaver()

TauDQMSimpleFileSaver::~TauDQMSimpleFileSaver ( )
override

Definition at line 32 of file DQMSimpleFileSaver.cc.

32  {
33  // nothing to be done yet...
34 }

Member Function Documentation

◆ analyze()

void TauDQMSimpleFileSaver::analyze ( const edm::Event ,
const edm::EventSetup  
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 36 of file DQMSimpleFileSaver.cc.

36  {
37  // nothing to be done yet...
38 }

◆ endJob()

void TauDQMSimpleFileSaver::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 40 of file DQMSimpleFileSaver.cc.

References cfgError_, gather_cfg::cout, L1TBPTX_cfi::dqmStore, and outputFileName_.

40  {
41  std::cout << "<TauDQMSimpleFileSaver::endJob>:" << std::endl;
42 
43  //--- check that configuration parameters contain no errors
44  if (cfgError_) {
45  edm::LogError("endJob") << " Error in Configuration ParameterSet --> histograms will NOT be saved !!";
46  return;
47  }
48 
49  //--- check that DQMStore service is available
50  if (!edm::Service<DQMStore>().isAvailable()) {
51  edm::LogError("endJob") << " Failed to access dqmStore --> histograms will NOT be saved !!";
52  return;
53  }
54 
57 }
Log< level::Error, false > LogError

Member Data Documentation

◆ cfgError_

int TauDQMSimpleFileSaver::cfgError_
private

Definition at line 34 of file DQMSimpleFileSaver.h.

Referenced by endJob(), and TauDQMSimpleFileSaver().

◆ outputFileName_

std::string TauDQMSimpleFileSaver::outputFileName_
private

Definition at line 33 of file DQMSimpleFileSaver.h.

Referenced by endJob(), and TauDQMSimpleFileSaver().