W pliku MyRun.cc (zmiany kolorem czerwonym)
............................................................
#include "G4SDManager.hh"
#include "G4THitsMap.hh"
MyRun::~MyRun()
{}
void MyRun::RecordEvent(const G4Event* evt)
{
numberOfEvent++;
G4HCofThisEvent* hce
=
evt->GetHCofThisEvent();
G4THitsMap<double>*
hitsMap = (G4THitsMap<double>*)
(hce->GetHC(fMapId));
G4cout <<
"MyLog:
number of entries " << hitsMap->entries() <<
G4endl;
std::map<int,double*>::iterator iter;
iter =
hitsMap->GetMap()->begin();
while( iter !=
hitsMap->GetMap()->end() )
{
G4cout<<
"MyLog: value of HitsMap:
"<<
*iter->second << " index of value: "<<
iter->first
<< G4endl;
iter++;
}
/**
..............................................................................