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
|
#ifndef HcalGainWidth_h
#define HcalGainWidth_h
/**
\class HcalGainWidth
\author Fedor Ratnikov (UMd)
POOL object to store GainWidth values 4xCapId
$Author: ratnikov
$Date: 2007/12/10 18:37:06 $
$Revision: 1.5 $
*/
#include "CondFormats/Serialization/interface/Serializable.h"
#include <cstdint>
class HcalGainWidth {
public:
/// get value for all capId = 0..3
const float* getValues() const { return &mValue0; }
/// get value for capId = 0..3
float getValue(int fCapId) const { return *(getValues() + fCapId); }
// functions below are not supposed to be used by consumer applications
HcalGainWidth() : mId(0), mValue0(0), mValue1(0), mValue2(0), mValue3(0) {}
HcalGainWidth(unsigned long fId, float fCap0, float fCap1, float fCap2, float fCap3)
: mId(fId), mValue0(fCap0), mValue1(fCap1), mValue2(fCap2), mValue3(fCap3) {}
uint32_t rawId() const { return mId; }
private:
uint32_t mId;
float mValue0;
float mValue1;
float mValue2;
float mValue3;
COND_SERIALIZABLE;
};
#endif
|