CMS 3D CMS Logo

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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< FEDRawDataCollectionrawl_
 
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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (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::L1TFED ( const edm::ParameterSet ps)

Definition at line 13 of file L1TFED.cc.

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 }

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

◆ ~L1TFED()

L1TFED::~L1TFED ( )
override

Definition at line 26 of file L1TFED.cc.

26 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 47 of file L1TFED.cc.

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 }

References RPCNoise_example::check, gather_cfg::cout, data, MillePedeFileConverter_cfg::e, FEDRawDataCollection::FEDData(), l1tstage2_dqm_sourceclient-live_cfg::fedId, mps_fire::i, findQualityFiles::size, and submitPVValidationJobs::t.

◆ bookHistograms()

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.

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 }

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

Member Data Documentation

◆ directory_

std::string L1TFED::directory_
private

Definition at line 72 of file L1TFED.h.

◆ fedentries

MonitorElement* L1TFED::fedentries
private

Definition at line 61 of file L1TFED.h.

◆ fedfatal

MonitorElement* L1TFED::fedfatal
private

Definition at line 62 of file L1TFED.h.

◆ fednonfatal

MonitorElement* L1TFED::fednonfatal
private

Definition at line 63 of file L1TFED.h.

◆ fedSource_

edm::InputTag L1TFED::fedSource_
private

Definition at line 70 of file L1TFED.h.

◆ hfedprof

MonitorElement* L1TFED::hfedprof
private

Definition at line 59 of file L1TFED.h.

◆ hfedsize

MonitorElement* L1TFED::hfedsize
private

Definition at line 58 of file L1TFED.h.

◆ l1feds_

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

Definition at line 68 of file L1TFED.h.

◆ logFile_

std::ofstream L1TFED::logFile_
private

Definition at line 69 of file L1TFED.h.

◆ monitorDaemon_

bool L1TFED::monitorDaemon_
private

Definition at line 67 of file L1TFED.h.

◆ nev_

int L1TFED::nev_
private

Definition at line 65 of file L1TFED.h.

◆ rawl_

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

Definition at line 71 of file L1TFED.h.

◆ stableROConfig_

bool L1TFED::stableROConfig_
private

Definition at line 73 of file L1TFED.h.

◆ verbose_

bool L1TFED::verbose_
private

Definition at line 66 of file L1TFED.h.

mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
L1TFED::nev_
int nev_
Definition: L1TFED.h:65
L1TFED::directory_
std::string directory_
Definition: L1TFED.h:72
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle< FEDRawDataCollection >
FEDRawData
Definition: FEDRawData.h:19
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
L1TFED::rawl_
edm::EDGetTokenT< FEDRawDataCollection > rawl_
Definition: L1TFED.h:71
dqm::implementation::IBooker::bookProfile
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
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TFED::verbose_
bool verbose_
Definition: L1TFED.h:66
L1TFED::hfedprof
MonitorElement * hfedprof
Definition: L1TFED.h:59
FEDTrailer
Definition: FEDTrailer.h:14
L1TFED::fedentries
MonitorElement * fedentries
Definition: L1TFED.h:61
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:771
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
L1TFED::hfedsize
MonitorElement * hfedsize
Definition: L1TFED.h:58
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
L1TFED::fedfatal
MonitorElement * fedfatal
Definition: L1TFED.h:62
L1TFED::l1feds_
std::vector< int > l1feds_
Definition: L1TFED.h:68
L1TFED::stableROConfig_
bool stableROConfig_
Definition: L1TFED.h:73
FEDHeader
Definition: FEDHeader.h:14
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
L1TFED::fednonfatal
MonitorElement * fednonfatal
Definition: L1TFED.h:63
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37