Go to the documentation of this file.00001 void test() {
00002
00003 gSystem->Load("libGo4ObjMng.so");
00004
00005 new TH1I("testhisto1","histo title", 100, 1., 100.);
00006 new TH1I("testhisto2","histo title", 100, 1., 100.);
00007 new TH1I("testhisto3","histo title", 100, 1., 100.);
00008
00009 TGo4ObjectManager objm("ObjManager","Go4 object manager");
00010
00011 TNamed* name1 = new TNamed("name1","name1 title");
00012 TNamed* name2 = new TNamed("name2","name2 title");
00013 TNamed* name3 = new TNamed("name3","name3 title");
00014
00015 objm.Add("folder1/folder2", name1);
00016 objm.Add("folder1/folder5", name2);
00017 objm.Add("folder3", name3);
00018
00019 objm.AddLink("folder1/folder2/name1","linksfolder");
00020 objm.AddLink("folder1/folder5/name2","linksfolder");
00021 objm.AddLink("folder3/name3","linksfolder");
00022
00023 objm.AddFile("", "hist.root");
00024 objm.AddFile("", "../asf2.root");
00025 objm.AddROOTFolders("");
00026 objm.AddFile("", "../tree.root");
00027
00028 objm.Print("");
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 std::cout << "Press any key" << std::endl;
00082 char c = getchar();
00083
00084 gBenchmark->Reset();
00085 gBenchmark->Start("TestOM");
00086
00087 Int_t numiter = 0;
00088
00089 for(int n=0;n<100000;n++)
00090 numiter += objm.IterateSlots();
00091
00092 gBenchmark->Stop("TestOM");
00093
00094 gBenchmark->Show("TestOM");
00095
00096 double RealTime = gBenchmark->GetRealTime("TestOM");
00097
00098
00099 std::cout << "Num iterations = " << numiter << std::endl;
00100 std::cout << "Rate/sec = " << numiter/RealTime << std::endl;
00101 }