Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:59

0001 #ifndef CSCDBPedestals_h
0002 #define CSCDBPedestals_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include <iosfwd>
0007 #include <vector>
0008 
0009 class CSCDBPedestals {
0010 public:
0011   CSCDBPedestals() {}
0012   ~CSCDBPedestals() {}
0013 
0014   struct Item {
0015     short int ped;
0016     short int rms;
0017 
0018     COND_SERIALIZABLE;
0019   };
0020   int factor_ped;
0021   int factor_rms;
0022 
0023   enum factors { FPED = 10, FRMS = 1000 };
0024 
0025   typedef std::vector<Item> PedestalContainer;
0026   PedestalContainer pedestals;
0027 
0028   const Item& item(int index) const { return pedestals[index]; }
0029   short int pedestal(int index) const { return pedestals[index].ped; }
0030   int scale_ped() const { return factor_ped; }
0031   short int pedestal_rms(int index) const { return pedestals[index].rms; }
0032   int scale_rms() const { return factor_rms; }
0033 
0034   COND_SERIALIZABLE;
0035 };
0036 
0037 std::ostream& operator<<(std::ostream& os, const CSCDBPedestals& cscdb);
0038 
0039 #endif