CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ArrayPayload Class Reference

#include <ArrayPayload.h>

Inheritance diagram for ArrayPayload:
RegressionTestPayload

Public Member Functions

 ArrayPayload ()
 
 ArrayPayload (int seed)
 
bool operator!= (const ArrayPayload &rhs) const
 
bool operator== (const ArrayPayload &rhs) const
 

Private Attributes

int m_ai0 [4]
 
int m_ai1 [112]
 
int m_ai2 [3][2]
 
int m_ai3 [2][80]
 
Param m_ap0 [4]
 
Param m_ap1 [112]
 
std::string m_as0 [4]
 
std::string m_as1 [112]
 
std::bitset< 128 > m_bitset
 
int m_i
 
std::list< int > m_list
 
std::map< unsigned int,
unsigned int > 
m_map0
 
std::map< std::string,
std::string > 
m_map1
 
std::map< int, Paramm_map2
 
std::pair< unsigned int,
unsigned int > 
m_p0
 
std::pair< int, std::string > m_p1
 
std::pair< int, Paramm_p2
 
std::set< std::string > m_set
 
std::vector< int > m_vec0
 
std::vector< std::string > m_vec1
 
std::vector< Paramm_vec2
 
std::vector< Paramm_vec3
 

Detailed Description

Definition at line 17 of file ArrayPayload.h.

Constructor & Destructor Documentation

ArrayPayload::ArrayPayload ( )

Definition at line 35 of file ArrayPayload.cc.

References m_bitset, and setDefaultBitSet().

35  :
36  m_i(-1),
37  m_p0(),
38  m_p1(),
39  m_p2(),
40  m_vec0(),
41  m_vec1(),
42  m_map0(),
43  m_map1(),
44  m_list(),
45  m_set(),
46  m_bitset(),
47  m_vec2(),
48  m_map2(),
49  m_vec3(){
51 }
std::set< std::string > m_set
Definition: ArrayPayload.h:43
std::vector< int > m_vec0
Definition: ArrayPayload.h:38
std::vector< Param > m_vec2
Definition: ArrayPayload.h:45
std::vector< Param > m_vec3
Definition: ArrayPayload.h:48
std::pair< int, std::string > m_p1
Definition: ArrayPayload.h:36
std::bitset< 128 > m_bitset
Definition: ArrayPayload.h:44
void setDefaultBitSet(std::bitset< 128 > &val)
Definition: ArrayPayload.cc:27
std::pair< unsigned int, unsigned int > m_p0
Definition: ArrayPayload.h:35
std::map< std::string, std::string > m_map1
Definition: ArrayPayload.h:41
std::pair< int, Param > m_p2
Definition: ArrayPayload.h:37
std::map< int, Param > m_map2
Definition: ArrayPayload.h:46
std::list< int > m_list
Definition: ArrayPayload.h:42
std::map< unsigned int, unsigned int > m_map0
Definition: ArrayPayload.h:40
std::vector< std::string > m_vec1
Definition: ArrayPayload.h:39
ArrayPayload::ArrayPayload ( int  seed)

Definition at line 53 of file ArrayPayload.cc.

References i, j, m_ai0, m_ai1, m_ai2, m_ai3, m_ap0, m_ap1, m_as0, m_as1, m_bitset, m_list, m_map0, m_map1, m_map2, m_p0, m_p1, m_p2, m_set, m_vec0, m_vec1, m_vec2, m_vec3, fileCollector::seed, and contentValuesCheck::ss.

