49 #include "AIDA/IHistogram1D.h"
50 #include "AIDA/IHistogram2D.h"
52 #include "AIDA/IManagedObject.h"
53 #include "AIDA/IAnalysisFactory.h"
54 #include "AIDA/IHistogramFactory.h"
55 #include "AIDA/ITupleFactory.h"
56 #include "AIDA/ITreeFactory.h"
57 #include "AIDA/ITree.h"
58 #include "AIDA/ITuple.h"
60 UltraAnalysisManager* UltraAnalysisManager::instance = 0;
62 UltraAnalysisManager::UltraAnalysisManager() :
63 aFact(0), theTree(0), histFact(0),
h1(0),
h2(0)
67 aFact = AIDA_createAnalysisFactory();
69 AIDA::ITreeFactory* treeFact = aFact->createTreeFactory();
76 std::string fileName =
"ultra.aida";
77 theTree = treeFact->create(fileName,
"xml",
false,
true);
81 histFact = aFact->createHistogramFactory( *theTree );
85 UltraAnalysisManager::~UltraAnalysisManager()
98 UltraAnalysisManager* UltraAnalysisManager::getInstance()
100 if (instance == 0) instance =
new UltraAnalysisManager;
104 void UltraAnalysisManager::book()
107 h1 = histFact->createHistogram1D(
"10",
"Optical photons energy (eV)",
110 h2 = histFact->createHistogram1D(
"20",
"Number of Detected Photons",
117 if(i == 1)
h1->fill(f);
118 if(i == 2)
h2->fill(f);
122 void UltraAnalysisManager::finish()