Example #1
0
File: main.cpp Project: pkxpp/Study
int main()
{
	//CTree t();
	TestTree();	

	return 0;	
}
Example #2
0
void RunTest(const char* name, int numentries, int BufferSize) {
   char title[200];
   sprintf(title, "%d events, 10 branches, 10 floats in brunch, Basket size = %d", numentries, BufferSize*sizeof(Float_t)*10);

   TH1D* histoRes = new TH1D(name, title, 10, 0.5, 10.5);
   histoRes->GetXaxis()->SetTitle("Number of active branches");
   histoRes->GetYaxis()->SetTitle("Real time (s)");
   histoRes->SetDirectory(0);
   histoRes->SetStats(kFALSE);
   ProduceTree("TreeFile.root","TestTree", numentries, 0, 10, 10, BufferSize);

   Float_t RealTime, CpuTime;
    
   for(int ActiveBranches=1;ActiveBranches<=10;ActiveBranches++) {
      ReadDummyTree();
      cout << "Buffer size = " << BufferSize*sizeof(Float_t)*10 << " ActiveBranches = " << ActiveBranches << endl;
      MakeDelay(10);
      TestTree("TreeFile.root","TestTree", 10, 10, ActiveBranches, &RealTime, &CpuTime);
      histoRes->SetBinContent(ActiveBranches, RealTime);
   } 
   
   TCanvas* c1 = new TCanvas(TString(name)+"_canvas", title);
   histoRes->Draw();
   c1->SaveAs(TString(name)+".gif");
}
Example #3
0
int main()
{
	TestTree();
	TestGrandfather();
	TestFarthest();
	TestIsComplete();
	TestTransform();

	return 0;
}
Example #4
0
void DoDummy() {
   const int RAMSIZE = 2048;
   
   // file size is double of memory size
  int numentries = RAMSIZE * 2 * 2750;  

  cout << "Clean up disk cash ..." << endl;
  // ProduceTree("DummyFile.root","DummyTree", numentries, 0, 10, 10, 10000);
  TestTree("DummyFile.root","DummyTree", 10, 10, 10, 0, 0);
}
Example #5
0
void ReadDummyTree() {
   cout << "Clean up disk cash" << endl;
   TestTree("DummyFile.root","DummyTree", 10, 10, 10, 0, 0);
}
Example #6
0
int main()
{
	TestTree();
	system("pause");
	return 0;
}
Example #7
0
 void UnitTest_BFS::Run()
 {
     TestChain();
     TestTree();
 }