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
std::vector< float > m_vec
Definition: BasicPayload.h:33
BasicPayload(float d0, float d1, size_t vecSize)
Definition: BasicPayload.h:14
static constexpr float d0
#define COND_SERIALIZABLE
Definition: Serializable.h:39
static constexpr float d1
virtual ~BasicPayload()
Definition: BasicPayload.h:18