Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:19

0001 #ifndef SiPixelMonitorRawData_SiPixelRawDataErrorModule_h
0002 #define SiPixelMonitorRawData_SiPixelRawDataErrorModule_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelMonitorRawData
0006 // Class:      SiPixelRawDataErrorModule
0007 //
0008 /**\class
0009 
0010  Description:
0011  Error monitoring elements for a Pixel sensor.
0012 
0013  Implementation:
0014  Contains three functions to monitor error information.  "book" creates
0015  histograms in detector units and "fill" fills the monitoring elements with
0016  input error information.
0017 
0018 */
0019 //
0020 // Original Author:  Andrew York
0021 //         Created:
0022 //
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "DataFormats/Common/interface/DetSetVector.h"
0025 #include "DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h"
0026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0027 #include <cstdint>
0028 
0029 class SiPixelRawDataErrorModule {
0030 public:
0031   typedef dqm::reco::MonitorElement MonitorElement;
0032   typedef dqm::reco::DQMStore DQMStore;
0033 
0034   /// Default constructor
0035   SiPixelRawDataErrorModule();
0036   /// Constructor with raw DetId
0037   SiPixelRawDataErrorModule(const uint32_t &id);
0038   /// Constructor with raw DetId and sensor size
0039   SiPixelRawDataErrorModule(const uint32_t &id, const int &ncols, const int &nrows);
0040   /// Destructor
0041   ~SiPixelRawDataErrorModule();
0042 
0043   typedef edm::DetSet<SiPixelRawDataError>::const_iterator ErrorIterator;
0044 
0045   /// Book histograms
0046   void book(const edm::ParameterSet &iConfig, DQMStore::IBooker &, int type = 0, bool isUpgrade = false);
0047   /// Fill histograms
0048   int fill(const edm::DetSetVector<SiPixelRawDataError> &input,
0049            std::map<std::string, MonitorElement **> *meMapFEDs,
0050            bool modon = true,
0051            bool ladon = false,
0052            bool bladeon = false);
0053   /// Fill FED histograms
0054   int fillFED(const edm::DetSetVector<SiPixelRawDataError> &input, std::map<std::string, MonitorElement **> *meMapFEDs);
0055 
0056 private:
0057   uint32_t id_;
0058   int ncols_;
0059   int nrows_;
0060   bool _debug_;
0061 
0062   // barrel:
0063   MonitorElement *meErrorTypeLad_;
0064   MonitorElement *meNErrorsLad_;
0065   MonitorElement *meFullTypeLad_;
0066   MonitorElement *meTBMMessageLad_;
0067   MonitorElement *meTBMTypeLad_;
0068   MonitorElement *meEvtNbrLad_;
0069   MonitorElement *meEvtSizeLad_;
0070 
0071   // forward:
0072   MonitorElement *meErrorTypeBlade_;
0073   MonitorElement *meNErrorsBlade_;
0074   MonitorElement *meFullTypeBlade_;
0075   MonitorElement *meTBMMessageBlade_;
0076   MonitorElement *meTBMTypeBlade_;
0077   MonitorElement *meEvtNbrBlade_;
0078   MonitorElement *meEvtSizeBlade_;
0079 
0080   static const int LINK_bits, ROC_bits, DCOL_bits, PXID_bits, ADC_bits, DataBit_bits, TRLRBGN_bits, EVTLGT_bits,
0081       TRLREND_bits;
0082   static const int LINK_shift, ROC_shift, DCOL_shift, PXID_shift, ADC_shift, DB0_shift, DB1_shift, DB2_shift, DB3_shift,
0083       DB4_shift, DB5_shift, DB6_shift, DB7_shift, TRLRBGN_shift, EVTLGT_shift, TRLREND_shift;
0084   static const uint32_t LINK_mask, ROC_mask, DCOL_mask, PXID_mask, ADC_mask, DataBit_mask;
0085   static const unsigned long long TRLRBGN_mask, EVTLGT_mask, TRLREND_mask;
0086 };
0087 #endif