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

Constructor & Destructor Documentation

◆ TotemDAQTriggerDQMSource()

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

Definition at line 52 of file TotemDAQTriggerDQMSource.cc.

54  : verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)) {
55  tokenFEDInfo = consumes<vector<TotemFEDInfo>>(ps.getParameter<edm::InputTag>("tagFEDInfo"));

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

◆ ~TotemDAQTriggerDQMSource()

TotemDAQTriggerDQMSource::~TotemDAQTriggerDQMSource ( )
override

Definition at line 59 of file TotemDAQTriggerDQMSource.cc.

Member Function Documentation

◆ analyze()

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

Definition at line 76 of file TotemDAQTriggerDQMSource.cc.

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  }

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

◆ bookHistograms()

void TotemDAQTriggerDQMSource::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 63 of file TotemDAQTriggerDQMSource.cc.

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

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), daq_bx_diff, daq_event_bx_diff, daq_event_bx_diff_vs_fed, and dqm::implementation::NavigatorBase::setCurrentFolder().

Member Data Documentation

◆ daq_bx_diff

MonitorElement* TotemDAQTriggerDQMSource::daq_bx_diff
private

Definition at line 45 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ daq_event_bx_diff

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff
private

Definition at line 46 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ daq_event_bx_diff_vs_fed

MonitorElement* TotemDAQTriggerDQMSource::daq_event_bx_diff_vs_fed
private

Definition at line 47 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ tokenFEDInfo

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

Definition at line 43 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze(), and TotemDAQTriggerDQMSource().

◆ verbosity

unsigned int TotemDAQTriggerDQMSource::verbosity
private

Definition at line 41 of file TotemDAQTriggerDQMSource.cc.

Referenced by analyze().

edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
TotemDAQTriggerDQMSource::tokenFEDInfo
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo
Definition: TotemDAQTriggerDQMSource.cc:43
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
TotemDAQTriggerDQMSource::daq_event_bx_diff
MonitorElement * daq_event_bx_diff
Definition: TotemDAQTriggerDQMSource.cc:46
TotemDAQTriggerDQMSource::daq_bx_diff
MonitorElement * daq_bx_diff
Definition: TotemDAQTriggerDQMSource.cc:45
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
TotemDAQTriggerDQMSource::daq_event_bx_diff_vs_fed
MonitorElement * daq_event_bx_diff_vs_fed
Definition: TotemDAQTriggerDQMSource.cc:47
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TotemDAQTriggerDQMSource::verbosity
unsigned int verbosity
Definition: TotemDAQTriggerDQMSource.cc:41
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
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