53  :
54  m_i( seed + 99 ),
55  m_p0(),
56  m_p1(),
57  m_p2(),
58  m_vec0(),
59  m_vec1(),
60  m_map0(),
61  m_map1(),
62  m_list(),
63  m_set(),
64  m_bitset(),
65  m_vec2(),
66  m_map2(),
67  m_vec3(){
68  for( size_t i=0;i<4; i++ ){
69  m_ai0[i]= seed + i;
70  }
71  for( size_t i=0;i<112; i++ ){
72  m_ai1[i]= seed + i;
73  }
74  for( size_t i=0;i<2; i++ ){
75  for( size_t j=0;i<3; i++ ){
76  m_ai2[j][i]= seed + i + j;
77  }
78  }
79  for( size_t i=0;i<80; i++ ){
80  for( size_t j=0;i<2; i++ ){
81  m_ai3[j][i]= seed + i + j;
82  }
83  }
84  for( size_t i=0;i<4; i++ ){
85  std::stringstream ss;
86  ss << (seed + i);
87  m_as0[i]= ss.str();
88  }
89  for( size_t i=0;i<112; i++ ){
90  std::stringstream ss;
91  ss << (seed + i);
92  m_as1[i]= ss.str();
93  }
94  for( int i=0;i<4; i++ ){
95  m_ap0[i] = Param(i+seed);
96  }
97  for( int i=0;i<112; i++ ){
98  m_ap1[i] = Param(i+seed);
99  }
100  m_p0.first = seed;
101  m_p0.second = seed*10;
102  m_p1.first = seed;
103  std::stringstream ss;
104  ss << (seed*10);
105  m_p1.second = ss.str();
106  m_p2.first = seed;
107  m_p2.second = Param( seed );
108 
109  for( int i=0;i<seed;i++){
110  m_vec0.push_back(i);
111  std::stringstream ss0;
112  ss0 << "vec1_"<<seed;
113  m_vec1.push_back( ss0.str() );
114  m_map0.insert(std::make_pair((unsigned int)seed,(unsigned int)seed));
115  std::stringstream ss1;
116  ss1 << "map1_"<<seed;
117  m_map1.insert(std::make_pair( ss1.str(),ss1.str() ) );
118  m_list.push_back( seed );
119  m_set.insert( ss1.str() );
120  m_vec2.push_back( Param( seed ) );
121  m_map2.insert( std::make_pair( seed, Param( seed ) ) );
122  m_vec3.push_back( Param( seed ) );
123  }
124 
125  size_t i=0;
126  int j = 1;
127  while( j<128 ){
128  if( seed & j )m_bitset.set(i);
129  j = j << 1;
130  i++;
131  }
132 }
Param m_ap0[4]
Definition: ArrayPayload.h:32
int i
Definition: DBlmapReader.cc:9
std::set< std::string > m_set
Definition: ArrayPayload.h:43
Param m_ap1[112]
Definition: ArrayPayload.h:33
std::vector< int > m_vec0
Definition: ArrayPayload.h:38
std::vector< Param > m_vec2
Definition: ArrayPayload.h:45
std::vector< Param > m_vec3
Definition: ArrayPayload.h:48
std::pair< int, std::string > m_p1
Definition: ArrayPayload.h:36
std::bitset< 128 > m_bitset
Definition: ArrayPayload.h:44
int m_ai2[3][2]
Definition: ArrayPayload.h:28
std::string m_as0[4]
Definition: ArrayPayload.h:30
int m_ai1[112]
Definition: ArrayPayload.h:27
std::pair< unsigned int, unsigned int > m_p0
Definition: ArrayPayload.h:35
int j
Definition: DBlmapReader.cc:9
std::map< std::string, std::string > m_map1
Definition: ArrayPayload.h:41
std::pair< int, Param > m_p2
Definition: ArrayPayload.h:37
std::map< int, Param > m_map2
Definition: ArrayPayload.h:46
std::list< int > m_list
Definition: ArrayPayload.h:42
std::string m_as1[112]
Definition: ArrayPayload.h:31
int m_ai3[2][80]
Definition: ArrayPayload.h:29
std::map< unsigned int, unsigned int > m_map0
Definition: ArrayPayload.h:40
int m_ai0[4]
Definition: ArrayPayload.h:26
std::vector< std::string > m_vec1
Definition: ArrayPayload.h:39

Member Function Documentation

bool ArrayPayload::operator!= ( const ArrayPayload rhs) const

Definition at line 187 of file ArrayPayload.cc.

References operator==().

187  {
188  return !operator==(rhs);
189 }
bool operator==(const ArrayPayload &rhs) const
bool ArrayPayload::operator== ( const ArrayPayload rhs) const

Definition at line 135 of file ArrayPayload.cc.

References gather_cfg::cout, i, j, m_ai0, m_ai1, m_ai2, m_ai3, m_ap0, m_ap1, m_as0, m_as1, m_bitset, m_i, m_list, m_map0, m_map1, m_map2, m_p0, m_p1, m_p2, m_set, m_vec0, m_vec1, m_vec2, m_vec3, and setDefaultBitSet().

Referenced by operator!=().

