Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:53

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