CMS 3D CMS Logo

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

#include <DQM/TrackingMonitorCluster/interface/TrackingOfflineDQM.h>

Inheritance diagram for TrackingOfflineDQM:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 TrackingOfflineDQM (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~TrackingOfflineDQM () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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 Member Functions

void beginJob () override
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
 Endjob. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) override
 End Luminosity Block. More...
 
bool openInputFile ()
 

Private Attributes

TrackingActionExecutoractionExecutor_
 
bool allpixelFEDsFound_
 
edm::ParameterSet configPar_
 
int globalStatusFilling_
 
std::string inputFileName_
 
std::string outputFileName_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
const RunInfosumFED_ = nullptr
 
bool trackerFEDsFound_
 
bool usedWithEDMtoMEConverter_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- 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)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Description: DQM class to perform Summary creation Quality Test on a merged Root file after CAF processing Usage: <usage>

Definition at line 44 of file TrackingOfflineDQM.h.

Constructor & Destructor Documentation

◆ TrackingOfflineDQM()

TrackingOfflineDQM::TrackingOfflineDQM ( const edm::ParameterSet ps)

Constructor.

Construct object.

Parameters
roPARAMETER_SETRegular Parameter Set that represent read configuration file

Definition at line 56 of file TrackingOfflineDQM.cc.

References actionExecutor_, configPar_, edm::ParameterSet::getUntrackedParameter(), globalStatusFilling_, inputFileName_, outputFileName_, AlCaHLTBitMon_QueryRunRegistry::string, and usedWithEDMtoMEConverter_.

57  : configPar_(pSet), runInfoToken_(esConsumes<RunInfo, RunInfoRcd, edm::Transition::BeginRun>()) {
58  // Action Executor
60 
61  usedWithEDMtoMEConverter_ = configPar_.getUntrackedParameter<bool>("UsedWithEDMtoMEConverter", false);
64  globalStatusFilling_ = configPar_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
65 }
std::string inputFileName_
std::string outputFileName_
T getUntrackedParameter(std::string const &, T const &) const
TrackingActionExecutor * actionExecutor_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
edm::ParameterSet configPar_

◆ ~TrackingOfflineDQM()

TrackingOfflineDQM::~TrackingOfflineDQM ( )
override

Destructor.

Definition at line 71 of file TrackingOfflineDQM.cc.

71 {}

Member Function Documentation

◆ beginJob()

void TrackingOfflineDQM::beginJob ( void  )
overrideprivatevirtual

BeginJob.

Executed at the begining of application.

Parameters
eSetupEvent Setup object

Reimplemented from edm::one::EDProducerBase.

Definition at line 79 of file TrackingOfflineDQM.cc.

79 { edm::LogInfo("BeginJobDone") << "TrackingOfflineDQM::beginJob done"; }
Log< level::Info, false > LogInfo

◆ beginRun()

void TrackingOfflineDQM::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivate

BeginRun.

Executed at the begining a Run.

Parameters
runRun object
eSetupEvent Setup object with Geometry, Magnetic Field, etc.

Definition at line 89 of file TrackingOfflineDQM.cc.

References allpixelFEDsFound_, edm::EventSetup::getHandle(), edm::ESHandleBase::isValid(), RunInfo::m_fed_in, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, edm::ESHandle< T >::product(), runInfoToken_, sumFED_, and trackerFEDsFound_.

89  {
90  edm::LogInfo("BeginRun") << " Begining of Run";
91 
92  int nFEDs = 0;
93  int nPixelFEDs = 0;
94  edm::ESHandle<RunInfo> runInfoRec = eSetup.getHandle(runInfoToken_);
95  if (runInfoRec.isValid()) {
96  sumFED_ = runInfoRec.product();
97  if (sumFED_ != nullptr) {
98  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
99  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
100  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
101  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
102 
103  std::vector<int> FedsInIds = sumFED_->m_fed_in;
104  for (auto fedID : FedsInIds) {
105  if (fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax) {
106  ++nPixelFEDs;
107  ++nFEDs;
108  }
109  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
110  ++nFEDs;
111  }
112  }
113  }
114  const int siPixelFedN = (FEDNumbering::MAXSiPixelFEDID - FEDNumbering::MINSiPixelFEDID + 1);
115  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
116  trackerFEDsFound_ = (nFEDs > 0);
117 }
T const * product() const
Definition: ESHandle.h:86
std::vector< int > m_fed_in
Definition: RunInfo.h:25
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
bool isValid() const
Definition: ESHandle.h:44
Log< level::Info, false > LogInfo
const RunInfo * sumFED_

