Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:56:50

0001 #ifndef DQM_SiStripMonitorHardware_SiStripSpyUnpacker_H
0002 #define DQM_SiStripMonitorHardware_SiStripSpyUnpacker_H
0003 
0004 #include "DataFormats/Common/interface/DetSetVector.h"
0005 
0006 // Standard includes.
0007 #include <vector>
0008 #include <utility>
0009 #include <cstdint>
0010 
0011 // Other classes
0012 class FEDRawDataCollection;
0013 class FEDRawData;
0014 class SiStripRawDigi;
0015 class SiStripFedCabling;
0016 
0017 namespace sistrip {
0018 
0019   /*! \brief Unpacks spy channel data into scope mode-like digis
0020      * @author Nick Cripps
0021      * @date Autumn 2009
0022      * 
0023      * TODO: Implement unpacking by detID.
0024      *
0025      * --- Modifications: 
0026      * ------ A.-M. Magnan, 11/03/10: change Counters map to vectors: 
0027      * ------                         save space and provide faster access to elements.
0028      * ------ A.-M. Magnan, 25/02/10: add run number to the event
0029      * ------ A.-M. Magnan, 13/01/10: change Counters map to be keyed by fedid
0030      */
0031   class SpyUnpacker {
0032   public:
0033     typedef edm::DetSetVector<SiStripRawDigi> RawDigis;
0034     typedef std::vector<uint32_t> Counters;
0035 
0036     SpyUnpacker(const bool allowIncompleteEvents);  //!< Constructor.
0037     ~SpyUnpacker();                                 //!< Destructor.
0038 
0039     /*! \brief Creates the scope mode digis for the supplied FED IDs or detIds and stores event counters.
0040          *
0041          * If FED IDs are supplied (useFedId=true), unpacks all channels found in the cabling with data.
0042          * If an empty vector of IDs is supplied, it unpacks all it can find in the FEDRawDataCollection.
0043          */
0044     void createDigis(const SiStripFedCabling&,
0045                      const FEDRawDataCollection&,
0046                      RawDigis* pDigis,
0047                      const std::vector<uint32_t>& ids,
0048                      Counters* pTotalEventCounts,
0049                      Counters* pL1ACounts,
0050                      uint32_t* aRunRef) const;
0051 
0052   private:
0053     // Configuration
0054     const bool allowIncompleteEvents_;
0055 
0056   };  // end of SpyUnpacker class.
0057 
0058 }  // namespace sistrip
0059 
0060 #endif  // DQM_SiStripMonitorHardware_SiStripSpyUnpacker_H