Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:46:59

0001 #ifndef HcalRawGains_h
0002 #define HcalRawGains_h
0003 
0004 /** 
0005 \class HcalRawGains
0006 \author Fedor Ratnikov (UMd)
0007 POOL container to store Gain values 4xCapId
0008 $Author: ratnikov
0009 $Date: 2006/07/29 00:21:32 $
0010 $Revision: 1.7 $
0011 */
0012 
0013 #include <vector>
0014 #include <algorithm>
0015 
0016 #include "CondFormats/HcalObjects/interface/HcalRawGain.h"
0017 #include "DataFormats/DetId/interface/DetId.h"
0018 
0019 //
0020 class HcalRawGains {
0021 public:
0022   HcalRawGains();
0023   ~HcalRawGains();
0024   /// get value
0025   const HcalRawGain* getValues(DetId fId) const;
0026   /// get list of all available channels
0027   std::vector<DetId> getAllChannels() const;
0028   /// check if data are sorted
0029   bool sorted() const { return mSorted; }
0030   /// add new (empty) item
0031   HcalRawGain* addItem(DetId fId);
0032   /// fill values
0033   void addValues(DetId fId, const HcalRawGain& fValues);
0034   /// sort values by channelId
0035   void sort();
0036   // helper typedefs
0037   typedef HcalRawGain Item;
0038   typedef std::vector<Item> Container;
0039 
0040 private:
0041   Container mItems;
0042   bool mSorted;
0043 };
0044 
0045 #endif