Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:14

0001 #ifndef HcalQIEData_h
0002 #define HcalQIEData_h
0003 
0004 /** 
0005 \class HcalQIEData
0006 \author Fedor Ratnikov (UMd), with changes by Radek Ofierzynski 
0007    (preserve backwards compatibility of methods for this release)
0008 POOL object to store QIE parameters
0009 $Author: ratnikov
0010 $Date: 2012/11/02 14:13:11 $
0011 $Revision: 1.13 $
0012 */
0013 
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015 
0016 #include <vector>
0017 #include <algorithm>
0018 
0019 #include "CondFormats/HcalObjects/interface/HcalCondObjectContainer.h"
0020 #include "CondFormats/HcalObjects/interface/HcalQIEShape.h"
0021 #include "CondFormats/HcalObjects/interface/HcalQIECoder.h"
0022 #include "DataFormats/DetId/interface/DetId.h"
0023 
0024 class HcalQIEData : public HcalCondObjectContainer<HcalQIECoder> {
0025 public:
0026 #ifndef HCAL_COND_SUPPRESS_DEFAULT
0027   HcalQIEData() : HcalCondObjectContainer<HcalQIECoder>(nullptr) { setupShape(); }
0028 #endif
0029   // constructor, destructor, and all methods stay the same
0030   HcalQIEData(const HcalTopology* topo) : HcalCondObjectContainer<HcalQIECoder>(topo) { setupShape(); }
0031 
0032   void setupShape();
0033   /// get basic shape
0034   //   const HcalQIEShape& getShape () const {return mShape;}
0035   const HcalQIEShape& getShape(int qieType) const { return mShape[qieType]; }
0036   /// get QIE parameters
0037   const HcalQIECoder* getCoder(DetId fId) const { return getValues(fId); }
0038   // check if data are sorted - remove in the next version
0039   bool sorted() const { return true; }
0040   // fill values [capid][range]
0041   bool addCoder(const HcalQIECoder& fCoder) { return addValues(fCoder); }
0042   // sort values by channelId - remove in the next version
0043   void sort() {}
0044 
0045   std::string myname() const override { return (std::string) "HcalQIEData"; }
0046 
0047   //not needed/not used  HcalQIEData(const HcalQIEData&);
0048 
0049 private:
0050   HcalQIEShape mShape[2] COND_TRANSIENT;
0051 
0052   COND_SERIALIZABLE;
0053 };
0054 
0055 #endif