#include #include #include #include "TTree.h" #include "TApplication.h" #include "TFile.h" using namespace std; int main(int argc, char **argv) { // TApplication* theApp = new TApplication("App", &argc, argv); TFile* outfile = new TFile("markOutput.root", "RECREATE"); TTree* tree = new TTree("mark","mark"); TTree* tree2 = new TTree("mark2","mark2"); int number; int another; //int number2; //int another2; tree->Branch("number", &number, "number/I", 32000); tree->Branch("another", &another, "another/I", 32000); tree2->Branch("number", &number, "number/I", 32000); tree2->Branch("another", &another, "another/I", 32000); for (int i=0;i<10;i++) { number = i; another = 2*i; tree->Fill(); tree2->Fill(); } // tree->BuildIndex("number","another"); // tree2->BuildIndex("number","another"); tree->Write(); tree2->Write(); // theApp->Run(); return 0; }