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 Member Functions | Private Attributes
TrackingOfflineDQM Class Reference

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

Inheritance diagram for TrackingOfflineDQM:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TrackingOfflineDQM (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~TrackingOfflineDQM ()
 Destructor. More...
 
- 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup)
 BeginRun. More...
 
void checkTrackerFEDs (edm::Event const &e)
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
 End Of Luminosity. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 EndRun. More...
 
bool openInputFile ()
 Open Input File. More...
 

Private Attributes

TrackingActionExecutoractionExecutor_
 
bool allpixelFEDsFound_
 
edm::ParameterSet configPar_
 
DQMStoredqmStore_
 
int globalStatusFilling_
 
std::string inputFileName_
 
std::string outputFileName_
 
bool trackerFEDsFound_
 
bool usedWithEDMtoMEConverter_
 

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

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 41 of file TrackingOfflineDQM.h.

Constructor & Destructor Documentation

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

Constructor.

Construct object.

Parameters
roPARAMETER_SETRegular Parameter Set that represent read configuration file

Definition at line 60 of file TrackingOfflineDQM.cc.

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

60  :
61  configPar_(pSet)
62 {
63 
64  // Action Executor
66 
67  // get back-end interface
69 
70  usedWithEDMtoMEConverter_= configPar_.getUntrackedParameter<bool>("UsedWithEDMtoMEConverter",false);
73  globalStatusFilling_ = configPar_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
74 
75 }
std::string inputFileName_
T getUntrackedParameter(std::string const &, T const &) const
std::string outputFileName_
TrackingActionExecutor * actionExecutor_
edm::ParameterSet configPar_
TrackingOfflineDQM::~TrackingOfflineDQM ( )
virtual

Destructor.

Definition at line 81 of file TrackingOfflineDQM.cc.

81  {
82 
83 }

Member Function Documentation

void TrackingOfflineDQM::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
privatevirtual

Analyze.

Executed at every Event.

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

Implements edm::EDAnalyzer.

Definition at line 157 of file TrackingOfflineDQM.cc.

157  {
158 }
void TrackingOfflineDQM::beginJob ( void  )
privatevirtual

BeginJob.

Executed at the begining of application.

Parameters
eSetupEvent Setup object

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file TrackingOfflineDQM.cc.

91  {
92 
93  edm::LogInfo("BeginJobDone") << "TrackingOfflineDQM::beginJob done";
94 }
void TrackingOfflineDQM::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

BeginRun.

Executed at the begining a Run.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 104 of file TrackingOfflineDQM.cc.

References actionExecutor_, allpixelFEDsFound_, gather_cfg::cout, TrackingActionExecutor::createGlobalStatus(), dqmStore_, edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), globalStatusFilling_, edm::ESHandleBase::isValid(), FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, and trackerFEDsFound_.

104  {
105  // std::cout << "[TrackingOfflineDQM::beginRun] .. starting" << std::endl;
106  edm::LogInfo ("BeginRun") <<"TrackingOfflineDQM:: Begining of Run";
107 
108  int nFEDs = 0;
109  int nPixelFEDs = 0;
111  if( eSetup.find( recordKey ) != 0) {
112 
113  edm::ESHandle<RunInfo> sumFED;
114  eSetup.get<RunInfoRcd>().get(sumFED);
115  if ( sumFED.isValid() ) {
116 
117  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
118  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
119  const int siPixelFedIdMin = FEDNumbering::MINSiPixelFEDID;
120  const int siPixelFedIdMax = FEDNumbering::MAXSiPixelFEDID;
121 
122  std::vector<int> FedsInIds= sumFED->m_fed_in;
123  for ( auto fedID : FedsInIds ) {
124  if ( fedID >= siPixelFedIdMin && fedID <= siPixelFedIdMax ) {
125  ++nPixelFEDs;
126  ++nFEDs;
127  }
128  if ( fedID >= siStripFedIdMin && fedID <= siStripFedIdMax )
129  ++nFEDs;
130  }
131  }
132  }
134  allpixelFEDsFound_ = (nPixelFEDs == siPixelFedN);
135  trackerFEDsFound_ = (nFEDs > 0);
136  std::cout << "[TrackingOfflineDQM::beginRun] nPixelFEDs: " << nPixelFEDs << " ==> " << allpixelFEDsFound_ << std::endl;
137  std::cout << "[TrackingOfflineDQM::beginRun] nFEDs: " << nFEDs << " ==> " << trackerFEDsFound_ << std::endl;
138 
139  if (globalStatusFilling_ > 0) {
141  // std::cout << "[TrackingOfflineDQM::beginRun] done actionExecutor_->createStatus" << std::endl;
142  }
143 
144  // std::cout << "[TrackingOfflineDQM::beginRun] DONE" << std::endl;
145 }
TrackingActionExecutor * actionExecutor_
void createGlobalStatus(DQMStore *dqm_store)
tuple cout
Definition: gather_cfg.py:121
bool isValid() const
Definition: ESHandle.h:37
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void TrackingOfflineDQM::checkTrackerFEDs ( edm::Event const &  e)
private
void TrackingOfflineDQM::endJob ( void  )
privatevirtual

