Files
geant4/examples/extended/runAndEvent/RE02/include/RE02Run.hh
T
2016-06-09 14:36:02 +02:00

82 lines
3.2 KiB
C++

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: RE02Run.hh,v 1.1 2005/11/24 01:44:18 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//---------------------------------------------------------------------
// (Purpose)
// Example implementation for multi-functional-detector and
// primitive scorer.
// This RE02Run class has collections which accumulate
// a event information into a run information.
//
//---------------------------------------------------------------------
#ifndef RE02Run_h
#define RE02Run_h 1
#include "G4Run.hh"
#include "G4Event.hh"
#include "G4THitsMap.hh"
#include <vector>
//
class RE02Run : public G4Run {
public:
// constructor and destructor.
// vector of multifunctionaldetector name has to given to constructor.
RE02Run(const std::vector<G4String> mfdName);
virtual ~RE02Run();
public:
// virtual method from G4Run.
// The method is overriden in this class for scoring.
virtual void RecordEvent(const G4Event*);
// Access methods for scoring information.
// - Number of HitsMap for this RUN.
// This is equal to number of collections.
G4int GetNumberOfHitsMap() const {return theRunMap.size();}
// - Get HitsMap of this RUN.
// by sequential number, by multifucntional name and collection name,
// and by collection name with full path.
G4THitsMap<G4double>* GetHitsMap(G4int i){return theRunMap[i];}
G4THitsMap<G4double>* GetHitsMap(const G4String& detName,
const G4String& colName);
G4THitsMap<G4double>* GetHitsMap(const G4String& fullName);
// - Dump All HitsMap of this RUN.
// This method calls G4THisMap::PrintAll() for individual HitsMap.
void DumpAllScorer();
private:
std::vector<G4String> theCollName;
std::vector<G4int> theCollID;
std::vector<G4THitsMap<G4double>*> theRunMap;
};
//
#endif