Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Data Fields
MarshaledG4HitsCollection Class Reference

#include <MarshaledG4THitsCollection.h>

Inheritance diagram for MarshaledG4HitsCollection:
MarshaledObj MarshaledObj MarshaledObj MarshaledObj

Public Member Functions

 MarshaledG4HitsCollection (G4HitsCollection *objptr)
 
 MarshaledG4HitsCollection (void *buf, char isUnmarshaling= 'u')
 
 ~MarshaledG4HitsCollection ()
 
G4HitsCollectionunmarshal ()
 
void unmarshalTo (G4HitsCollection *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HitsCollection (G4HitsCollection *objptr)
 
 MarshaledG4HitsCollection (void *buf, char chIsUnmarshaling= 'u')
 
 ~MarshaledG4HitsCollection ()
 
G4HitsCollectionunmarshal ()
 
void unmarshalTo (G4HitsCollection *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HitsCollection (G4HitsCollection *objptr)
 
 MarshaledG4HitsCollection (void *buf, char isUnmarshaling= 'u')
 
 ~MarshaledG4HitsCollection ()
 
G4HitsCollectionunmarshal ()
 
void unmarshalTo (G4HitsCollection *obj)
 
void marshal1 ()
 
void unmarshal1 ()
 
 MarshaledG4HitsCollection (G4HitsCollection *objptr)
 
 MarshaledG4HitsCollection (void *buf, char chIsUnmarshaling= 'u')
 
 ~MarshaledG4HitsCollection ()
 
G4HitsCollectionunmarshal ()
 
void unmarshalTo (G4HitsCollection *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)
 

Data Fields

G4HitsCollectionparam
 
ShadowedMarshaledG4HitsCollectionShadowed_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 ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

Constructor & Destructor Documentation

MarshaledG4HitsCollection::MarshaledG4HitsCollection ( G4HitsCollection objptr)
inline
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( void buf,
char  isUnmarshaling = 'u' 
)
inline
MarshaledG4HitsCollection::~MarshaledG4HitsCollection ( )
inline

Definition at line 54 of file ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

54  {
55  //if(msh_isUnmarshalDone && this->param != NULL) {
56  //delete this->param;
57  //}
58 }
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( G4HitsCollection objptr)
inline
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( void buf,
char  chIsUnmarshaling = 'u' 
)
inline

Definition at line 47 of file ParN02/include/MarshaledG4THitsCollection.h.

References MarshaledObj::msh_isUnmarshalDone.

48 : MarshaledObj(buf, chIsUnmarshaling) {
49  msh_isUnmarshalDone = false;
50 }
MarshaledG4HitsCollection::~MarshaledG4HitsCollection ( )
inline

Definition at line 52 of file ParN02/include/MarshaledG4THitsCollection.h.

52  {
53  //if(msh_isUnmarshalDone && this->param != NULL) {
54  //delete this->param;
55  //}
56 }
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( G4HitsCollection objptr)
inline
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( void buf,
char  isUnmarshaling = 'u' 
)
inline
MarshaledG4HitsCollection::~MarshaledG4HitsCollection ( )
inline

Definition at line 62 of file ParN04/AnnotatedFiles/MarshaledG4THitsCollection.h.

62  {
63  //if(msh_isUnmarshalDone && this->param != NULL) {
64  //delete this->param;
65  //}
66 }
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( G4HitsCollection objptr)
inline
MarshaledG4HitsCollection::MarshaledG4HitsCollection ( void buf,
char  chIsUnmarshaling = 'u' 
)
inline

Definition at line 53 of file ParN04/include/MarshaledG4THitsCollection.h.

References MarshaledObj::msh_isUnmarshalDone.

54 : MarshaledObj(buf, chIsUnmarshaling) {
55  msh_isUnmarshalDone = false;
56 }
MarshaledG4HitsCollection::~MarshaledG4HitsCollection ( )
inline

Definition at line 58 of file ParN04/include/MarshaledG4THitsCollection.h.

58  {
59  //if(msh_isUnmarshalDone && this->param != NULL) {
60  //delete this->param;
61  //}
62 }

Member Function Documentation

void MarshaledG4HitsCollection::marshal1 ( )
inline

Definition at line 89 of file ParN02/include/MarshaledG4THitsCollection.h.

References MarshaledObj::EXTEND_BUFFER(), MarshaledObj::getBuffer(), MarshaledObj::getBufferSize(), int(), MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MarshaledObj::msh_cursor, MarshaledObj::msh_field_begin, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, MarshaledObj::msh_size, MarshaledObj::msh_typechoice, and param.

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

Definition at line 91 of file ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MarshaledObj::EXTEND_BUFFER(), MarshaledObj::getBuffer(), MarshaledObj::getBufferSize(), int(), MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MarshaledObj::msh_cursor, MarshaledObj::msh_field_begin, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, MarshaledObj::msh_size, MarshaledObj::msh_typechoice, and param.

Referenced by MarshaledG4HitsCollection().

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 = ((G4THitsCollection<ExN02TrackerHit>*)param)->entries();
115  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
116  copy_off += sizeof(int);
117  for(int index=0;index<elementNum;index++){
118  ExN02TrackerHit* anElement;
119  anElement = (*((G4THitsCollection<ExN02TrackerHit>*)param))[index];
120  MarshaledExN02TrackerHit 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 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
#define MSH_SET_TYPECHOICE(X)
void EXTEND_BUFFER(int size)
#define MSH_SET_TOTALSIZE(X)
void MarshaledG4HitsCollection::marshal1 ( )
inline

Definition at line 95 of file ParN04/include/MarshaledG4THitsCollection.h.

References MarshaledObj::EXTEND_BUFFER(), MarshaledObj::getBuffer(), MarshaledObj::getBufferSize(), int(), MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MarshaledObj::msh_cursor, MarshaledObj::msh_field_begin, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, MarshaledObj::msh_size, MarshaledObj::msh_typechoice, and param.

95  {
96  //declare field_size to be the size of this field
97  int msh_currentSize = 0;
98  if (isUnmarshaling())
99  throw "Tried to marshal in obj marked isUnmarshaling == true";
100 
101  //Copy the sizespec into msh_currentSize here:
102  {
103 
104  }
105 
106  //Increase the size of buffer if needed
107  EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int));
108  // 4 bytes for the total size of field, 4 bytes for the number of
109  // elements in the array (in the case of array marshaling)
110  //Mark the beginning position for this field, will write the total size
111  //of this field here later
113 
114  //Advance cursor of distance = sizeof(int)
115  msh_cursor += sizeof(int);
116 
117  //Now just copy "get" functions here
118  {
119  int copy_off = 0;
120  int elementNum;
121 
122  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
123  elementNum = ((G4THitsCollection<ExN04CalorimeterHit>*)param)->entries();
124  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
125  elementNum = ((G4THitsCollection<ExN04MuonHit>*)param)->entries();
126  else
127  elementNum = ((G4THitsCollection<ExN04TrackerHit>*)param)->entries();
128 
129  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
130  copy_off += sizeof(int);
131  for(int index=0;index<elementNum;index++){
132  if(0){}
133  else if((dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL) ){
134  void* anElement;
135 
136  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
137  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
138  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
139  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
140  else
141  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
142 
144  EXTEND_BUFFER(marEle.getBufferSize());
145  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
146  copy_off += marEle.getBufferSize();
147  }
148  else if( (dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL) ){
149  void* anElement;
150 
151  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
152  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
153  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
154  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
155  else
156  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
157 
158  MarshaledExN04MuonHit marEle((ExN04MuonHit* )anElement);
159  EXTEND_BUFFER(marEle.getBufferSize());
160  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
161  copy_off += marEle.getBufferSize();
162  }
163  else if( true ){
164  void* anElement;
165 
166  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
167  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
168  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
169  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
170  else
171  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
172 
173  MarshaledExN04TrackerHit marEle((ExN04TrackerHit*)anElement);
174  EXTEND_BUFFER(marEle.getBufferSize());
175  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
176  copy_off += marEle.getBufferSize();
177  }
178  }
179  msh_currentSize = copy_off;
180 
181  }
182  //Now advance the cursor
183  msh_cursor += msh_currentSize;
184  //Now set the size of this field
185  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
186  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
187  memcpy(msh_field_begin, &tmp, sizeof(int));
188 
189  //Now set msh_size
192 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
#define MSH_SET_TYPECHOICE(X)
void EXTEND_BUFFER(int size)
#define MSH_SET_TOTALSIZE(X)
void MarshaledG4HitsCollection::marshal1 ( )
inline

Definition at line 99 of file ParN04/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MarshaledObj::EXTEND_BUFFER(), MarshaledObj::getBuffer(), MarshaledObj::getBufferSize(), int(), MarshaledObj::isUnmarshaling(), MarshaledObj::msh_buffer, MarshaledObj::msh_cursor, MarshaledObj::msh_field_begin, MSH_SET_TOTALSIZE, MSH_SET_TYPECHOICE, MarshaledObj::msh_size, MarshaledObj::msh_typechoice, and param.

99  {
100  //declare field_size to be the size of this field
101  int msh_currentSize = 0;
102  if (isUnmarshaling())
103  throw "Tried to marshal in obj marked isUnmarshaling == true";
104 
105  //Copy the sizespec into msh_currentSize here:
106  {
107 
108  }
109 
110  //Increase the size of buffer if needed
111  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)
112  //Mark the beginning position for this field, will write the total size of this field here later
114 
115  //Advance cursor of distance = sizeof(int)
116  msh_cursor += sizeof(int);
117 
118  //Now just copy "get" functions here
119  {
120  int copy_off = 0;
121  int elementNum;
122 
123  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
124  elementNum = ((G4THitsCollection<ExN04CalorimeterHit>*)param)->entries();
125  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
126  elementNum = ((G4THitsCollection<ExN04MuonHit>*)param)->entries();
127  else
128  elementNum = ((G4THitsCollection<ExN04TrackerHit>*)param)->entries();
129 
130  memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
131  copy_off += sizeof(int);
132  for(int index=0;index<elementNum;index++){
133  if(0){}
134  else if((dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL) ){
135  void* anElement;
136 
137  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
138  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
139  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
140  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
141  else
142  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
143 
145  EXTEND_BUFFER(marEle.getBufferSize());
146  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
147  copy_off += marEle.getBufferSize();
148  }
149  else if( (dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL) ){
150  void* anElement;
151 
152  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
153  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
154  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
155  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
156  else
157  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
158 
159  MarshaledExN04MuonHit marEle((ExN04MuonHit* )anElement);
160  EXTEND_BUFFER(marEle.getBufferSize());
161  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
162  copy_off += marEle.getBufferSize();
163  }
164  else if( true ){
165  void* anElement;
166 
167  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
168  anElement = (*((G4THitsCollection<ExN04CalorimeterHit>*)param))[index];
169  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
170  anElement = (*((G4THitsCollection<ExN04MuonHit>*)param))[index];
171  else
172  anElement = (*((G4THitsCollection<ExN04TrackerHit>*)param))[index];
173 
174  MarshaledExN04TrackerHit marEle((ExN04TrackerHit*)anElement);
175  EXTEND_BUFFER(marEle.getBufferSize());
176  memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
177  copy_off += marEle.getBufferSize();
178  }
179  }
180  msh_currentSize = copy_off;
181 
182  }
183  //Now advance the cursor
184  msh_cursor += msh_currentSize;
185  //Now set the size of this field
186  int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
187  tmp = (msh_cursor-msh_field_begin) - sizeof(int);
188  memcpy(msh_field_begin, &tmp, sizeof(int));
189 
190  //Now set msh_size
193 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
#define MSH_SET_TYPECHOICE(X)
void EXTEND_BUFFER(int size)
#define MSH_SET_TOTALSIZE(X)
G4HitsCollection* MarshaledG4HitsCollection::unmarshal ( )
inline

Definition at line 58 of file ParN02/include/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

58  {
59  //We don't want to unmarshal the buffer is empty.
60  if(msh_size <= MSH_HEADER_SIZE) {
61  //This is buggy, we can't always assume that
62  //obj == NULL <==> List is empty.
63  return NULL;
64  } else {
65  {
66  param = new G4HitsCollection();
67  }
69  this->msh_isUnmarshalDone = true;
70  unmarshal1();
71  return this->param;
72  }
73 }
#define MSH_HEADER_SIZE
G4HitsCollection* MarshaledG4HitsCollection::unmarshal ( )
inline

Definition at line 60 of file ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

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 G4HitsCollection();
69  }
71  this->msh_isUnmarshalDone = true;
72  unmarshal1();
73  return this->param;
74  }
75 }
#define MSH_HEADER_SIZE
G4HitsCollection* MarshaledG4HitsCollection::unmarshal ( )
inline