Endjob.

End Job.

Reimplemented from edm::EDAnalyzer.

Definition at line 210 of file TrackingOfflineDQM.cc.

References DQMStore::cd(), dqmStore_, outputFileName_, DQMStore::save(), and usedWithEDMtoMEConverter_.

210  {
211 
212  // std::cout << "[TrackingOfflineDQM::endJob] .. starting" << std::endl;
213 
214  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::endJob";
215 
217  // Save Output file
218  dqmStore_->cd();
219  dqmStore_->save(outputFileName_, "","","");
220  }
221 
222  // std::cout << "[TrackingOfflineDQM::endJob] DONE" << std::endl;
223 
224 }
std::string outputFileName_
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:632
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2490
void TrackingOfflineDQM::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
privatevirtual

End Of Luminosity.

End Lumi.

Reimplemented from edm::EDAnalyzer.

Definition at line 165 of file TrackingOfflineDQM.cc.

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

165  {
166 
167  // std::cout << "[TrackingOfflineDQM::endLuminosityBlock] .. starting" << std::endl;
168 
169  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::endLuminosityBlock";
170 
171  if (globalStatusFilling_ > 0) {
173 
176  }
177 }
void createLSStatus(DQMStore *dqm_store)
TrackingActionExecutor * actionExecutor_
void fillStatusAtLumi(DQMStore *dqm_store)
void TrackingOfflineDQM::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

EndRun.

End Run.

Reimplemented from edm::EDAnalyzer.

Definition at line 184 of file TrackingOfflineDQM.cc.

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

184  {
185 
186  // std::cout << "[TrackingOfflineDQM::endRun] .. starting" << std::endl;
187 
188  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::endRun";
189 
190  if (globalStatusFilling_ > 0) {
192 
193  if ( !trackerFEDsFound_ ) {
195  return;
196  } else {
198  }
199  }
200 
201  // std::cout << "[TrackingOfflineDQM::endRun] DONE" << std::endl;
202 
203 }
TrackingActionExecutor * actionExecutor_
void createGlobalStatus(DQMStore *dqm_store)
void fillGlobalStatus(DQMStore *dqm_store)
bool TrackingOfflineDQM::openInputFile ( )
private

Open Input File.

Definition at line 231 of file TrackingOfflineDQM.cc.

References dqmStore_, inputFileName_, and DQMStore::open().

231  {
232  if (inputFileName_.size() == 0) return false;
233  edm::LogInfo("TrackingOfflineDQM") << "TrackingOfflineDQM::openInputFile: Accessing root File" << inputFileName_;
234  dqmStore_->open(inputFileName_, false);
235  return true;
236 }
std::string inputFileName_
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2845

Member Data Documentation

TrackingActionExecutor* TrackingOfflineDQM::actionExecutor_
private

Definition at line 77 of file TrackingOfflineDQM.h.

Referenced by beginRun(), endLuminosityBlock(), endRun(), and TrackingOfflineDQM().

bool TrackingOfflineDQM::allpixelFEDsFound_
private

Definition at line 84 of file TrackingOfflineDQM.h.

Referenced by beginRun().

edm::ParameterSet TrackingOfflineDQM::configPar_
private

Definition at line 86 of file TrackingOfflineDQM.h.

Referenced by TrackingOfflineDQM().

DQMStore* TrackingOfflineDQM::dqmStore_
private
int TrackingOfflineDQM::globalStatusFilling_
private

Definition at line 81 of file TrackingOfflineDQM.h.

Referenced by beginRun(), endLuminosityBlock(), endRun(), and TrackingOfflineDQM().

std::string TrackingOfflineDQM::inputFileName_
private

Definition at line 79 of file TrackingOfflineDQM.h.

Referenced by openInputFile(), and TrackingOfflineDQM().

std::string TrackingOfflineDQM::outputFileName_
private

Definition at line 80 of file TrackingOfflineDQM.h.

Referenced by endJob(), and TrackingOfflineDQM().

bool TrackingOfflineDQM::trackerFEDsFound_
private

Definition at line 83 of file TrackingOfflineDQM.h.

Referenced by beginRun(), endLuminosityBlock(), and endRun().

bool TrackingOfflineDQM::usedWithEDMtoMEConverter_
private

Definition at line 82 of file TrackingOfflineDQM.h.

Referenced by endJob(), and TrackingOfflineDQM().