Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MarshaledG4HCofThisEvent Class Reference

#include <MarshaledG4HCofThisEvent.h>

Inheritance diagram for MarshaledG4HCofThisEvent:
Collaboration diagram for MarshaledG4HCofThisEvent:

Public Member Functions

 MarshaledG4HCofThisEvent (G4HCofThisEvent *objptr)
 
 MarshaledG4HCofThisEvent (void *buf, char isUnmarshaling= 'u')
 
 ~MarshaledG4HCofThisEvent ()
 
G4HCofThisEventunmarshal ()
 
void unmarshalTo (G4HCofThisEvent *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HCofThisEvent (G4HCofThisEvent *objptr)
 
 MarshaledG4HCofThisEvent (void *buf, char chIsUnmarshaling= 'u')
 
 ~MarshaledG4HCofThisEvent ()
 
G4HCofThisEventunmarshal ()
 
void unmarshalTo (G4HCofThisEvent *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HCofThisEvent (G4HCofThisEvent *objptr)
 
 MarshaledG4HCofThisEvent (void *buf, char isUnmarshaling= 'u')
 
 ~MarshaledG4HCofThisEvent ()
 
G4HCofThisEventunmarshal ()
 
void unmarshalTo (G4HCofThisEvent *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HCofThisEvent (G4HCofThisEvent *objptr)
 
 MarshaledG4HCofThisEvent (void *buf, char chIsUnmarshaling= 'u')
 
 ~MarshaledG4HCofThisEvent ()
 
G4HCofThisEventunmarshal ()
 
void unmarshalTo (G4HCofThisEvent *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
- Public Member Functions inherited from MarshaledObj
 MarshaledObj ()
 
 MarshaledObj (void *buf, char chIsUnmarshaling)
 
 ~MarshaledObj ()
 
bool isUnmarshaling ()
 
void EXTEND_BUFFER (int size)
 
void resizeBuffer (size_t new_size)
 
int getBufferSize ()
 
char * getBuffer ()
 
void marshalPrimitive (void *p, int size)
 
void unmarshalPrimitive (void *p, int size)
 
 MarshaledObj ()
 
 MarshaledObj (void *buf, char chIsUnmarshaling)
 
 ~MarshaledObj ()
 
bool isUnmarshaling ()
 
void EXTEND_BUFFER (int size)
 
void resizeBuffer (size_t new_size)
 
int getBufferSize ()
 
char * getBuffer ()
 
void marshalPrimitive (void *p, int size)
 
void unmarshalPrimitive (void *p, int size)
 

Public Attributes

G4HCofThisEventparam
 
ShadowedMarshaledG4HCofThisEventShadowed_param
 

Additional Inherited Members

- Static Public Member Functions inherited from MarshaledObj
static int ROUND_UP (int x)
 
static int ROUND_UP (int x)
 
- Protected Attributes inherited from MarshaledObj
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 30 of file MarshaledG4HCofThisEvent.h.

Constructor & Destructor Documentation

MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( G4HCofThisEvent objptr)
inline

Definition at line 39 of file MarshaledG4HCofThisEvent.h.

39  : MarshaledObj() {
40  msh_isUnmarshalDone = false;
41  this->param = objptr;
43  if (objptr == NULL)
44  return;
45 
46  marshal1();
47 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param

Here is the call graph for this function:

MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( void buf,
char  isUnmarshaling = 'u' 
)
inline

Definition at line 49 of file MarshaledG4HCofThisEvent.h.

51  msh_isUnmarshalDone = false;
52 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
bool isUnmarshaling()
Definition: MarshaledObj.h:92
MarshaledG4HCofThisEvent::~MarshaledG4HCofThisEvent ( )
inline

Definition at line 54 of file MarshaledG4HCofThisEvent.h.

54  {
55  //if(msh_isUnmarshalDone && this->param != NULL) {
56  //delete this->param;
57  //}
58 }
MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( G4HCofThisEvent objptr)
inline

Definition at line 36 of file MarshaledG4HCofThisEvent.h.

36  : MarshaledObj() {
37  msh_isUnmarshalDone = false;
38  this->param = objptr;
40  if (objptr == NULL)
41  return;
42 
43  marshal1();
44 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param

Here is the call graph for this function:

MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( void buf,
char  chIsUnmarshaling = 'u' 
)
inline

Definition at line 46 of file MarshaledG4HCofThisEvent.h.

47 : MarshaledObj(buf, chIsUnmarshaling) {
48  msh_isUnmarshalDone = false;
49 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
MarshaledG4HCofThisEvent::~MarshaledG4HCofThisEvent ( )
inline

Definition at line 51 of file MarshaledG4HCofThisEvent.h.

51  {
52  //if(msh_isUnmarshalDone && this->param != NULL) {
53  //delete this->param;
54  //}
55 }
MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( G4HCofThisEvent objptr)
inline

Definition at line 39 of file MarshaledG4HCofThisEvent.h.

39  : MarshaledObj() {
40  msh_isUnmarshalDone = false;
41  this->param = objptr;
43  if (objptr == NULL)
44  return;
45 
46  marshal1();
47 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param

Here is the call graph for this function:

MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( void buf,
char  isUnmarshaling = 'u' 
)
inline

Definition at line 49 of file MarshaledG4HCofThisEvent.h.

51  msh_isUnmarshalDone = false;
52 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
bool isUnmarshaling()
Definition: MarshaledObj.h:92
MarshaledG4HCofThisEvent::~MarshaledG4HCofThisEvent ( )
inline

Definition at line 54 of file MarshaledG4HCofThisEvent.h.

54  {
55  //if(msh_isUnmarshalDone && this->param != NULL) {
56  //delete this->param;
57  //}
58 }
MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( G4HCofThisEvent objptr)
inline

Definition at line 36 of file MarshaledG4HCofThisEvent.h.

36  : MarshaledObj() {
37  msh_isUnmarshalDone = false;
38  this->param = objptr;
40  if (objptr == NULL)
41  return;
42 
43  marshal1();
44 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param

Here is the call graph for this function:

MarshaledG4HCofThisEvent::MarshaledG4HCofThisEvent ( void buf,
char  chIsUnmarshaling = 'u' 
)
inline

Definition at line 46 of file MarshaledG4HCofThisEvent.h.

47 : MarshaledObj(buf, chIsUnmarshaling) {
48  msh_isUnmarshalDone = false;
49 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
MarshaledG4HCofThisEvent::~MarshaledG4HCofThisEvent ( )
inline

Definition at line 51 of file MarshaledG4HCofThisEvent.h.

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

Member Function Documentation

void MarshaledG4HCofThisEvent::marshal1 ( )
inline

Definition at line 88 of file MarshaledG4HCofThisEvent.h.

88  {
89  //declare field_size to be the size of this field
90  int msh_currentSize = 0;
91  if (isUnmarshaling())
92  throw "Tried to marshal in obj marked isUnmarshaling == true";
93 
94  //Copy the sizespec into msh_currentSize here:
95  {
96 
97  }
98 
99  //Increase the size of buffer if needed
100  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
101  // 4 bytes for the total size of field, 4 bytes for the number
102  // of elements in the array (in the case of array marshaling)
103  //Mark the beginning position for this field, will write the total
104  //size of this field here later
106 
107  //Advance cursor of distance = sizeof(int)
108  msh_cursor += sizeof(int);
109 
110  //Now just copy "get" functions here
111  {
112  int copy_off = 0;
113  int elementNum;
114  elementNum = param->GetNumberOfCollections();
115  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
116  copy_off += sizeof(int);
117  for(int index=0;index<elementNum;index++){
118  G4VHitsCollection* anElement;
119  anElement = param->GetHC(index);
120  MarshaledG4VHitsCollection marEle(anElement);
121  EXTEND_BUFFER(marEle.getBufferSize());
122  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
123  copy_off += marEle.getBufferSize();
124  }
125  msh_currentSize = copy_off;
126 
127  }
128  //Now advance the cursor
129  msh_cursor += msh_currentSize;
130  //Now set the size of this field
131  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
132  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
133  memcpy(msh_field_begin, &tmp, sizeof(int));
134 
135  //Now set msh_size
138 }
G4VHitsCollection * GetHC(G4int i)
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
bool isUnmarshaling()
Definition: MarshaledObj.h:92
size_t msh_size
Definition: MarshaledObj.h:110
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_cursor
Definition: MarshaledObj.h:113
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
char * msh_buffer
Definition: MarshaledObj.h:104
G4int GetNumberOfCollections()

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::marshal1 ( )
inline

Definition at line 88 of file MarshaledG4HCofThisEvent.h.

88  {
89  //declare field_size to be the size of this field
90  int msh_currentSize = 0;
91  if (isUnmarshaling())
92  throw "Tried to marshal in obj marked isUnmarshaling == true";
93 
94  //Copy the sizespec into msh_currentSize here:
95  {
96 
97  }
98 
99  //Increase the size of buffer if needed
100  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
101  // 4 bytes for the total size of field, 4 bytes for the number of
102  // elements in the array (in the case of array marshaling)
103  //Mark the beginning position for this field, will write the total size
104  //of this field here later
106 
107  //Advance cursor of distance = sizeof(int)
108  msh_cursor += sizeof(int);
109 
110  //Now just copy "get" functions here
111  {
112  int copy_off = 0;
113  int elementNum;
114  elementNum = param->GetNumberOfCollections();
115  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
116  copy_off += sizeof(int);
117  for(int index=0;index<elementNum;index++){
118  G4VHitsCollection* anElement;
119  anElement = param->GetHC(index);
120  MarshaledG4VHitsCollection marEle(anElement);
121  EXTEND_BUFFER(marEle.getBufferSize());
122  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
123  copy_off += marEle.getBufferSize();
124  }
125  msh_currentSize = copy_off;
126 
127  }
128  //Now advance the cursor
129  msh_cursor += msh_currentSize;
130  //Now set the size of this field
131  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
132  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
133  memcpy(msh_field_begin, &tmp, sizeof(int));
134 
135  //Now set msh_size
138 }
G4VHitsCollection * GetHC(G4int i)
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
bool isUnmarshaling()
Definition: MarshaledObj.h:92
size_t msh_size
Definition: MarshaledObj.h:110
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_cursor
Definition: MarshaledObj.h:113
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
char * msh_buffer
Definition: MarshaledObj.h:104
G4int GetNumberOfCollections()

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::marshal1 ( )
inline

Definition at line 91 of file MarshaledG4HCofThisEvent.h.

91  {
92  //declare field_size to be the size of this field
93  int msh_currentSize = 0;
94  if (isUnmarshaling())
95  throw "Tried to marshal in obj marked isUnmarshaling == true";
96 
97  //Copy the sizespec into msh_currentSize here:
98  {
99 
100  }
101 
102  //Increase the size of buffer if needed
103  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
104  //Mark the beginning position for this field, will write the total size of this field here later
106 
107  //Advance cursor of distance = sizeof(int)
108  msh_cursor += sizeof(int);
109 
110  //Now just copy "get" functions here
111  {
112  int copy_off = 0;
113  int elementNum;
114  elementNum = param->GetNumberOfCollections();
115  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
116  copy_off += sizeof(int);
117  for(int index=0;index<elementNum;index++){
118  G4VHitsCollection* anElement;
119  anElement = param->GetHC(index);
120  MarshaledG4VHitsCollection marEle(anElement);
121  EXTEND_BUFFER(marEle.getBufferSize());
122  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
123  copy_off += marEle.getBufferSize();
124  }
125  msh_currentSize = copy_off;
126 
127  }
128  //Now advance the cursor
129  msh_cursor += msh_currentSize;
130  //Now set the size of this field
131  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
132  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
133  memcpy(msh_field_begin, &tmp, sizeof(int));
134 
135  //Now set msh_size
138 }
G4VHitsCollection * GetHC(G4int i)
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
bool isUnmarshaling()
Definition: MarshaledObj.h:92
size_t msh_size
Definition: MarshaledObj.h:110
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_cursor
Definition: MarshaledObj.h:113
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
char * msh_buffer
Definition: MarshaledObj.h:104
G4int GetNumberOfCollections()

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::marshal1 ( )
inline

Definition at line 91 of file MarshaledG4HCofThisEvent.h.

91  {
92  //declare field_size to be the size of this field
93  int msh_currentSize = 0;
94  if (isUnmarshaling())
95  throw "Tried to marshal in obj marked isUnmarshaling == true";
96 
97  //Copy the sizespec into msh_currentSize here:
98  {
99 
100  }
101 
102  //Increase the size of buffer if needed
103  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
104  //Mark the beginning position for this field, will write the total size of this field here later
106 
107  //Advance cursor of distance = sizeof(int)
108  msh_cursor += sizeof(int);
109 
110  //Now just copy "get" functions here
111  {
112  int copy_off = 0;
113  int elementNum;
114  elementNum = param->GetNumberOfCollections();
115  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
116  copy_off += sizeof(int);
117  for(int index=0;index<elementNum;index++){
118  G4VHitsCollection* anElement;
119  anElement = param->GetHC(index);
120  MarshaledG4VHitsCollection marEle(anElement);
121  EXTEND_BUFFER(marEle.getBufferSize());
122  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
123  copy_off += marEle.getBufferSize();
124  }
125  msh_currentSize = copy_off;
126 
127  }
128  //Now advance the cursor
129  msh_cursor += msh_currentSize;
130  //Now set the size of this field
131  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
132  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
133  memcpy(msh_field_begin, &tmp, sizeof(int));
134 
135  //Now set msh_size
138 }
G4VHitsCollection * GetHC(G4int i)
#define MSH_SET_TYPECHOICE(X)
Definition: MarshaledObj.h:21
bool isUnmarshaling()
Definition: MarshaledObj.h:92
size_t msh_size
Definition: MarshaledObj.h:110
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void EXTEND_BUFFER(int size)
Definition: MarshaledObj.h:122
char * msh_field_begin
Definition: MarshaledObj.h:107
char * msh_cursor
Definition: MarshaledObj.h:113
#define MSH_SET_TOTALSIZE(X)
Definition: MarshaledObj.h:22
char * msh_buffer
Definition: MarshaledObj.h:104
G4int GetNumberOfCollections()

Here is the call graph for this function:

Here is the caller graph for this function:

G4HCofThisEvent* MarshaledG4HCofThisEvent::unmarshal ( )
inline

Definition at line 57 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

G4HCofThisEvent* MarshaledG4HCofThisEvent::unmarshal ( )
inline

Definition at line 57 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

G4HCofThisEvent* MarshaledG4HCofThisEvent::unmarshal ( )
inline

Definition at line 60 of file MarshaledG4HCofThisEvent.h.

60  {
61  //We don't want to unmarshal the buffer is empty.
62  if(msh_size <= MSH_HEADER_SIZE) {
63  //This is buggy, we can't always assume that
64  //obj == NULL <==> List is empty.
65  return NULL;
66  } else {
67  {
68  param = new G4HCofThisEvent();
69  }
71  this->msh_isUnmarshalDone = true;
72  unmarshal1();
73  return this->param;
74  }
75 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_HEADER_SIZE
Definition: MarshaledObj.h:15

Here is the call graph for this function:

G4HCofThisEvent* MarshaledG4HCofThisEvent::unmarshal ( )
inline

Definition at line 60 of file MarshaledG4HCofThisEvent.h.

60  {
61  //We don't want to unmarshal the buffer is empty.
62  if(msh_size <= MSH_HEADER_SIZE) {
63  //This is buggy, we can't always assume that
64  //obj == NULL <==> List is empty.
65  return NULL;
66  } else {
67  {
68  param = new G4HCofThisEvent();
69  }
71  this->msh_isUnmarshalDone = true;
72  unmarshal1();
73  return this->param;
74  }
75 }
bool msh_isUnmarshalDone
Definition: MarshaledObj.h:119
ShadowedMarshaledG4HCofThisEvent * Shadowed_param
size_t msh_size
Definition: MarshaledObj.h:110
#define MSH_HEADER_SIZE
Definition: MarshaledObj.h:15

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshal1 ( )
inline

Definition at line 140 of file MarshaledG4HCofThisEvent.h.

140  {
141  //declare currentSize to be the size of this field
142  int msh_currentSize = 0;
143  //copy the size of the current field into currentSize
144  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
145  msh_cursor += sizeof(int);
146  //Now copy the setspec here
147  {
148  int copy_off = 0;
149  int elementNum;
150  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
151  copy_off += sizeof(int);
152  for(int index=0;index<elementNum;index++){
153  MarshaledG4VHitsCollection marEle(msh_cursor+copy_off);
154  G4VHitsCollection* anElement = (G4VHitsCollection*)marEle.unmarshal();
155  copy_off += marEle.getBufferSize();
156  param->AddHitsCollection(index, anElement);
157  }
158 
159  }
160  msh_cursor += msh_currentSize;
161 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
char * msh_cursor
Definition: MarshaledObj.h:113

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshal1 ( )
inline

Definition at line 140 of file MarshaledG4HCofThisEvent.h.

140  {
141  //declare currentSize to be the size of this field
142  int msh_currentSize = 0;
143  //copy the size of the current field into currentSize
144  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
145  msh_cursor += sizeof(int);
146  //Now copy the setspec here
147  {
148  int copy_off = 0;
149  int elementNum;
150  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
151  copy_off += sizeof(int);
152  for(int index=0;index<elementNum;index++){
153  MarshaledG4VHitsCollection marEle(msh_cursor+copy_off);
154  G4VHitsCollection* anElement = (G4VHitsCollection*)marEle.unmarshal();
155  copy_off += marEle.getBufferSize();
156  param->AddHitsCollection(index, anElement);
157  }
158 
159  }
160  msh_cursor += msh_currentSize;
161 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
char * msh_cursor
Definition: MarshaledObj.h:113

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshal1 ( )
inline

Definition at line 140 of file MarshaledG4HCofThisEvent.h.

140  {
141  //declare currentSize to be the size of this field
142  int msh_currentSize = 0;
143  //copy the size of the current field into currentSize
144  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
145  msh_cursor += sizeof(int);
146  //Now copy the setspec here
147  {
148  int copy_off = 0;
149  int elementNum;
150  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
151  copy_off += sizeof(int);
152  for(int index=0;index<elementNum;index++){
153  MarshaledG4VHitsCollection marEle(msh_cursor+copy_off);
154  G4VHitsCollection* anElement = (G4VHitsCollection*)marEle.unmarshal();
155  copy_off += marEle.getBufferSize();
156  param->AddHitsCollection(index, anElement);
157  }
158 
159  }
160  msh_cursor += msh_currentSize;
161 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
char * msh_cursor
Definition: MarshaledObj.h:113

Here is the call graph for this function:

Here is the caller graph for this function:

void MarshaledG4HCofThisEvent::unmarshal1 ( )
inline

Definition at line 140 of file MarshaledG4HCofThisEvent.h.

140  {
141  //declare currentSize to be the size of this field
142  int msh_currentSize = 0;
143  //copy the size of the current field into currentSize
144  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
145  msh_cursor += sizeof(int);
146  //Now copy the setspec here
147  {
148  int copy_off = 0;
149  int elementNum;
150  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
151  copy_off += sizeof(int);
152  for(int index=0;index<elementNum;index++){
153  MarshaledG4VHitsCollection marEle(msh_cursor+copy_off);
154  G4VHitsCollection* anElement = (G4VHitsCollection*)marEle.unmarshal();
155  copy_off += marEle.getBufferSize();
156  param->AddHitsCollection(index, anElement);
157  }
158 
159  }
160  msh_cursor += msh_currentSize;
161 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
char * msh_cursor
Definition: MarshaledObj.h:113

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshalTo ( G4HCofThisEvent obj)
inline

Definition at line 74 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshalTo ( G4HCofThisEvent obj)
inline

Definition at line 74 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshalTo ( G4HCofThisEvent obj)
inline

Definition at line 77 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

void MarshaledG4HCofThisEvent::unmarshalTo ( G4HCofThisEvent obj)
inline

Definition at line 77 of file MarshaledG4HCofThisEvent.h.

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

Here is the call graph for this function:

Member Data Documentation

G4HCofThisEvent * MarshaledG4HCofThisEvent::param

Definition at line 32 of file MarshaledG4HCofThisEvent.h.

ShadowedMarshaledG4HCofThisEvent * MarshaledG4HCofThisEvent::Shadowed_param

Definition at line 33 of file MarshaledG4HCofThisEvent.h.


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