File indexing completed on 2024-04-06 12:08:48
0001 #ifndef DQM_SiStripMonitorHardware_SiStripSpyDigiConverter_H
0002 #define DQM_SiStripMonitorHardware_SiStripSpyDigiConverter_H
0003
0004 #include <memory>
0005 #include <vector>
0006
0007 #include "DataFormats/Common/interface/DetSetVector.h"
0008 #include "DataFormats/SiStripDigi/interface/SiStripRawDigi.h"
0009
0010 #include "DQM/SiStripMonitorHardware/interface/SiStripSpyUtilities.h"
0011 #include <cstdint>
0012
0013
0014 class SiStripFedCabling;
0015
0016 namespace sistrip {
0017
0018
0019
0020
0021
0022
0023
0024
0025 class SpyDigiConverter {
0026 public:
0027 typedef edm::DetSetVector<SiStripRawDigi> DSVRawDigis;
0028
0029
0030 SpyDigiConverter() {}
0031 ~SpyDigiConverter() {}
0032
0033
0034
0035
0036
0037
0038 static std::unique_ptr<DSVRawDigis> extractPayloadDigis(const DSVRawDigis* inputScopeDigis,
0039 std::vector<uint32_t>* pAPVAddresses,
0040 const bool discardDigisWithAPVAddrErr,
0041 const sistrip::SpyUtilities::FrameQuality& aQuality,
0042 const uint16_t expectedPos);
0043
0044
0045 static std::unique_ptr<DSVRawDigis> reorderDigis(const DSVRawDigis* inputPayloadDigis);
0046
0047
0048 static std::unique_ptr<DSVRawDigis> mergeModuleChannels(const DSVRawDigis* inputPhysicalOrderChannelDigis,
0049 const SiStripFedCabling& cabling);
0050
0051 private:
0052 typedef DSVRawDigis::detset DetSetRawDigis;
0053
0054 static void processFED(const uint16_t aPreviousFedId,
0055 const bool discardDigisWithAPVAddrErr,
0056 std::vector<uint32_t>* pAPVAddresses,
0057 std::vector<DetSetRawDigis>& outputData,
0058 std::vector<uint16_t>& aAddrVec,
0059 std::vector<uint16_t>& aHeaderBitVec,
0060 std::vector<uint16_t>& aTrailBitVec,
0061 std::vector<DSVRawDigis::const_iterator>& aFedScopeDigis);
0062
0063 };
0064
0065 }
0066
0067 #endif