CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TotemDAQTriggerDQMSource Class Reference
Inheritance diagram for TotemDAQTriggerDQMSource:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 TotemDAQTriggerDQMSource (const edm::ParameterSet &ps)
 
 ~TotemDAQTriggerDQMSource () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

MonitorElementdaq_bx_diff
 
MonitorElementdaq_event_bx_diff
 
MonitorElementdaq_event_bx_diff_vs_fed
 
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo
 
unsigned int verbosity
 

Detailed Description

Definition at line 27 of file TotemDAQTriggerDQMSource.cc.

Constructor & Destructor Documentation

TotemDAQTriggerDQMSource::TotemDAQTriggerDQMSource ( const edm::ParameterSet ps)

Definition at line 55 of file TotemDAQTriggerDQMSource.cc.

References edm::ParameterSet::getParameter(), and tokenFEDInfo.

55  :
56  verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0))
57 {
58  tokenFEDInfo = consumes<vector<TotemFEDInfo>>(ps.getParameter<edm::InputTag>("tagFEDInfo"));
59 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo
TotemDAQTriggerDQMSource::~TotemDAQTriggerDQMSource ( )
override

Definition at line 63 of file TotemDAQTriggerDQMSource.cc.

64 {
65 }

Member Function Documentation

void TotemDAQTriggerDQMSource::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 82 of file TotemDAQTriggerDQMSource.cc.

References daq_bx_diff, daq_event_bx_diff, daq_event_bx_diff_vs_fed, DEFINE_FWK_MODULE, MonitorElement::Fill(), edm::HandleBase::isValid(), tokenFEDInfo, and verbosity.

83 {
84  // get input
86  event.getByToken(tokenFEDInfo, fedInfo);
87 
88  // check validity
89  bool daqValid = fedInfo.isValid();
90 
91  if (!daqValid)
92  {
93  if (verbosity)
94  {
95  LogPrint("TotemDAQTriggerDQMSource") <<
96  "WARNING in TotemDAQTriggerDQMSource::analyze > some of the inputs are not valid.\n"
97  << " fedInfo.isValid = " << fedInfo.isValid();
98  }
99  }
100 
101  // DAQ plots
102  if (daqValid)
103  {
104  for (auto &it1 : *fedInfo)
105  {
106  daq_event_bx_diff->Fill(it1.getBX() - event.bunchCrossing());
107  daq_event_bx_diff_vs_fed->Fill(it1.getFEDId(), it1.getBX() - event.bunchCrossing());
108 
109  for (auto &it2 : *fedInfo)
110  {
111  if (it2.getFEDId() <= it1.getFEDId())
112  continue;
113 
114  daq_bx_diff->Fill(it2.getBX() - it1.getBX());
115  }
116  }
117  }
118 }
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo
void Fill(long long x)
bool isValid() const
Definition: HandleBase.h:74
void TotemDAQTriggerDQMSource::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 69 of file TotemDAQTriggerDQMSource.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), daq_bx_diff, daq_event_bx_diff, daq_event_bx_diff_vs_fed, and DQMStore::IBooker::setCurrentFolder().

70 {
71  ibooker.cd();
72 
73  ibooker.setCurrentFolder("CTPPS/DAQ/");
74 
75  daq_bx_diff = ibooker.book1D("bx_diff", ";OptoRx_{i}.BX - OptoRx_{j}.BX", 21, -10.5, +10.5);
76  daq_event_bx_diff = ibooker.book1D("daq_event_bx_diff", ";OptoRx_{i}.BX - Event.BX", 21, -10.5, +10.5);
77  daq_event_bx_diff_vs_fed = ibooker.book2D("daq_event_bx_diff_vs_fed", ";OptoRx.ID;OptoRx.BX - Event.BX", 10, 575.5, 585.5, 21, -10.5, +10.5);
78 }
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109

Member Data Documentation

MonitorElement* TotemDAQTriggerDQMSource::daq_bx_diff
private

Definition at line 42 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff
private

Definition at line 43 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff_vs_fed
private

Definition at line 44 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<std::vector<TotemFEDInfo> > TotemDAQTriggerDQMSource::tokenFEDInfo
private

Definition at line 40 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and TotemDAQTriggerDQMSource().

unsigned int TotemDAQTriggerDQMSource::verbosity
private

Definition at line 38 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze().