Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:52

0001 #ifndef BLOBNOISES_H
0002 #define BLOBNOISES_H
0003 #include "CondFormats/Serialization/interface/Serializable.h"
0004 
0005 #include <vector>
0006 //#include<boost/cstdint.hpp>
0007 #include <cstdint>
0008 
0009 class BlobNoises {
0010 public:
0011   BlobNoises();
0012   void fill(unsigned int id, short bsize);
0013   virtual ~BlobNoises();
0014   struct DetRegistry {
0015     uint32_t detid;
0016     uint32_t ibegin;
0017     uint32_t iend;
0018     bool operator==(const DetRegistry& rhs) const {
0019       if (detid != rhs.detid)
0020         return false;
0021       if (ibegin != rhs.ibegin)
0022         return false;
0023       if (iend != rhs.iend)
0024         return false;
0025       return true;
0026     }
0027     bool operator!=(const DetRegistry& rhs) const { return !operator==(rhs); }
0028 
0029     COND_SERIALIZABLE;
0030   };
0031   bool operator==(const BlobNoises& rhs) const {
0032     if (v_noises != rhs.v_noises) {
0033       return false;
0034     }
0035     if (indexes != rhs.indexes) {
0036       return false;
0037     }
0038     return true;
0039   }
0040   bool operator!=(const BlobNoises& rhs) const { return !operator==(rhs); }
0041 
0042   //std::vector<int16_t>  v_noises; //dictionary problem with this
0043   std::vector<short> v_noises;
0044   std::vector<DetRegistry> indexes;
0045 
0046   COND_SERIALIZABLE;
0047 };
0048 #endif