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::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

int cfgError_
 
std::string outputFileName_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

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.

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

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

◆ ~TauDQMSimpleFileSaver()

TauDQMSimpleFileSaver::~TauDQMSimpleFileSaver ( )
override

Definition at line 30 of file DQMSimpleFileSaver.cc.

30  {
31  // nothing to be done yet...
32 }

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 34 of file DQMSimpleFileSaver.cc.

34  {
35  // nothing to be done yet...
36 }

◆ endJob()

void TauDQMSimpleFileSaver::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 38 of file DQMSimpleFileSaver.cc.

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

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

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().

gather_cfg.cout
cout
Definition: gather_cfg.py:144
dqm::legacy::DQMStore
Definition: DQMStore.h:727
L1TBPTX_cfi.dqmStore
dqmStore
Definition: L1TBPTX_cfi.py:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Service
Definition: Service.h:30
TauDQMSimpleFileSaver::outputFileName_
std::string outputFileName_
Definition: DQMSimpleFileSaver.h:33
TauDQMSimpleFileSaver::cfgError_
int cfgError_
Definition: DQMSimpleFileSaver.h:34
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
looper.cfg
cfg
Definition: looper.py:297