Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:30

0001 #ifndef L1ScoutingRawData_SDSRawDataCollection_h
0002 #define L1ScoutingRawData_SDSRawDataCollection_h
0003 
0004 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0005 #include "DataFormats/Common/interface/traits.h"
0006 
0007 /** 
0008   *
0009   * This collection holds the raw data for all the 
0010   * scouting data sources. It is a collection of FEDRawData
0011   *
0012   */
0013 
0014 class SDSRawDataCollection : public edm::DoNotRecordParents {
0015 public:
0016   SDSRawDataCollection();
0017   SDSRawDataCollection(const SDSRawDataCollection&) = default;
0018   SDSRawDataCollection(SDSRawDataCollection&&) noexcept = default;
0019   SDSRawDataCollection& operator=(const SDSRawDataCollection&) = default;
0020   SDSRawDataCollection& operator=(SDSRawDataCollection&&) noexcept = default;
0021 
0022   // retrive data for the scouting source at sourceId
0023   const FEDRawData& FEDData(int sourceId) const;
0024 
0025   // retrive data for the scouting source at sourceId
0026   FEDRawData& FEDData(int sourceId);
0027 
0028   void swap(SDSRawDataCollection& other) { data_.swap(other.data_); }
0029 
0030 private:
0031   std::vector<FEDRawData> data_;  // vector of raw data
0032 };
0033 
0034 inline void swap(SDSRawDataCollection& a, SDSRawDataCollection& b) { a.swap(b); }
0035 
0036 #endif  // L1ScoutingRawData_SDSRawDataCollection_h