Newer
Older
TB_Chris / TbUT / src / .svn / text-base / TbUTPedestal.h.svn-base
@iaro iaro on 9 May 2016 759 bytes first attempt of automated anal
  1. /*
  2. * TbUTPedestal.h
  3. *
  4. * Created on: Dec 31, 2014
  5. * Author: ADendek
  6. */
  7.  
  8. #pragma once
  9.  
  10. #include "TbUTRawData.h"
  11. #include <boost/serialization/serialization.hpp>
  12. #include <boost/serialization/vector.hpp>
  13. #include <iostream>
  14.  
  15.  
  16. namespace TbUT
  17. {
  18.  
  19. class Pedestal
  20. {
  21. typedef std::vector<int> DataVector;
  22.  
  23. public:
  24. Pedestal();
  25. void setPedestal(int p_channel, int p_value);
  26. int getPedestal(int p_channel);
  27. int & operator[](size_t el) {return m_pedestals[el];}
  28. DataVector& getPedestalVector()
  29. {
  30. normalizePedestals();
  31. return m_pedestals;
  32. }
  33. void normalizePedestals();
  34. void setNormalizationFlag(bool p_flag){m_isNormalized=p_flag;}
  35. private:
  36.  
  37. int m_normalization;
  38. bool m_isNormalized;
  39. DataVector m_pedestals;
  40.  
  41. };
  42.  
  43. } /* namespace TbUT */