Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -1,121 +0,0 @@
//
// ********************************************************************
// * 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: G4AnalysisManager.cc,v 1.10.4.1 2001/06/28 19:07:48 gunter Exp $
// GEANT4 tag $Name: $
//
// Guy Barrand 20th Mai 2000
//
// Class description
//
// This class is a plug-in for various analysis systems
// that follow the AIDA/Histogramming conventions.
//
#ifdef G4ANALYSIS_BUILD
#include "globals.hh"
#include "G4ios.hh"
#include "G4VAnalysisSystem.hh"
#include "G4AnalysisManager.hh"
G4AnalysisManager::G4AnalysisManager(){}
G4AnalysisManager::~G4AnalysisManager(){
int number = fSystems.size();
for(int count=0;count<number;count++) {
delete fSystems[count];
}
}
G4bool G4AnalysisManager::RegisterAnalysisSystem(
G4VAnalysisSystem* aSystem
){
fSystems.push_back(aSystem);
return true;
}
G4VAnalysisSystem* G4AnalysisManager::FindSystem(const G4String& aName) {
int number = fSystems.size();
for(int count=0;count<number;count++) {
if(aName==fSystems[count]->GetName()) return fSystems[count];
}
return 0;
}
IHistogramFactory* G4AnalysisManager::GetHistogramFactory(
const G4String& aSystem
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->GetHistogramFactory();
}
void G4AnalysisManager::Store(IHistogram* aHistogram,const G4String& aSID){
if(!fCurrentSystem) return;
fCurrentSystem->Store(aHistogram,aSID);
}
void G4AnalysisManager::Plot(IHistogram* aHistogram){
if(!fCurrentSystem) return;
fCurrentSystem->Plot(aHistogram);
}
// Non AIDA things :
#ifdef G4ANALYSIS_NON_AIDA
ITuple* G4AnalysisManager::CreateTuple(
const G4String& aSystem
,const G4String& aStorage
,const G4String& aSID
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->CreateTuple(aStorage,aSID);
}
ICloudFactory* G4AnalysisManager::GetCloudFactory(
const G4String& aSystem
){
G4VAnalysisSystem* analysisSystem = FindSystem(aSystem);
if(!analysisSystem) {
G4cerr << "G4AnalysisManager : " << G4std::endl;
G4cerr << " " << aSystem << " unknown analysis system." << G4std::endl;
return 0;
}
// Set it as current system.
fCurrentSystem = analysisSystem;
return analysisSystem->GetCloudFactory();
}
void G4AnalysisManager::Plot(ICloud* aCloud){
if(!fCurrentSystem) return;
fCurrentSystem->Plot(aCloud);
}
#endif
#endif