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::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TFED (const edm::ParameterSet &ps)
 
 ~L1TFED () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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)
 
 ~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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 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)
 

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 edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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 Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

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.

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

Definition at line 26 of file L1TFED.cc.

27 {
28 }

Member Function Documentation

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

Definition at line 51 of file L1TFED.cc.

References trackerTree::check(), gather_cfg::cout, FEDRawData::data(), data, FEDRawDataCollection::FEDData(), l1t::stage2::layer2::fedId, edm::Event::getByToken(), mps_fire::i, matplotRender::rawdata, FEDRawData::size(), findQualityFiles::size, and lumiQTWidget::t.

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

Implements DQMEDAnalyzer.

Definition at line 30 of file L1TFED.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), mps_fire::i, MonitorElement::setBinLabel(), and DQMStore::IBooker::setCurrentFolder().

31 {
33 
34  fedentries = ibooker.book1D("FEDEntries", "Fed ID occupancy", l1feds_.size(), 0.,l1feds_.size() );
35  fedfatal = ibooker.book1D("FEDFatal", "Fed ID non present ", l1feds_.size(), 0., l1feds_.size());
36  fednonfatal = ibooker.book1D("FEDNonFatal", "Fed corrupted data ", l1feds_.size(), 0.,l1feds_.size() );
37  hfedprof = ibooker.bookProfile("fedprofile","FED Size by ID", l1feds_.size(), 0., l1feds_.size(),0,0.,10000.);
38  for(unsigned int i=0;i<l1feds_.size();i++){
39  ostringstream sfed;
40  sfed << l1feds_[i];
41  fedentries->setBinLabel(i+1,"FED "+ sfed.str());
42  fedfatal->setBinLabel(i+1,"FED "+ sfed.str());
43  fednonfatal->setBinLabel(i+1,"FED "+ sfed.str());
44  hfedprof->setBinLabel(i+1,"FED "+ sfed.str());
45  }
46 
47  hfedsize = ibooker.book1D("fedsize","FED Size Distribution",100,0.,10000.);
48 }
MonitorElement * fedentries
Definition: L1TFED.h:63
MonitorElement * hfedprof
Definition: L1TFED.h:61
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
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)
MonitorElement * fednonfatal
Definition: L1TFED.h:65
MonitorElement * fedfatal
Definition: L1TFED.h:64
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::string directory_
Definition: L1TFED.h:74
std::vector< int > l1feds_
Definition: L1TFED.h:70
MonitorElement * hfedsize
Definition: L1TFED.h:60

Member Data Documentation

std::string L1TFED::directory_
private

Definition at line 74 of file L1TFED.h.

MonitorElement* L1TFED::fedentries
private

Definition at line 63 of file L1TFED.h.

MonitorElement* L1TFED::fedfatal
private

Definition at line 64 of file L1TFED.h.

MonitorElement* L1TFED::fednonfatal
private

Definition at line 65 of file L1TFED.h.

edm::InputTag L1TFED::fedSource_
private

Definition at line 72 of file L1TFED.h.

MonitorElement* L1TFED::hfedprof
private

Definition at line 61 of file L1TFED.h.

MonitorElement* L1TFED::hfedsize
private

Definition at line 60 of file L1TFED.h.

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

Definition at line 70 of file L1TFED.h.

std::ofstream L1TFED::logFile_
private

Definition at line 71 of file L1TFED.h.

bool L1TFED::monitorDaemon_
private

Definition at line 69 of file L1TFED.h.

int L1TFED::nev_
private

Definition at line 67 of file L1TFED.h.

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

Definition at line 73 of file L1TFED.h.

bool L1TFED::stableROConfig_
private

Definition at line 75 of file L1TFED.h.

bool L1TFED::verbose_
private

Definition at line 68 of file L1TFED.h.