Definition at line 64 of file ParN04/include/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

64  {
65  //We don't want to unmarshal the buffer is empty.
66  if(msh_size <= MSH_HEADER_SIZE) {
67  //This is buggy, we can't always assume that
68  //obj == NULL <==> List is empty.
69  return NULL;
70  } else {
71  {
72  param = new G4HitsCollection();
73  }
75  this->msh_isUnmarshalDone = true;
76  unmarshal1();
77  return this->param;
78  }
79 }
#define MSH_HEADER_SIZE
G4HitsCollection* MarshaledG4HitsCollection::unmarshal ( )
inline

Definition at line 68 of file ParN04/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

68  {
69  //We don't want to unmarshal the buffer is empty.
70  if(msh_size <= MSH_HEADER_SIZE) {
71  //This is buggy, we can't always assume that
72  //obj == NULL <==> List is empty.
73  return NULL;
74  } else {
75  {
76  param = new G4HitsCollection();
77  }
79  this->msh_isUnmarshalDone = true;
80  unmarshal1();
81  return this->param;
82  }
83 }
#define MSH_HEADER_SIZE
void MarshaledG4HitsCollection::unmarshal1 ( )
inline

Definition at line 140 of file ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MarshaledObj::getBufferSize(), int(), MarshaledObj::msh_cursor, param, and MarshaledExN02TrackerHit::unmarshal().

