00001 #ifndef BDSANALYSISMANAGER_H 00002 #define BDSANALYSISMANAGER_H 00003 00004 #include "BDSHistogram.hh" 00005 #include "globals.hh" // geant4 globals / types 00006 #include <vector> 00007 00022 class BDSAnalysisManager 00023 { 00024 public: 00026 static BDSAnalysisManager* Instance(); 00027 ~BDSAnalysisManager(); 00028 00030 G4int Create1DHistogram(G4String name, 00031 G4String title, 00032 G4int nbins, 00033 G4double xmin, 00034 G4double xmax); 00035 00036 G4int Create1DHistogram(G4String name, 00037 G4String title, 00038 std::vector<double>& edges); 00039 00041 BDSHistogram1D* GetHistogram(G4int index); 00042 00044 void Fill1DHistogram(G4int histoIndex, G4double value, G4double weight=1.0); 00045 00046 00047 00048 private: 00050 BDSAnalysisManager(); 00051 00053 void CheckHistogramIndex(G4int index); 00054 00055 static BDSAnalysisManager* _instance; 00056 00057 std::vector<BDSHistogram1D*> histograms1d; 00058 00059 }; 00060 00061 #endif 00062 00063