CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TotemDAQTriggerDQMSource Class Reference
Inheritance diagram for TotemDAQTriggerDQMSource:

Public Member Functions

 TotemDAQTriggerDQMSource (const edm::ParameterSet &ps)
 
 ~TotemDAQTriggerDQMSource () override
 

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 26 of file TotemDAQTriggerDQMSource.cc.

Constructor & Destructor Documentation

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

Definition at line 53 of file TotemDAQTriggerDQMSource.cc.

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

54  : verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)) {
55  tokenFEDInfo = consumes<vector<TotemFEDInfo>>(ps.getParameter<edm::InputTag>("tagFEDInfo"));
56 }
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 60 of file TotemDAQTriggerDQMSource.cc.

60 {}

Member Function Documentation

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

Definition at line 77 of file TotemDAQTriggerDQMSource.cc.

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

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

Definition at line 64 of file TotemDAQTriggerDQMSource.cc.

References daq_bx_diff, daq_event_bx_diff, and daq_event_bx_diff_vs_fed.

64  {
65  ibooker.cd();
66 
67  ibooker.setCurrentFolder("CTPPS/DAQ/");
68 
69  daq_bx_diff = ibooker.book1D("bx_diff", ";OptoRx_{i}.BX - OptoRx_{j}.BX", 21, -10.5, +10.5);
70  daq_event_bx_diff = ibooker.book1D("daq_event_bx_diff", ";OptoRx_{i}.BX - Event.BX", 21, -10.5, +10.5);
72  ibooker.book2D("daq_event_bx_diff_vs_fed", ";OptoRx.ID;OptoRx.BX - Event.BX", 10, 575.5, 585.5, 21, -10.5, +10.5);
73 }

Member Data Documentation

MonitorElement* TotemDAQTriggerDQMSource::daq_bx_diff
private

Definition at line 40 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff
private

Definition at line 41 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff_vs_fed
private

Definition at line 42 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 38 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and TotemDAQTriggerDQMSource().

unsigned int TotemDAQTriggerDQMSource::verbosity
private

Definition at line 36 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze().