BlobNoises

DetRegistry

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#ifndef BLOBNOISES_H
#define BLOBNOISES_H
#include "CondFormats/Serialization/interface/Serializable.h"

#include <vector>
//#include<boost/cstdint.hpp>
#include <cstdint>

class BlobNoises {
public:
  BlobNoises();
  void fill(unsigned int id, short bsize);
  virtual ~BlobNoises();
  struct DetRegistry {
    uint32_t detid;
    uint32_t ibegin;
    uint32_t iend;
    bool operator==(const DetRegistry& rhs) const {
      if (detid != rhs.detid)
        return false;
      if (ibegin != rhs.ibegin)
        return false;
      if (iend != rhs.iend)
        return false;
      return true;
    }
    bool operator!=(const DetRegistry& rhs) const { return !operator==(rhs); }

    COND_SERIALIZABLE;
  };
  bool operator==(const BlobNoises& rhs) const {
    if (v_noises != rhs.v_noises) {
      return false;
    }
    if (indexes != rhs.indexes) {
      return false;
    }
    return true;
  }
  bool operator!=(const BlobNoises& rhs) const { return !operator==(rhs); }

  //std::vector<int16_t>  v_noises; //dictionary problem with this
  std::vector<short> v_noises;
  std::vector<DetRegistry> indexes;

  COND_SERIALIZABLE;
};
#endif