%{ #include //MSH_include_begin #include "G4SDManager.hh" #include "G4THitsCollection.hh" #include "ExN02TrackerHit.hh" #include "MarshaledExN02TrackerHit.h" #include "MarshaledG4THitsCollection.h" #include "MarshaledG4VHitsCollection.h" //MSH_include_end %} // This file is generated automatically from G4HCofThisEvent.hh . It is an // intermediate file useful for debugging, but otherwise may be deleted. marshaling class MarshaledG4HCofThisEvent (G4HCofThisEvent* param) { std::vector * HC; //FIELDMARSHAL: { int copy_off = 0; int $ELE_COUNT; $ELE_COUNT = $THIS->GetNumberOfCollections(); memcpy( $$+copy_off, &$ELE_COUNT,sizeof(int)); copy_off += sizeof(int); for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){ G4VHitsCollection* $ELEMENT; $ELEMENT = $THIS->GetHC($ELE_INDEX); MarshaledG4VHitsCollection marEle($ELEMENT); EXTEND_BUFFER(marEle.getBufferSize()); memcpy($$+copy_off, marEle.getBuffer(), marEle.getBufferSize()); copy_off += marEle.getBufferSize(); } $SIZE = copy_off; } //FIELDUNMARSHAL: { int copy_off = 0; int $ELE_COUNT; memcpy(&$ELE_COUNT, $$+copy_off, sizeof(int)); copy_off += sizeof(int); for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){ MarshaledG4VHitsCollection marEle($$+copy_off); G4VHitsCollection* $ELEMENT = (G4VHitsCollection*)marEle.unmarshal(); copy_off += marEle.getBufferSize(); $THIS->AddHitsCollection($ELE_INDEX, $ELEMENT); } } //FIELDSIZE: { } unmarshaling constructor { $THIS = new G4HCofThisEvent(); } }