135  {
136  if( m_i != rhs.m_i ) return false;
137  for( int i=0;i<4;i++){
138  if(m_ai0[i] != rhs.m_ai0[i] ) return false;
139  }
140  for( int i=0;i<112;i++){
141  if(m_ai1[i] != rhs.m_ai1[i] ) return false;
142  }
143  for( size_t i=0;i<2; i++ ){
144  for( size_t j=0;i<3; i++ ){
145  if( m_ai2[j][i] != rhs.m_ai2[j][i] ) return false;
146  }
147  }
148  for( size_t i=0;i<80; i++ ){
149  for( size_t j=0;i<2; i++ ){
150  if( m_ai3[j][i] != rhs.m_ai3[j][i] ) return false;
151  }
152  }
153  for( size_t i=0;i<4; i++ ){
154  if(m_as0[i] != rhs.m_as0[i] ) return false;
155  }
156  for( size_t i=0;i<112; i++ ){
157  if(m_as1[i] != rhs.m_as1[i] ) return false;
158  }
159  for( int i=0;i<4; i++ ){
160  if(m_ap0[i] != rhs.m_ap0[i] ) return false;
161  }
162  for( int i=0;i<112; i++ ){
163  if(m_ap1[i] != rhs.m_ap1[i] ) return false;
164  }
165  if(m_p0 != rhs.m_p0 ) return false;
166  if(m_p1 != rhs.m_p1 ) return false;
167  if(m_p2 != rhs.m_p2 ) return false;
168  if(m_vec0 != rhs.m_vec0 ) return false;
169  if(m_vec1 != rhs.m_vec1 ) return false;
170  if(m_vec2 != rhs.m_vec2 ) return false;
171  if(m_vec3 != rhs.m_vec3 ) return false;
172  if(m_map0 != rhs.m_map0 ) return false;
173  if(m_map1 != rhs.m_map1 ) return false;
174  if(m_map2 != rhs.m_map2 ) return false;
175  if(m_list != rhs.m_list ) return false;
176  if(m_set != rhs.m_set ) return false;
177  std::bitset<128> defValue;
178  setDefaultBitSet( defValue );
179  if( m_bitset == defValue ){
180  std::cout <<"WARNING: data member \"m_bitset\" read with the default value."<<std::endl;
181  } else {
182  if( m_bitset != rhs.m_bitset ) return false;
183  }
184  return true;
185 }
Param m_ap0[4]
Definition: ArrayPayload.h:32
int i
Definition: DBlmapReader.cc:9
std::set< std::string > m_set
Definition: ArrayPayload.h:43
Param m_ap1[112]
Definition: ArrayPayload.h:33
std::vector< int > m_vec0
Definition: ArrayPayload.h:38
std::vector< Param > m_vec2
Definition: ArrayPayload.h:45
std::vector< Param > m_vec3
Definition: ArrayPayload.h:48
std::pair< int, std::string > m_p1
Definition: ArrayPayload.h:36
std::bitset< 128 > m_bitset
Definition: ArrayPayload.h:44
void setDefaultBitSet(std::bitset< 128 > &val)
Definition: ArrayPayload.cc:27
int m_ai2[3][2]
Definition: ArrayPayload.h:28
std::string m_as0[4]
Definition: ArrayPayload.h:30
int m_ai1[112]
Definition: ArrayPayload.h:27
std::pair< unsigned int, unsigned int > m_p0
Definition: ArrayPayload.h:35
int j
Definition: DBlmapReader.cc:9
std::map< std::string, std::string > m_map1
Definition: ArrayPayload.h:41
std::pair< int, Param > m_p2
Definition: ArrayPayload.h:37
std::map< int, Param > m_map2
Definition: ArrayPayload.h:46
std::list< int > m_list
Definition: ArrayPayload.h:42
std::string m_as1[112]
Definition: ArrayPayload.h:31
int m_ai3[2][80]
Definition: ArrayPayload.h:29
std::map< unsigned int, unsigned int > m_map0
Definition: ArrayPayload.h:40
int m_ai0[4]
Definition: ArrayPayload.h:26
tuple cout
Definition: gather_cfg.py:121
std::vector< std::string > m_vec1
Definition: ArrayPayload.h:39

Member Data Documentation

int ArrayPayload::m_ai0[4]
private

Definition at line 26 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

int ArrayPayload::m_ai1[112]
private

Definition at line 27 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

int ArrayPayload::m_ai2[3][2]
private

Definition at line 28 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

int ArrayPayload::m_ai3[2][80]
private

Definition at line 29 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

Param ArrayPayload::m_ap0[4]
private

Definition at line 32 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

Param ArrayPayload::m_ap1[112]
private

Definition at line 33 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::string ArrayPayload::m_as0[4]
private

Definition at line 30 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::string ArrayPayload::m_as1[112]
private

Definition at line 31 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::bitset<128> ArrayPayload::m_bitset
private

Definition at line 44 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

int ArrayPayload::m_i
private

Definition at line 24 of file ArrayPayload.h.

Referenced by operator==().

std::list<int> ArrayPayload::m_list
private

Definition at line 42 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::map<unsigned int,unsigned int> ArrayPayload::m_map0
private

Definition at line 40 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::map<std::string,std::string> ArrayPayload::m_map1
private

Definition at line 41 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::map<int,Param> ArrayPayload::m_map2
private

Definition at line 46 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::pair<unsigned int,unsigned int> ArrayPayload::m_p0
private

Definition at line 35 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::pair<int,std::string> ArrayPayload::m_p1
private

Definition at line 36 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::pair<int,Param> ArrayPayload::m_p2
private

Definition at line 37 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::set<std::string> ArrayPayload::m_set
private

Definition at line 43 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::vector<int> ArrayPayload::m_vec0
private

Definition at line 38 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::vector<std::string> ArrayPayload::m_vec1
private

Definition at line 39 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::vector<Param> ArrayPayload::m_vec2
private

Definition at line 45 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().

std::vector<Param> ArrayPayload::m_vec3
private

Definition at line 48 of file ArrayPayload.h.

Referenced by ArrayPayload(), and operator==().