CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TFED (const edm::ParameterSet &ps)
 
virtual ~L1TFED ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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
< FEDRawDataCollection
rawl_
 
bool stableROConfig_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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
tuple cout
Definition: gather_cfg.py:121
bool verbose_
Definition: L1TFED.h:68
L1TFED::~L1TFED ( )
virtual

Definition at line 26 of file L1TFED.cc.

27 {
28 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 50 of file L1TFED.cc.

References DDVectorGetter::check(), gather_cfg::cout, FEDRawData::data(), data, HLT_25ns14e33_v1_cff::fedId, edm::Event::getByToken(), i, lumiPlot::rawdata, FEDRawData::size(), findQualityFiles::size, and edmStreamStallGrapher::t.

51 {
52  nev_++;
53  if(verbose_) cout << "L1T FED Integrity: analyze...." << endl;
54 
56  bool t = e.getByToken(rawl_,rawdata);
57 
58  if ( ! t ) {
59  if(verbose_) cout << "can't find FEDRawDataCollection "<< endl;
60  }
61 
62  else {
63 
64  if(verbose_) cout << "fedlist size = " << l1feds_.size() << endl;
65 
66  for (unsigned int i = 0; i<l1feds_.size(); i++){
67  int fedId = l1feds_[i];
68  if(verbose_) cout << "fedId = " << fedId << endl;
69 
70  const FEDRawData & data = rawdata->FEDData(fedId);
71 
72  if(size_t size=data.size()){
73 
74  fedentries->Fill(i);
75  hfedsize->Fill(float(size));
76  hfedprof->Fill(float(i),float(size));
77  if(verbose_) cout << "header check = " << FEDHeader(data.data()).check() << endl;
78  if(verbose_) cout << "trailer check = " << FEDTrailer(data.data()).check() << endl;
79 
80  if(!FEDHeader(data.data()).check()) fedfatal->Fill(i);
81 
82  } else {
83 
84  if(verbose_) cout << "empty fed " << i << endl;
86 
87  }
88  }
89  }
90 }
int i
Definition: DBlmapReader.cc:9
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:449
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)
MonitorElement * fedfatal
Definition: L1TFED.h:64
bool check(const std::string &)
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
tuple cout
Definition: gather_cfg.py:121
dictionary rawdata
Definition: lumiPlot.py:393
tuple size
Write out results.
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(), 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.,5000.);
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  }
45 
46  hfedsize = ibooker.book1D("fedsize","FED Size Distribution",100,0.,10000.);
47 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * fedentries
Definition: L1TFED.h:63
MonitorElement * hfedprof
Definition: L1TFED.h:61
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
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:115
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.