Referenced by unmarshal(), and unmarshalTo().

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  MarshaledExN02TrackerHit marEle(msh_cursor+copy_off);
154  ExN02TrackerHit* anElement = (ExN02TrackerHit* )marEle.unmarshal();
155  copy_off += marEle.getBufferSize();
156  ((G4THitsCollection<ExN02TrackerHit>*)param)->insert((ExN02TrackerHit*)anElement);
157  }
158 
159  }
160  msh_cursor += msh_currentSize;
161 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void MarshaledG4HitsCollection::unmarshal1 ( )
inline

Definition at line 141 of file ParN02/include/MarshaledG4THitsCollection.h.

References MarshaledObj::getBufferSize(), int(), MarshaledObj::msh_cursor, param, and MarshaledExN02TrackerHit::unmarshal().

141  {
142  //declare currentSize to be the size of this field
143  int msh_currentSize = 0;
144  //copy the size of the current field into currentSize
145  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
146  msh_cursor += sizeof(int);
147  //Now copy the setspec here
148  {
149  int copy_off = 0;
150  int elementNum;
151  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
152  copy_off += sizeof(int);
153  for(int index=0;index<elementNum;index++){
154  MarshaledExN02TrackerHit marEle(msh_cursor+copy_off);
155  ExN02TrackerHit* anElement = (ExN02TrackerHit* )marEle.unmarshal();
156  copy_off += marEle.getBufferSize();
157  ((G4THitsCollection<ExN02TrackerHit>*)param)->insert((ExN02TrackerHit*)anElement);
158  }
159 
160  }
161  msh_cursor += msh_currentSize;
162 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void MarshaledG4HitsCollection::unmarshal1 ( )
inline

Definition at line 194 of file ParN04/include/MarshaledG4THitsCollection.h.

References MarshaledObj::getBufferSize(), int(), MarshaledObj::msh_cursor, param, MarshaledExN04MuonHit::unmarshal(), MarshaledExN04TrackerHit::unmarshal(), and MarshaledExN04CalorimeterHit::unmarshal().

194  {
195  //declare currentSize to be the size of this field
196  int msh_currentSize = 0;
197  //copy the size of the current field into currentSize
198  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
199  msh_cursor += sizeof(int);
200  //Now copy the setspec here
201  {
202  if(0){}
203  else if((dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL) ){
204  int copy_off = 0;
205  int elementNum;
206  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
207  copy_off += sizeof(int);
208  for(int index=0;index<elementNum;index++){
209  MarshaledExN04CalorimeterHit marEle(msh_cursor+copy_off);
210  ExN04CalorimeterHit* anElement = (ExN04CalorimeterHit* )marEle.unmarshal();
211  copy_off += marEle.getBufferSize();
212 
213  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
215  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
216  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
217  else
218  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
219 
220  }
221  }
222  else if( (dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL) ){
223  int copy_off = 0;
224  int elementNum;
225  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
226  copy_off += sizeof(int);
227  for(int index=0;index<elementNum;index++){
228  MarshaledExN04MuonHit marEle(msh_cursor+copy_off);
229  ExN04MuonHit* anElement = (ExN04MuonHit* )marEle.unmarshal();
230  copy_off += marEle.getBufferSize();
231 
232  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
233  ((G4THitsCollection<ExN04CalorimeterHit>*)param)->insert((ExN04CalorimeterHit*)anElement);
234  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
235  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
236  else
237  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
238 
239  }
240  }
241  else if( true ){
242  int copy_off = 0;
243  int elementNum;
244  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
245  copy_off += sizeof(int);
246  for(int index=0;index<elementNum;index++){
247  MarshaledExN04TrackerHit marEle(msh_cursor+copy_off);
248  ExN04TrackerHit* anElement = (ExN04TrackerHit*)marEle.unmarshal();
249  copy_off += marEle.getBufferSize();
250 
251  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
252  ((G4THitsCollection<ExN04CalorimeterHit>*)param)->insert((ExN04CalorimeterHit*)anElement);
253  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
254  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
255  else
256  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
257 
258  }
259  }
260 
261  }
262  msh_cursor += msh_currentSize;
263 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void MarshaledG4HitsCollection::unmarshal1 ( )
inline

Definition at line 195 of file ParN04/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MarshaledObj::getBufferSize(), int(), MarshaledObj::msh_cursor, param, MarshaledExN04MuonHit::unmarshal(), MarshaledExN04TrackerHit::unmarshal(), and MarshaledExN04CalorimeterHit::unmarshal().

195  {
196  //declare currentSize to be the size of this field
197  int msh_currentSize = 0;
198  //copy the size of the current field into currentSize
199  memcpy(&msh_currentSize, msh_cursor, sizeof(int));
200  msh_cursor += sizeof(int);
201  //Now copy the setspec here
202  {
203  if(0){}
204  else if((dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL) ){
205  int copy_off = 0;
206  int elementNum;
207  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
208  copy_off += sizeof(int);
209  for(int index=0;index<elementNum;index++){
210  MarshaledExN04CalorimeterHit marEle(msh_cursor+copy_off);
211  ExN04CalorimeterHit* anElement = (ExN04CalorimeterHit* )marEle.unmarshal();
212  copy_off += marEle.getBufferSize();
213 
214  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
216  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
217  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
218  else
219  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
220 
221  }
222  }
223  else if( (dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL) ){
224  int copy_off = 0;
225  int elementNum;
226  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
227  copy_off += sizeof(int);
228  for(int index=0;index<elementNum;index++){
229  MarshaledExN04MuonHit marEle(msh_cursor+copy_off);
230  ExN04MuonHit* anElement = (ExN04MuonHit* )marEle.unmarshal();
231  copy_off += marEle.getBufferSize();
232 
233  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
234  ((G4THitsCollection<ExN04CalorimeterHit>*)param)->insert((ExN04CalorimeterHit*)anElement);
235  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
236  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
237  else
238  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
239 
240  }
241  }
242  else if( true ){
243  int copy_off = 0;
244  int elementNum;
245  memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
246  copy_off += sizeof(int);
247  for(int index=0;index<elementNum;index++){
248  MarshaledExN04TrackerHit marEle(msh_cursor+copy_off);
249  ExN04TrackerHit* anElement = (ExN04TrackerHit*)marEle.unmarshal();
250  copy_off += marEle.getBufferSize();
251 
252  if(dynamic_cast<G4THitsCollection<ExN04CalorimeterHit>*>(param)!=NULL)
253  ((G4THitsCollection<ExN04CalorimeterHit>*)param)->insert((ExN04CalorimeterHit*)anElement);
254  else if(dynamic_cast<G4THitsCollection<ExN04MuonHit>*>(param)!=NULL)
255  ((G4THitsCollection<ExN04MuonHit>*)param)->insert((ExN04MuonHit*)anElement);
256  else
257  ((G4THitsCollection<ExN04TrackerHit>*)param)->insert((ExN04TrackerHit*)anElement);
258 
259  }
260  }
261 
262  }
263  msh_cursor += msh_currentSize;
264 }
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void MarshaledG4HitsCollection::unmarshalTo ( G4HitsCollection obj)
inline

Definition at line 75 of file ParN02/include/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

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  }
87 }
#define MSH_HEADER_SIZE
void MarshaledG4HitsCollection::unmarshalTo ( G4HitsCollection obj)
inline

