CMS 3D CMS Logo

BasicPayload.h
Go to the documentation of this file.
1 #ifndef Cond_BasicPayload_h
2 #define Cond_BasicPayload_h
3 
5 #include <iostream>
6 
7 namespace cond {
8 
11  class BasicPayload {
12  public:
13  BasicPayload() : m_data0(0.), m_data1(0.), m_vec() {}
14  BasicPayload(float d0, float d1, size_t vecSize) : m_data0(d0), m_data1(d1), m_vec(vecSize, 0) {
15  for (size_t i = 0; i < vecSize; i++)
16  m_vec[i] = d0 * i + d1;
17  }
18  virtual ~BasicPayload() {}
19 
20  void print() {
21  for (size_t i = 0; i < 10; i++) {
22  for (size_t j = 0; j < 10; j++) {
23  size_t ind = i * 10 + j;
24  std::cout << ind << ":" << m_vec[ind] << " ";
25  }
26  std::cout << std::endl;
27  }
28  }
29 
30  public:
31  float m_data0;
32  float m_data1;
33  std::vector<float> m_vec;
34 
36  };
37 
38 } // namespace cond
39 
40 #endif
cond::BasicPayload::BasicPayload
BasicPayload(float d0, float d1, size_t vecSize)
Definition: BasicPayload.h:14
mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
cond::BasicPayload::~BasicPayload
virtual ~BasicPayload()
Definition: BasicPayload.h:18
cond::BasicPayload
Definition: BasicPayload.h:11
cond::BasicPayload::print
void print()
Definition: BasicPayload.h:20
cond
Definition: plugin.cc:23
cond::BasicPayload::m_vec
std::vector< float > m_vec
Definition: BasicPayload.h:33
Serializable.h
cond::BasicPayload::BasicPayload
BasicPayload()
Definition: BasicPayload.h:13
cond::BasicPayload::m_data0
float m_data0
Definition: BasicPayload.h:31
cond::BasicPayload::m_data1
float m_data1
Definition: BasicPayload.h:32
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:85