◆ dqmEndJob()

void TrackingOfflineDQM::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprivatevirtual

Endjob.

End Run.

Implements DQMEDHarvester.

Definition at line 146 of file TrackingOfflineDQM.cc.

References actionExecutor_, TrackingActionExecutor::createGlobalStatus(), TrackingActionExecutor::fillDummyGlobalStatus(), TrackingActionExecutor::fillGlobalStatus(), globalStatusFilling_, and trackerFEDsFound_.

146  {
147  edm::LogInfo("TrackingOfflineDQM") << "dqmEndJob";
148 
149  if (globalStatusFilling_ > 0) {
150  actionExecutor_->createGlobalStatus(ibooker_, igetter_);
151 
152  if (!trackerFEDsFound_) {
154  return;
155  } else {
156  actionExecutor_->fillGlobalStatus(ibooker_, igetter_);
157  }
158  }
159 }
void fillGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
TrackingActionExecutor * actionExecutor_
Log< level::Info, false > LogInfo
void createGlobalStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)

◆ dqmEndLuminosityBlock()

void TrackingOfflineDQM::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

End Luminosity Block.

End Lumi.

Reimplemented from DQMEDHarvester.

Definition at line 125 of file TrackingOfflineDQM.cc.

References actionExecutor_, TrackingActionExecutor::createLSStatus(), TrackingActionExecutor::fillDummyLSStatus(), TrackingActionExecutor::fillStatusAtLumi(), globalStatusFilling_, and trackerFEDsFound_.

128  {
129  edm::LogInfo("TrackingOfflineDQM") << "dqmBeginLuminosityBlock";
130 
131  if (globalStatusFilling_ > 0) {
132  actionExecutor_->createLSStatus(ibooker_, igetter_);
133 
134  if (trackerFEDsFound_)
135  actionExecutor_->fillStatusAtLumi(ibooker_, igetter_);
136  else
138  }
139 }
void fillStatusAtLumi(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void createLSStatus(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
TrackingActionExecutor * actionExecutor_
Log< level::Info, false > LogInfo

◆ openInputFile()

bool TrackingOfflineDQM::openInputFile ( )
private

Member Data Documentation

◆ actionExecutor_

TrackingActionExecutor* TrackingOfflineDQM::actionExecutor_
private

Definition at line 71 of file TrackingOfflineDQM.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and TrackingOfflineDQM().

◆ allpixelFEDsFound_

bool TrackingOfflineDQM::allpixelFEDsFound_
private

Definition at line 77 of file TrackingOfflineDQM.h.

Referenced by beginRun().

◆ configPar_

edm::ParameterSet TrackingOfflineDQM::configPar_
private

Definition at line 79 of file TrackingOfflineDQM.h.

Referenced by TrackingOfflineDQM().

◆ globalStatusFilling_

int TrackingOfflineDQM::globalStatusFilling_
private

Definition at line 74 of file TrackingOfflineDQM.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and TrackingOfflineDQM().

◆ inputFileName_

std::string TrackingOfflineDQM::inputFileName_
private

Definition at line 72 of file TrackingOfflineDQM.h.

Referenced by TrackingOfflineDQM().

◆ outputFileName_

std::string TrackingOfflineDQM::outputFileName_
private

Definition at line 73 of file TrackingOfflineDQM.h.

Referenced by TrackingOfflineDQM().

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> TrackingOfflineDQM::runInfoToken_
private

Definition at line 80 of file TrackingOfflineDQM.h.

Referenced by beginRun().

◆ sumFED_

const RunInfo* TrackingOfflineDQM::sumFED_ = nullptr
private

Definition at line 81 of file TrackingOfflineDQM.h.

Referenced by beginRun().

◆ trackerFEDsFound_

bool TrackingOfflineDQM::trackerFEDsFound_
private

Definition at line 76 of file TrackingOfflineDQM.h.

Referenced by beginRun(), dqmEndJob(), and dqmEndLuminosityBlock().

◆ usedWithEDMtoMEConverter_

bool TrackingOfflineDQM::usedWithEDMtoMEConverter_
private

Definition at line 75 of file TrackingOfflineDQM.h.

Referenced by TrackingOfflineDQM().