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