Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
MarshaledExN02TrackerHit Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/geant4/v4_10_4_p02ba/source/geant4.10.04.p02/examples/extended/parallel/TopC/ParN02/include/MarshaledExN02TrackerHit.h"

Inheritance diagram for MarshaledExN02TrackerHit:
MarshaledObj

Public Member Functions

 MarshaledExN02TrackerHit (ExN02TrackerHit *objptr)
 
 MarshaledExN02TrackerHit (void *buf, char chIsUnmarshaling= 'u')
 
 ~MarshaledExN02TrackerHit ()
 
ExN02TrackerHit * unmarshal ()
 
void unmarshalTo (ExN02TrackerHit *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
void marshal2 ()
 
void unmarshal2 ()
 
void marshal3 ()
 
void unmarshal3 ()
 
void marshal4 ()
 
void unmarshal4 ()
 
bool isUnmarshaling ()
 
bool isUnmarshaling ()
 
void EXTEND_BUFFER (int size)
 
void EXTEND_BUFFER (int size)
 
void resizeBuffer (size_t new_size)
 
void resizeBuffer (size_t new_size)
 
int getBufferSize ()
 
int getBufferSize ()
 
char * getBuffer ()
 
char * getBuffer ()
 
void marshalPrimitive (void *p, int size)
 
void marshalPrimitive (void *p, int size)
 
void unmarshalPrimitive (void *p, int size)
 
void unmarshalPrimitive (void *p, int size)
 

Static Public Member Functions

static int ROUND_UP (int x)
 
static int ROUND_UP (int x)
 

Public Attributes

ExN02TrackerHit * param
 
ShadowedMarshaledExN02TrackerHitShadowed_param
 

Protected Attributes

int msh_typechoice
 
char * msh_buffer
 
char * msh_field_begin
 
size_t msh_size
 
char * msh_cursor
 
size_t msh_extent
 
bool msh_isUnmarshalDone
 

Detailed Description

Definition at line 22 of file MarshaledExN02TrackerHit.h.

Constructor & Destructor Documentation

MarshaledExN02TrackerHit::MarshaledExN02TrackerHit ( ExN02TrackerHit *  objptr)
inline

Definition at line 31 of file MarshaledExN02TrackerHit.h.

31  : MarshaledObj() {
32  msh_isUnmarshalDone = false;
33  this->param = objptr;
35  if (objptr == NULL)
36  return;
37 
38  marshal1();
39  marshal2();
40  marshal3();
41  marshal4();
42 }
ShadowedMarshaledExN02TrackerHit * Shadowed_param
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
MarshaledExN02TrackerHit::MarshaledExN02TrackerHit ( void buf,
char  chIsUnmarshaling = 'u' 
)
inline

Definition at line 44 of file MarshaledExN02TrackerHit.h.

45 : MarshaledObj(buf, chIsUnmarshaling) {
46  msh_isUnmarshalDone = false;
47 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
MarshaledExN02TrackerHit::~MarshaledExN02TrackerHit ( )
inline

Definition at line 49 of file MarshaledExN02TrackerHit.h.

49  {
50  //if(msh_isUnmarshalDone && this->param != NULL) {
51  //delete this->param;
52  //}
53 }

Member Function Documentation

void MarshaledObj::EXTEND_BUFFER ( int  size)
inlineinherited

Definition at line 122 of file MarshaledObj.h.

References MarshaledObj::resizeBuffer(), and gen_flatrecord::size.

Referenced by MarshaledObj::marshalPrimitive().

122  {
123  msh_size += size;
124  if(msh_size > msh_extent){
126  }
127  }
size_t msh_size
Definition: MarshaledObj.h:110
void resizeBuffer(size_t new_size)
Definition: MarshaledObj.h:129
size_t msh_extent
Definition: MarshaledObj.h:117
void MarshaledObj::EXTEND_BUFFER ( int  size)
inlineinherited

Definition at line 122 of file MarshaledObj.h.

References MarshaledObj::resizeBuffer(), and gen_flatrecord::size.

122  {
123  msh_size += size;
124  if(msh_size > msh_extent){
126  }
127  }
size_t msh_size
Definition: MarshaledObj.h:110
void resizeBuffer(size_t new_size)
Definition: MarshaledObj.h:129
size_t msh_extent
Definition: MarshaledObj.h:117
char* MarshaledObj::getBuffer ( )
inlineinherited
char* MarshaledObj::getBuffer ( )
inlineinherited

Definition at line 149 of file MarshaledObj.h.

References MarshaledObj::msh_buffer.

149  {
150  return msh_buffer;
151  }
char * msh_buffer
Definition: MarshaledObj.h:104
int MarshaledObj::getBufferSize ( )
inlineinherited
int MarshaledObj::getBufferSize ( )
inlineinherited

Definition at line 145 of file MarshaledObj.h.

References MarshaledObj::msh_size.

145  {
146  return msh_size;
147  }
size_t msh_size
Definition: MarshaledObj.h:110
bool MarshaledObj::isUnmarshaling ( )
inlineinherited

Definition at line 92 of file MarshaledObj.h.

References MarshaledObj::msh_extent, MarshaledObj::operator=(), and art::right().

Referenced by MarshaledObj::marshalPrimitive(), and MarshaledObj::~MarshaledObj().

92  {
93  return (msh_extent <= 0);
94  }
size_t msh_extent
Definition: MarshaledObj.h:117
bool MarshaledObj::isUnmarshaling ( )
inlineinherited
void MarshaledExN02TrackerHit::marshal1 ( )
inline

Definition at line 92 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, and tmp.

92  {
93  //declare field_size to be the size of this field
94  int msh_currentSize = 0;
95  if (isUnmarshaling())
96  throw "Tried to marshal in obj marked isUnmarshaling == true";
97 
98  //Copy the sizespec into msh_currentSize here:
99  {
100  msh_currentSize = sizeof(G4ThreeVector);
101 
102  }
103 
104  //Increase the size of buffer if needed
105  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
106  // 4 bytes for the total size of field, 4 bytes for the number
107  // of elements in the array (in the case of array marshaling)
108  //Mark the beginning position for this field, will write the total
109  // size of this field here later
111 
112  //Advance cursor of distance = sizeof(int)
113  msh_cursor += sizeof(int);
114 
115  //Now just copy "get" functions here
116  {
117  G4ThreeVector anElement;
118  anElement = param->GetPos();
119  memcpy(msh_cursor, &anElement, sizeof(G4ThreeVector));
120  }
121  //Now advance the cursor
122  msh_cursor += msh_currentSize;
123  //Now set the size of this field
124  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
125  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
126  memcpy(msh_field_begin, &tmp, sizeof(int));
127 
128  //Now set msh_size
131 }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
Float_t tmp
Definition: plot.C:36
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::marshal2 ( )
inline

Definition at line 149 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, and tmp.

149  {
150  //declare field_size to be the size of this field
151  int msh_currentSize = 0;
152  if (isUnmarshaling())
153  throw "Tried to marshal in obj marked isUnmarshaling == true";
154 
155  //Copy the sizespec into msh_currentSize here:
156  {
157  msh_currentSize = sizeof(G4double);
158 
159  }
160 
161  //Increase the size of buffer if needed
162  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
163  // 4 bytes for the total size of field, 4 bytes for the number of
164  // elements in the array (in the case of array marshaling)
165  //Mark the beginning position for this field, will write the total size
166  //of this field here later
168 
169  //Advance cursor of distance = sizeof(int)
170  msh_cursor += sizeof(int);
171 
172  //Now just copy "get" functions here
173  {
174  G4double anElement;
175  anElement = param->GetEdep();
176  memcpy(msh_cursor, &anElement, sizeof(G4double));
177  }
178  //Now advance the cursor
179  msh_cursor += msh_currentSize;
180  //Now set the size of this field
181  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
182  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
183  memcpy(msh_field_begin, &tmp, sizeof(int));
184 
185  //Now set msh_size
188 }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
Float_t tmp
Definition: plot.C:36
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::marshal3 ( )
inline

Definition at line 206 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, and tmp.

206  {
207  //declare field_size to be the size of this field
208  int msh_currentSize = 0;
209  if (isUnmarshaling())
210  throw "Tried to marshal in obj marked isUnmarshaling == true";
211 
212  //Copy the sizespec into msh_currentSize here:
213  {
214  msh_currentSize = sizeof(G4int );
215 
216  }
217 
218  //Increase the size of buffer if needed
219  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
220  // 4 bytes for the total size of field, 4 bytes for the number
221  // of elements in the array (in the case of array marshaling)
222  //Mark the beginning position for this field, will write the total
223  //size of this field here later
225 
226  //Advance cursor of distance = sizeof(int)
227  msh_cursor += sizeof(int);
228 
229  //Now just copy "get" functions here
230  {
231  G4int anElement;
232  anElement = param->GetTrackID();
233  memcpy(msh_cursor, &anElement, sizeof(G4int ));
234  }
235  //Now advance the cursor
236  msh_cursor += msh_currentSize;
237  //Now set the size of this field
238  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
239  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
240  memcpy(msh_field_begin, &tmp, sizeof(int));
241 
242  //Now set msh_size
245 }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
Float_t tmp
Definition: plot.C:36
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::marshal4 ( )
inline

Definition at line 263 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, and tmp.

263  {
264  //declare field_size to be the size of this field
265  int msh_currentSize = 0;
266  if (isUnmarshaling())
267  throw "Tried to marshal in obj marked isUnmarshaling == true";
268 
269  //Copy the sizespec into msh_currentSize here:
270  {
271  msh_currentSize = sizeof(G4int );
272 
273  }
274 
275  //Increase the size of buffer if needed
276  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
277  // 4 bytes for the total size of field, 4 bytes for the number
278  // of elements in the array (in the case of array marshaling)
279  //Mark the beginning position for this field, will write the total
280  //size of this field here later
282 
283  //Advance cursor of distance = sizeof(int)
284  msh_cursor += sizeof(int);
285 
286  //Now just copy "get" functions here
287  {
288  G4int anElement;
289  anElement = param->GetChamberNb();
290  memcpy(msh_cursor, &anElement, sizeof(G4int ));
291  }
292  //Now advance the cursor
293  msh_cursor += msh_currentSize;
294  //Now set the size of this field
295  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
296  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
297  memcpy(msh_field_begin, &tmp, sizeof(int));
298 
299  //Now set msh_size
302 }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
Float_t tmp
Definition: plot.C:36
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::marshalPrimitive ( void p,
int  size 
)
inlineinherited

Definition at line 154 of file MarshaledObj.h.

References MarshaledObj::EXTEND_BUFFER(), makeTrainCVSamples::int, MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MSH_SET_TOTALSIZE, and gen_flatrecord::size.

154  {
155  int msh_currentSize;
156  if (isUnmarshaling())
157  throw "Tried to marshal in object marked isUnmarshaling = true";
158  msh_currentSize = size;
159  EXTEND_BUFFER(msh_currentSize + sizeof(int));
160 
161  // *(int *)msh_cursor = msh_currentSize;
162  memcpy(msh_cursor, &msh_currentSize, sizeof(int));
163  msh_cursor += sizeof(int);
164  memcpy(msh_cursor, p, size);
165  msh_cursor += msh_currentSize;
167 
169  }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
const char * p
Definition: xmltok.h:285
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
size_t msh_size
Definition: MarshaledObj.h:110
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::marshalPrimitive ( void p,
int  size 
)
inlineinherited

Definition at line 154 of file MarshaledObj.h.

References MarshaledObj::EXTEND_BUFFER(), makeTrainCVSamples::int, MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MSH_SET_TOTALSIZE, and gen_flatrecord::size.

154  {
155  int msh_currentSize;
156  if (isUnmarshaling())
157  throw "Tried to marshal in object marked isUnmarshaling = true";
158  msh_currentSize = size;
159  EXTEND_BUFFER(msh_currentSize + sizeof(int));
160 
161  // *(int *)msh_cursor = msh_currentSize;
162  memcpy(msh_cursor, &msh_currentSize, sizeof(int));
163  msh_cursor += sizeof(int);
164  memcpy(msh_cursor, p, size);
165  msh_cursor += msh_currentSize;
167 
169  }
bool isUnmarshaling()
Definition: MarshaledObj.h:92
const char * p
Definition: xmltok.h:285
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
char * msh_buffer
Definition: MarshaledObj.h:104
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::resizeBuffer ( size_t  new_size)
inlineinherited

Definition at line 129 of file MarshaledObj.h.

References MSH_ASSERT, and MarshaledObj::msh_buffer.

Referenced by MarshaledObj::EXTEND_BUFFER().

129  {
130  int msh_displacement = msh_cursor - msh_buffer;
131  int field_displacement = msh_field_begin - msh_buffer;
132 
133  while(new_size > msh_extent)
134  msh_extent *= 2;
135 
136  msh_buffer = (char *)realloc( msh_buffer, msh_extent);
137  MSH_ASSERT(msh_buffer);
138 
139  msh_cursor = msh_buffer + msh_displacement;
140  msh_field_begin = msh_buffer + field_displacement;
141  }
#define MSH_ASSERT(X)
Definition: MarshaledObj.h:13
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_buffer
Definition: MarshaledObj.h:104
size_t msh_extent
Definition: MarshaledObj.h:117
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::resizeBuffer ( size_t  new_size)
inlineinherited

Definition at line 129 of file MarshaledObj.h.

References MSH_ASSERT, and MarshaledObj::msh_buffer.

129  {
130  int msh_displacement = msh_cursor - msh_buffer;
131  int field_displacement = msh_field_begin - msh_buffer;
132 
133  while(new_size > msh_extent)
134  msh_extent *= 2;
135 
136  msh_buffer = (char *)realloc( msh_buffer, msh_extent);
137  MSH_ASSERT(msh_buffer);
138 
139  msh_cursor = msh_buffer + msh_displacement;
140  msh_field_begin = msh_buffer + field_displacement;
141  }
char * msh_field_begin
Definition: MarshaledObj.h:107
#define MSH_ASSERT(X)
Definition: MarshaledObj.h:13
char * msh_buffer
Definition: MarshaledObj.h:104
size_t msh_extent
Definition: MarshaledObj.h:117
char * msh_cursor
Definition: MarshaledObj.h:113
static int MarshaledObj::ROUND_UP ( int  x)
inlinestaticinherited

Definition at line 32 of file MarshaledObj.h.

References MarshaledObj::WORD_SIZE.

Referenced by MarshaledObj::MarshaledObj().

32  {
33  return (((x)+(WORD_SIZE-1)) / WORD_SIZE) * WORD_SIZE;
34  }
static const int WORD_SIZE
Definition: MarshaledObj.h:30
static int MarshaledObj::ROUND_UP ( int  x)
inlinestaticinherited

Definition at line 32 of file MarshaledObj.h.

References MarshaledObj::WORD_SIZE.

32  {
33  return (((x)+(WORD_SIZE-1)) / WORD_SIZE) * WORD_SIZE;
34  }
static const int WORD_SIZE
Definition: MarshaledObj.h:30
ExN02TrackerHit* MarshaledExN02TrackerHit::unmarshal ( )
inline

Definition at line 55 of file MarshaledExN02TrackerHit.h.

References MSH_HEADER_SIZE, and ParseFluxesFile::param.

Referenced by MarshaledG4HitsCollection::unmarshal1().

55  {
56  //We don't want to unmarshal the buffer is empty.
57  if(msh_size <= MSH_HEADER_SIZE) {
58  //This is buggy, we can't always assume that
59  //obj == NULL <==> List is empty.
60  return NULL;
61  } else {
62  {
63  param = new ExN02TrackerHit();
64  }
66  this->msh_isUnmarshalDone = true;
67  unmarshal1();
68  unmarshal2();
69  unmarshal3();
70  unmarshal4();
71  return this->param;
72  }
73 }
ShadowedMarshaledExN02TrackerHit * Shadowed_param
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_HEADER_SIZE
Definition: MarshaledObj.h:15
void MarshaledExN02TrackerHit::unmarshal1 ( )
inline

Definition at line 133 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int.

133  {
134  //declare currentSize to be the size of this field
135  int msh_currentSize = 0;
136  //copy the size of the current field into currentSize
137  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
138  msh_cursor += sizeof(int);
139  //Now copy the setspec here
140  {
141  G4ThreeVector anElement;
142  memcpy(&anElement, msh_cursor, sizeof(G4ThreeVector));
143  param->SetPos(anElement);
144 
145  }
146  msh_cursor += msh_currentSize;
147 }
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::unmarshal2 ( )
inline

Definition at line 190 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int.

190  {
191  //declare currentSize to be the size of this field
192  int msh_currentSize = 0;
193  //copy the size of the current field into currentSize
194  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
195  msh_cursor += sizeof(int);
196  //Now copy the setspec here
197  {
198  G4double anElement;
199  memcpy(&anElement, msh_cursor, sizeof(G4double));
200  param->SetEdep(anElement);
201 
202  }
203  msh_cursor += msh_currentSize;
204 }
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::unmarshal3 ( )
inline

Definition at line 247 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int.

247  {
248  //declare currentSize to be the size of this field
249  int msh_currentSize = 0;
250  //copy the size of the current field into currentSize
251  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
252  msh_cursor += sizeof(int);
253  //Now copy the setspec here
254  {
255  G4int anElement;
256  memcpy(&anElement, msh_cursor, sizeof(G4int ));
257  param->SetTrackID(anElement);
258 
259  }
260  msh_cursor += msh_currentSize;
261 }
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::unmarshal4 ( )
inline

Definition at line 304 of file MarshaledExN02TrackerHit.h.

References makeTrainCVSamples::int.

304  {
305  //declare currentSize to be the size of this field
306  int msh_currentSize = 0;
307  //copy the size of the current field into currentSize
308  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
309  msh_cursor += sizeof(int);
310  //Now copy the setspec here
311  {
312  G4int anElement;
313  memcpy(&anElement, msh_cursor, sizeof(G4int ));
314  param->SetChamberNb(anElement);
315 
316  }
317  msh_cursor += msh_currentSize;
318 }
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::unmarshalPrimitive ( void p,
int  size 
)
inlineinherited

Definition at line 171 of file MarshaledObj.h.

References makeTrainCVSamples::int, and gen_flatrecord::size.

171  {
172  int msh_currentSize;
173  //memcpy(&msh_currentSize, msh_cursor, sizeof(int));
174  /* in case *msh_cursor is invalid, use "size" not to crash the memory */
175  msh_currentSize = size;
176  msh_cursor += sizeof(int);
177  memcpy(p, msh_cursor, msh_currentSize);
178  msh_cursor += msh_currentSize;
179  //msh_size = msh_cursor - msh_buffer;
180  }
const char * p
Definition: xmltok.h:285
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledObj::unmarshalPrimitive ( void p,
int  size 
)
inlineinherited

Definition at line 171 of file MarshaledObj.h.

References makeTrainCVSamples::int, and gen_flatrecord::size.

171  {
172  int msh_currentSize;
173  //memcpy(&msh_currentSize, msh_cursor, sizeof(int));
174  /* in case *msh_cursor is invalid, use "size" not to crash the memory */
175  msh_currentSize = size;
176  msh_cursor += sizeof(int);
177  memcpy(p, msh_cursor, msh_currentSize);
178  msh_cursor += msh_currentSize;
179  //msh_size = msh_cursor - msh_buffer;
180  }
const char * p
Definition: xmltok.h:285
char * msh_cursor
Definition: MarshaledObj.h:113
void MarshaledExN02TrackerHit::unmarshalTo ( ExN02TrackerHit *  obj)
inline

Definition at line 75 of file MarshaledExN02TrackerHit.h.

References MSH_HEADER_SIZE.

75  {
76  //We don't want to unmarshal the buffer is empty.
77  if(msh_size <= MSH_HEADER_SIZE) {
78  //This is buggy, we can't always assume that
79  //obj == NULL <==> List is empty.
80  return;
81  } else {
82  this->param = obj;
84  this->msh_isUnmarshalDone = true;
85  unmarshal1();
86  unmarshal2();
87  unmarshal3();
88  unmarshal4();
89  }
90 }
ShadowedMarshaledExN02TrackerHit * Shadowed_param
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_HEADER_SIZE
Definition: MarshaledObj.h:15

Member Data Documentation

char * MarshaledObj::msh_buffer
protectedinherited
char * MarshaledObj::msh_cursor
protectedinherited

Definition at line 113 of file MarshaledObj.h.

Referenced by MarshaledObj::isUnmarshaling(), and MarshaledObj::MarshaledObj().

size_t MarshaledObj::msh_extent
protectedinherited

Definition at line 117 of file MarshaledObj.h.

Referenced by MarshaledObj::isUnmarshaling(), and MarshaledObj::MarshaledObj().

char * MarshaledObj::msh_field_begin
protectedinherited

Definition at line 107 of file MarshaledObj.h.

Referenced by MarshaledObj::isUnmarshaling(), and MarshaledObj::MarshaledObj().

bool MarshaledObj::msh_isUnmarshalDone
protectedinherited

Definition at line 119 of file MarshaledObj.h.

Referenced by MarshaledObj::isUnmarshaling(), and MarshaledObj::MarshaledObj().

size_t MarshaledObj::msh_size
protectedinherited
int MarshaledObj::msh_typechoice
protectedinherited

Definition at line 101 of file MarshaledObj.h.

Referenced by MarshaledObj::isUnmarshaling(), and MarshaledObj::MarshaledObj().

ExN02TrackerHit* MarshaledExN02TrackerHit::param

Definition at line 24 of file MarshaledExN02TrackerHit.h.

ShadowedMarshaledExN02TrackerHit* MarshaledExN02TrackerHit::Shadowed_param

Definition at line 25 of file MarshaledExN02TrackerHit.h.


The documentation for this class was generated from the following file: