CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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::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
 
bool registeredToConsumeMany (TypeID const &, 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::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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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

Definition at line 24 of file DQMSimpleFileSaver.h.

Definition at line 25 of file DQMSimpleFileSaver.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file DQMSimpleFileSaver.cc.

References cfgError_, edm::ParameterSet::getParameter(), outputFileName_, and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
Log< level::Error, false > LogError
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TauDQMSimpleFileSaver::~TauDQMSimpleFileSaver ( )
override

Definition at line 30 of file DQMSimpleFileSaver.cc.

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

Member Function Documentation

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 }
void TauDQMSimpleFileSaver::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 38 of file DQMSimpleFileSaver.cc.

References cfgError_, gather_cfg::cout, outputFileName_, and dqm::implementation::DQMStore::save().

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 
53  DQMStore& dqmStore = (*edm::Service<DQMStore>());
54  dqmStore.save(outputFileName_);
55 }
Log< level::Error, false > LogError
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

int TauDQMSimpleFileSaver::cfgError_
private

Definition at line 34 of file DQMSimpleFileSaver.h.

Referenced by endJob(), and TauDQMSimpleFileSaver().

std::string TauDQMSimpleFileSaver::outputFileName_
private

Definition at line 33 of file DQMSimpleFileSaver.h.

Referenced by endJob(), and TauDQMSimpleFileSaver().