00001 #ifndef BLOBNOISES_H 00002 #define BLOBNOISES_H 00003 #include<vector> 00004 //#include<boost/cstdint.hpp> 00005 //#include <iostream> 00006 class BlobNoises { 00007 public: 00008 BlobNoises(); 00009 void fill(unsigned int id,short bsize); 00010 virtual ~BlobNoises(); 00011 struct DetRegistry{ 00012 uint32_t detid; 00013 uint32_t ibegin; 00014 uint32_t iend; 00015 bool operator==(const DetRegistry& rhs) const { 00016 if(detid!=rhs.detid)return false; 00017 if(ibegin!=rhs.ibegin)return false; 00018 if(iend!=rhs.iend)return false; 00019 return true; 00020 } 00021 bool operator!=(const DetRegistry& rhs) const { 00022 return !operator==(rhs); 00023 } 00024 }; 00025 bool operator==(const BlobNoises& rhs) const { 00026 if(v_noises!=rhs.v_noises){ 00027 return false; 00028 } 00029 if(indexes!=rhs.indexes){ 00030 return false; 00031 } 00032 return true; 00033 } 00034 bool operator!=(const BlobNoises& rhs) const { 00035 return !operator==(rhs); 00036 } 00037 00038 //std::vector<int16_t> v_noises; //dictionary problem with this 00039 std::vector<short> v_noises; 00040 std::vector<DetRegistry> indexes; 00041 }; 00042 #endif