CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
L1TFED Class Reference

#include <L1TFED.h>

Inheritance diagram for L1TFED:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 L1TFED (const edm::ParameterSet &ps)
 
 ~L1TFED () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
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
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

std::string directory_
 
MonitorElementfedentries
 
MonitorElementfedfatal
 
MonitorElementfednonfatal
 
edm::InputTag fedSource_
 
MonitorElementhfedprof
 
MonitorElementhfedsize
 
std::vector< int > l1feds_
 
std::ofstream logFile_
 
bool monitorDaemon_
 
int nev_
 
edm::EDGetTokenT
< FEDRawDataCollection
rawl_
 
bool stableROConfig_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 41 of file L1TFED.h.

Constructor & Destructor Documentation

L1TFED::L1TFED ( const edm::ParameterSet ps)

Definition at line 13 of file L1TFED.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

13  {
14  // verbosity switch
15  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
16  l1feds_ = ps.getParameter<std::vector<int> >("L1FEDS");
17  directory_ = ps.getUntrackedParameter<std::string>("FEDDirName", "L1T/FEDIntegrity");
18  stableROConfig_ = ps.getUntrackedParameter<bool>("stableROConfig", true);
19  rawl_ = consumes<FEDRawDataCollection>(ps.getParameter<InputTag>("rawTag"));
20 
21  if (verbose_)
22  cout << "L1TFED: constructor...." << endl;
23  nev_ = 0;
24 }
T getUntrackedParameter(std::string const &, T const &) const
int nev_
Definition: L1TFED.h:65
edm::EDGetTokenT< FEDRawDataCollection > rawl_
Definition: L1TFED.h:71
bool stableROConfig_
Definition: L1TFED.h:73
std::string directory_
Definition: L1TFED.h:72
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< int > l1feds_
Definition: L1TFED.h:68
tuple cout
Definition: gather_cfg.py:144
bool verbose_
Definition: L1TFED.h:66
L1TFED::~L1TFED ( )
override

Definition at line 26 of file L1TFED.cc.

26 {}

Member Function Documentation

void L1TFED::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 47 of file L1TFED.cc.

References trackerTree::check(), gather_cfg::cout, FEDRawData::data(), data, l1tstage2_dqm_sourceclient-live_cfg::fedId, edm::Event::getByToken(), mps_fire::i, FEDRawData::size(), findQualityFiles::size, and submitPVValidationJobs::t.

47  {
48  nev_++;
49  if (verbose_)
50  cout << "L1T FED Integrity: analyze...." << endl;
51 
53  bool t = e.getByToken(rawl_, rawdata);
54 
55  if (!t) {
56  if (verbose_)
57  cout << "can't find FEDRawDataCollection " << endl;
58  }
59 
60  else {
61  if (verbose_)
62  cout << "fedlist size = " << l1feds_.size() << endl;
63 
64  for (unsigned int i = 0; i < l1feds_.size(); i++) {
65  int fedId = l1feds_[i];
66  if (verbose_)
67  cout << "fedId = " << fedId << endl;
68 
69  const FEDRawData& data = rawdata->FEDData(fedId);
70 
71  if (size_t size = data.size()) {
72  fedentries->Fill(i);
73  hfedsize->Fill(float(size));
74  hfedprof->Fill(float(i), float(size));
75  if (verbose_)
76  cout << "header check = " << FEDHeader(data.data()).check() << endl;
77  if (verbose_)
78  cout << "trailer check = " << FEDTrailer(data.data()).check() << endl;
79 
80  if (!FEDHeader(data.data()).check())
81  fedfatal->Fill(i);
82 
83  } else {
84  if (verbose_)
85  cout << "empty fed " << i << endl;
86  if (stableROConfig_)
87  fedfatal->Fill(i);
88  }
89  }
90  }
91 }
MonitorElement * fedentries
Definition: L1TFED.h:61
int nev_
Definition: L1TFED.h:65
MonitorElement * hfedprof
Definition: L1TFED.h:59
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< FEDRawDataCollection > rawl_
Definition: L1TFED.h:71
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
void Fill(long long x)
MonitorElement * fedfatal
Definition: L1TFED.h:62
bool stableROConfig_
Definition: L1TFED.h:73
std::vector< int > l1feds_
Definition: L1TFED.h:68
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
MonitorElement * hfedsize
Definition: L1TFED.h:58
tuple cout
Definition: gather_cfg.py:144
tuple size
Write out results.
bool verbose_
Definition: L1TFED.h:66
void L1TFED::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 28 of file L1TFED.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), mps_fire::i, dqm::impl::MonitorElement::setBinLabel(), and dqm::implementation::NavigatorBase::setCurrentFolder().

28  {
30 
31  fedentries = ibooker.book1D("FEDEntries", "Fed ID occupancy", l1feds_.size(), 0., l1feds_.size());
32  fedfatal = ibooker.book1D("FEDFatal", "Fed ID non present ", l1feds_.size(), 0., l1feds_.size());
33  fednonfatal = ibooker.book1D("FEDNonFatal", "Fed corrupted data ", l1feds_.size(), 0., l1feds_.size());
34  hfedprof = ibooker.bookProfile("fedprofile", "FED Size by ID", l1feds_.size(), 0., l1feds_.size(), 0, 0., 10000.);
35  for (unsigned int i = 0; i < l1feds_.size(); i++) {
36  ostringstream sfed;
37  sfed << l1feds_[i];
38  fedentries->setBinLabel(i + 1, "FED " + sfed.str());
39  fedfatal->setBinLabel(i + 1, "FED " + sfed.str());
40  fednonfatal->setBinLabel(i + 1, "FED " + sfed.str());
41  hfedprof->setBinLabel(i + 1, "FED " + sfed.str());
42  }
43 
44  hfedsize = ibooker.book1D("fedsize", "FED Size Distribution", 100, 0., 10000.);
45 }
MonitorElement * fedentries
Definition: L1TFED.h:61
MonitorElement * hfedprof
Definition: L1TFED.h:59
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * fednonfatal
Definition: L1TFED.h:63
MonitorElement * fedfatal
Definition: L1TFED.h:62
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string directory_
Definition: L1TFED.h:72
std::vector< int > l1feds_
Definition: L1TFED.h:68
MonitorElement * hfedsize
Definition: L1TFED.h:58
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

std::string L1TFED::directory_
private

Definition at line 72 of file L1TFED.h.

MonitorElement* L1TFED::fedentries
private

Definition at line 61 of file L1TFED.h.

MonitorElement* L1TFED::fedfatal
private

Definition at line 62 of file L1TFED.h.

MonitorElement* L1TFED::fednonfatal
private

Definition at line 63 of file L1TFED.h.

edm::InputTag L1TFED::fedSource_
private

Definition at line 70 of file L1TFED.h.

MonitorElement* L1TFED::hfedprof
private

Definition at line 59 of file L1TFED.h.

MonitorElement* L1TFED::hfedsize
private

Definition at line 58 of file L1TFED.h.

std::vector<int> L1TFED::l1feds_
private

Definition at line 68 of file L1TFED.h.

std::ofstream L1TFED::logFile_
private

Definition at line 69 of file L1TFED.h.

bool L1TFED::monitorDaemon_
private

Definition at line 67 of file L1TFED.h.

int L1TFED::nev_
private

Definition at line 65 of file L1TFED.h.

edm::EDGetTokenT<FEDRawDataCollection> L1TFED::rawl_
private

Definition at line 71 of file L1TFED.h.

bool L1TFED::stableROConfig_
private

Definition at line 73 of file L1TFED.h.

bool L1TFED::verbose_
private

Definition at line 66 of file L1TFED.h.