CMS 3D CMS Logo

HcalInterpolatedPulseColl.h
Go to the documentation of this file.
1 #ifndef CondFormats_HcalObjects_HcalInterpolatedPulseColl_h_
2 #define CondFormats_HcalObjects_HcalInterpolatedPulseColl_h_
3 
7 
9 public:
10  HcalInterpolatedPulseColl(const std::vector<HcalInterpolatedPulse>& pulses, const HBHEChannelGroups& groups);
11 
12  // Get the pulse from channel HcalDetId
13  const HcalInterpolatedPulse& getChannelPulse(const HcalDetId& id) const;
14 
15  // Get the pulse by linearized HCAL channel number
16  inline const HcalInterpolatedPulse& getChannelPulse(const unsigned i) const { return pulses_[groups_.getGroup(i)]; }
17 
18  inline bool operator==(const HcalInterpolatedPulseColl& r) { return pulses_ == r.pulses_ && groups_ == r.groups_; }
19 
20  inline bool operator!=(const HcalInterpolatedPulseColl& r) { return !(*this == r); }
21 
22 private:
23  std::vector<HcalInterpolatedPulse> pulses_;
25 
26 public:
27  // Default constructor needed for serialization.
28  // Do not use in application code.
30 
31 private:
33 
34  template <class Archive>
35  inline void serialize(Archive& ar, unsigned /* version */) {
36  ar& pulses_& groups_;
37  }
38 };
39 
40 BOOST_CLASS_VERSION(HcalInterpolatedPulseColl, 1)
41 
42 #endif // CondFormats_HcalObjects_HcalInterpolatedPulseColl_h_
std::vector< HcalInterpolatedPulse > pulses_
const HcalInterpolatedPulse & getChannelPulse(const unsigned i) const
void serialize(Archive &ar, unsigned)
friend class boost::serialization::access
bool operator==(const HcalInterpolatedPulseColl &r)
const HcalInterpolatedPulse & getChannelPulse(const HcalDetId &id) const
unsigned getGroup(const unsigned linearChannel) const
bool operator!=(const HcalInterpolatedPulseColl &r)