Definition at line 77 of file ParN02/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

Referenced by MarshaledG4THitsCollection< T >::unmarshal1().

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 }
#define MSH_HEADER_SIZE
void MarshaledG4HitsCollection::unmarshalTo ( G4HitsCollection obj)
inline

Definition at line 81 of file ParN04/include/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

81  {
82  //We don't want to unmarshal the buffer is empty.
83  if(msh_size <= MSH_HEADER_SIZE) {
84  //This is buggy, we can't always assume that
85  //obj == NULL <==> List is empty.
86  return;
87  } else {
88  this->param = obj;
90  this->msh_isUnmarshalDone = true;
91  unmarshal1();
92  }
93 }
#define MSH_HEADER_SIZE
void MarshaledG4HitsCollection::unmarshalTo ( G4HitsCollection obj)
inline

Definition at line 85 of file ParN04/AnnotatedFiles/MarshaledG4THitsCollection.h.

References MSH_HEADER_SIZE, MarshaledObj::msh_isUnmarshalDone, MarshaledObj::msh_size, param, Shadowed_param, and unmarshal1().

85  {
86  //We don't want to unmarshal the buffer is empty.
87  if(msh_size <= MSH_HEADER_SIZE) {
88  //This is buggy, we can't always assume that
89  //obj == NULL <==> List is empty.
90  return;
91  } else {
92  this->param = obj;
94  this->msh_isUnmarshalDone = true;
95  unmarshal1();
96  }
97 }
#define MSH_HEADER_SIZE

Field Documentation

G4HitsCollection * MarshaledG4HitsCollection::param
ShadowedMarshaledG4HitsCollection * MarshaledG4HitsCollection::Shadowed_param

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