CSCDBPedestals

Item

factors

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
#ifndef CSCDBPedestals_h
#define CSCDBPedestals_h

#include "CondFormats/Serialization/interface/Serializable.h"

#include <iosfwd>
#include <vector>

class CSCDBPedestals {
public:
  CSCDBPedestals() {}
  ~CSCDBPedestals() {}

  struct Item {
    short int ped;
    short int rms;

    COND_SERIALIZABLE;
  };
  int factor_ped;
  int factor_rms;

  enum factors { FPED = 10, FRMS = 1000 };

  typedef std::vector<Item> PedestalContainer;
  PedestalContainer pedestals;

  const Item& item(int index) const { return pedestals[index]; }
  short int pedestal(int index) const { return pedestals[index].ped; }
  int scale_ped() const { return factor_ped; }
  short int pedestal_rms(int index) const { return pedestals[index].rms; }
  int scale_rms() const { return factor_rms; }

  COND_SERIALIZABLE;
};

std::ostream& operator<<(std::ostream& os, const CSCDBPedestals& cscdb);

#endif