Exemplo n.º 1
0
void arrow (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Int_t ls)
{
   TArrow *arr = new TArrow(x1,y1,x2,y2,0.025,"|>");
   arr->SetFillColor(1);
   arr->SetFillStyle(1001);
   arr->SetLineStyle(ls);
   arr->SetAngle(19);
   arr->Draw();
}
Exemplo n.º 2
0
void draw_synapse(Double_t cx1, Double_t cy1, Double_t cx2, Double_t cy2,
                  Double_t  rad1, Double_t rad2, Double_t weightNormed)
{
   const Double_t TIP_SIZE   = 0.01;
   const Double_t MAX_WEIGHT = 8;
   const Double_t MAX_COLOR  = 100;  // red
   const Double_t MIN_COLOR  = 60;   // blue

   if (weightNormed == 0) return;

   //   gStyle->SetPalette(100, NULL);

   TArrow *arrow = new TArrow(cx1+rad1, cy1, cx2-rad2, cy2, TIP_SIZE, ">");
   arrow->SetFillColor(1);
   arrow->SetFillStyle(1001);
   arrow->SetLineWidth((Int_t)(TMath::Abs(weightNormed)*MAX_WEIGHT+0.5));
   arrow->SetLineColor((Int_t)((weightNormed+1.0)/2.0*(MAX_COLOR-MIN_COLOR)+MIN_COLOR+0.5));
   arrow->Draw();
}
Exemplo n.º 3
0
Arquivo: event.C Projeto: Y--/root
void event(){
   TCanvas *c1 = new TCanvas("c1","ROOT Event description",700,500);
   c1->Range(0,0,14,15.5);
   TPaveText *event = new TPaveText(1,13,3,15);
   event->SetFillColor(11);
   event->Draw();
   event->AddText("Event");
   TLine *line = new TLine(1.1,13,1.1,1.5);
   line->SetLineWidth(2);
   line->Draw();
   line->DrawLine(1.3,13,1.3,3.5);
   line->DrawLine(1.5,13,1.5,5.5);
   line->DrawLine(1.7,13,1.7,7.5);
   line->DrawLine(1.9,13,1.9,9.5);
   line->DrawLine(2.1,13,2.1,11.5);
   TArrow *arrow = new TArrow(1.1,1.5,3.9,1.5,0.02,"|>");
   arrow->SetFillStyle(1001);
   arrow->SetFillColor(1);
   arrow->Draw();
   arrow->DrawArrow(1.3,3.5,3.9,3.5,0.02,"|>");
   arrow->DrawArrow(1.5,5.5,3.9,5.5,0.02,"|>");
   arrow->DrawArrow(1.7,7.5,3.9,7.5,0.02,"|>");
   arrow->DrawArrow(1.9,9.5,3.9,9.5,0.02,"|>");
   arrow->DrawArrow(2.1,11.5,3.9,11.5,0.02,"|>");
   TPaveText *p1 = new TPaveText(4,1,11,2);
   p1->SetTextAlign(12);
   p1->SetFillColor(42);
   p1->AddText("1 Mbyte");
   p1->Draw();
   TPaveText *p2 = new TPaveText(4,3,10,4);
   p2->SetTextAlign(12);
   p2->SetFillColor(42);
   p2->AddText("100 Kbytes");
   p2->Draw();
   TPaveText *p3 = new TPaveText(4,5,9,6);
   p3->SetTextAlign(12);
   p3->SetFillColor(42);
   p3->AddText("10 Kbytes");
   p3->Draw();
   TPaveText *p4 = new TPaveText(4,7,8,8);
   p4->SetTextAlign(12);
   p4->SetFillColor(42);
   p4->AddText("1 Kbytes");
   p4->Draw();
   TPaveText *p5 = new TPaveText(4,9,7,10);
   p5->SetTextAlign(12);
   p5->SetFillColor(42);
   p5->AddText("100 bytes");
   p5->Draw();
   TPaveText *p6 = new TPaveText(4,11,6,12);
   p6->SetTextAlign(12);
   p6->SetFillColor(42);
   p6->AddText("10 bytes");
   p6->Draw();
   TText *text = new TText();
   text->SetTextAlign(12);
   text->SetTextSize(0.04);
   text->SetTextFont(72);
   text->DrawText(6.2,11.5,"Header:Event_flag");
   text->DrawText(7.2,9.5,"Trigger_Info");
   text->DrawText(8.2,7.5,"Muon_Detector: TOF");
   text->DrawText(9.2,5.5,"Calorimeters");
   text->DrawText(10.2,3.5,"Forward_Detectors");
   text->DrawText(11.2,1.5,"TPCs");
}
Exemplo n.º 4
0
/// \file
/// \ingroup tutorial_tree
/// \notebook
/// Playing with a Tree containing variables of type character
/// \macro_image
/// \macro_code
/// \author Rene Brun
void cernstaff () {
   TString dir = gROOT->GetTutorialsDir();
   dir.Append("/tree/cernstaff.C");
   if (gSystem->AccessPathName("cernstaff.root")) {
      gROOT->SetMacroPath(dir);
      gROOT->ProcessLine(".x cernbuild.C");
   }
   TFile *f = new TFile("cernstaff.root");
   TTree *T = (TTree*)f->Get("T");
   TCanvas *c1 = new TCanvas("c1","CERN staff",10,10,1000,750);
   c1->Divide(2,2);
   // make table of number of people per Nation & Division
   c1->cd(1); gPad->SetGrid();
   T->Draw("Nation:Division>>hN","","text");
   TH2F *hN = (TH2F*)gDirectory->Get("hN");
   hN->SetMarkerSize(1.6);
   hN->SetStats(0);

   //make profile of Average cost per Nation
   c1->cd(2); gPad->SetGrid();
   gPad->SetLeftMargin(0.12);
   T->Draw("Cost:Nation>>hNation","","prof,goff");
   TH1F *hNation = (TH1F*)gDirectory->Get("hNation");
   hNation->SetTitle("Average Cost per Nation");
   hNation->LabelsOption(">"); //sort by decreasing bin contents
   hNation->SetMaximum(13000);
   hNation->SetMinimum(7000);
   hNation->SetStats(0);
   hNation->SetMarkerStyle(21);
   hNation->Draw();

   //make stacked plot of Nations versus Grade
   c1->cd(3); gPad->SetGrid();
   THStack *hGrades = new THStack("hGrades","Nations versus Grade");
   TH1F *hFR = new TH1F("hFR","FR",12,3,15);
    hFR->SetFillColor(kCyan);
    hGrades->Add(hFR);
    T->Draw("Grade>>hFR","Nation==\"FR\"");
   TH1F *hCH = new TH1F("hCH","CH",12,3,15);
    hCH->SetFillColor(kRed);
    hGrades->Add(hCH);
    T->Draw("Grade>>hCH","Nation==\"CH\"");
   TH1F *hIT = new TH1F("hIT","IT",12,3,15);
    hIT->SetFillColor(kGreen);
    hGrades->Add(hIT);
    T->Draw("Grade>>hIT","Nation==\"IT\"");
   TH1F *hDE = new TH1F("hDE","DE",12,3,15);
    hDE->SetFillColor(kYellow);
    hGrades->Add(hDE);
    T->Draw("Grade>>hDE","Nation==\"DE\"");
   TH1F *hGB = new TH1F("hGB","GB",12,3,15);
    hGB->SetFillColor(kBlue);
    hGrades->Add(hGB);
    T->Draw("Grade>>hGB","Nation==\"GB\"");
   hGrades->Draw();
   TLegend *legend = new TLegend(0.7,0.65,0.86,0.88);
   legend->AddEntry(hGB,"GB","f");
   legend->AddEntry(hDE,"DE","f");
   legend->AddEntry(hIT,"IT","f");
   legend->AddEntry(hCH,"CH","f");
   legend->AddEntry(hFR,"FR","f");
   legend->Draw();

   //make histogram of age distribution
   c1->cd(4); gPad->SetGrid();
   T->Draw("Age");
   T->Draw("Age>>hRetired","Age>(65-2002+1988)","same");
   TH1F *hRetired = (TH1F*)gDirectory->Get("hRetired");
   hRetired->SetFillColor(kRed);
   hRetired->SetFillStyle(3010);

   TArrow *arrow = new TArrow(32,169,55,74,0.03,"|>");
   arrow->SetFillColor(1);
   arrow->SetFillStyle(1001);
   arrow->Draw();

   TPaveText *pt = new TPaveText(0.12,0.8,0.55,0.88,"brNDC");
   pt->SetFillColor(kWhite);
   pt->AddText("People at CERN in 1988");
   pt->AddText("and retired in 2002");
   pt->Draw();

   c1->cd();
}
Exemplo n.º 5
0
void fildir(){


   TCanvas *c1 = new TCanvas("c1","ROOT FilDir description",700,900);
   c1->Range(1,1,19,24.5);
   TPaveLabel *title = new TPaveLabel(4,23,16,24.2,"ROOT File/Directory/Key description");
   title->SetFillColor(16);
   title->Draw();

   Int_t keycolor = 42;
   Int_t dircolor = 21;
   Int_t objcolor = 46;
   TPaveText *file = new TPaveText(2,19,6,22);
   file->SetFillColor(39);
   file->Draw();
   file->SetTextSize(0.04);
   file->AddText("TFile");
   file->AddText("Header");
   TArrow *arrow = new TArrow(6,20.5,17,20.5,0.02,"|>");
   arrow->SetFillStyle(1001);
   arrow->SetLineWidth(2);
   arrow->Draw();
   TPaveText *free1 = new TPaveText(8,20,11,21);
   free1->SetFillColor(18);
   free1->Draw();
   free1->AddText("First:Last");
   TPaveText *free2 = new TPaveText(12,20,15,21);
   free2->SetFillColor(18);
   free2->Draw();
   free2->AddText("First:Last");
   TText *tfree = new TText(6.2,21.2,"fFree = TList of free blocks");
   tfree->SetTextSize(0.02);
   tfree->Draw();
   TText *tkeys = new TText(5.2,18.2,"fKeys = TList of Keys");
   tkeys->SetTextSize(0.02);
   tkeys->Draw();
   TText *tmemory = new TText(3.2,15.2,"fListHead = TList of Objects in memory");
   tmemory->SetTextSize(0.02);
   tmemory->Draw();

   arrow->DrawArrow(5,17,17,17,0.02,"|>");
   TLine *line = new TLine(5,19,5,17);
   line->SetLineWidth(2);
   line->Draw();
   TPaveText *key0 = new TPaveText(7,16,10,18);
   key0->SetTextSize(0.04);
   key0->SetFillColor(keycolor);
   key0->AddText("Key 0");
   key0->Draw();
   TPaveText *key1 = new TPaveText(12,16,15,18);
   key1->SetTextSize(0.04);
   key1->SetFillColor(keycolor);
   key1->AddText("Key 1");
   key1->Draw();
   line->DrawLine(3,19,3,14);
   line->DrawLine(3,14,18,14);
   TPaveText *obj0 = new TPaveText(5,13,8,15);
   obj0->SetFillColor(objcolor);
   obj0->AddText("Object");
   obj0->Draw();
   TPaveText *dir1 = new TPaveText(10,13,13,15);
   dir1->SetFillColor(dircolor);
   dir1->AddText("SubDir");
   dir1->Draw();
   TPaveText *obj1 = new TPaveText(15,13,18,15);
   obj1->SetFillColor(objcolor);
   obj1->AddText("Object");
   obj1->Draw();
   arrow->DrawArrow(12,11,17,11,0.015,"|>");
   arrow->DrawArrow(11,9,17,9,0.015,"|>");
   line->DrawLine(12,13,12,11);
   line->DrawLine(11,13,11,9);
   TPaveText *key2 = new TPaveText(14,10.5,16,11.5);
   key2->SetFillColor(keycolor);
   key2->AddText("Key 0");
   key2->Draw();
   TPaveText *obj2 = new TPaveText(14,8.5,16,9.5);
   obj2->SetFillColor(objcolor);
   obj2->AddText("Object");
   obj2->Draw();
   TLine *ldot = new TLine(10,15,2,11);
   ldot->SetLineStyle(2);
   ldot->Draw();
   ldot->DrawLine(13,15,8,11);
   ldot->DrawLine(13,13,8,5);
   TPaveText *dirdata = new TPaveText(2,5,8,11);
   dirdata->SetTextAlign(12);
   dirdata->SetFillColor(dircolor);
   dirdata->Draw();
   dirdata->SetTextSize(0.015);
   dirdata->AddText("fModified: True if directory is modified");
   dirdata->AddText("fWritable: True if directory is writable");
   dirdata->AddText("fDatimeC: Creation Date/Time");
   dirdata->AddText("fDatimeM: Last mod Date/Time");
   dirdata->AddText("fNbytesKeys: Number of bytes of key");
   dirdata->AddText("fNbytesName : Header length up to title");
   dirdata->AddText("fSeekDir: Start of Directory on file");
   dirdata->AddText("fSeekParent: Start of Parent Directory");
   dirdata->AddText("fSeekKeys: Pointer to Keys record");
   TPaveText *keydata = new TPaveText(10,2,17,7);
   keydata->SetTextAlign(12);
   keydata->SetFillColor(keycolor);
   keydata->Draw();
   ldot->DrawLine(14,11.5,10,7);
   ldot->DrawLine(16,11.5,17,7);
   keydata->SetTextSize(0.015);
   keydata->AddText("fNbytes: Size of compressed Object");
   keydata->AddText("fObjLen: Size of uncompressed Object");
   keydata->AddText("fDatime: Date/Time when written to store");
   keydata->AddText("fKeylen: Number of bytes for the key");
   keydata->AddText("fCycle : Cycle number");
   keydata->AddText("fSeekKey: Pointer to Object on file");
   keydata->AddText("fSeekPdir: Pointer to directory on file");
   keydata->AddText("fClassName: 'TKey'");
   keydata->AddText("fName: Object name");
   keydata->AddText("fTitle: Object Title");
   c1->Print("fildir.png");
}
Exemplo n.º 6
0
void ClassTree()
{

   TCanvas *ClassTree = new TCanvas("ClassTree", "",186,135,594,449);
   ClassTree->SetHighLightColor(2);
   ClassTree->Range(0,5,20,20);
   ClassTree->SetFillColor(33);
   ClassTree->SetBorderSize(2);
   TLine *line = new TLine(0.5,18.15,4.4,18.15);
   line->Draw();
   line = new TLine(4.4,17.725,4.4,18.575);
   line->Draw();
   
   TPaveLabel *pl = new TPaveLabel(1,17.895,4.205,18.405,"TArray","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(0.5,16.875,1,16.875);
   line->Draw();
   
   pl = new TPaveLabel(1,16.62,4.205,17.13,"TAttFill","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(0.5,16.025,1,16.025);
   line->Draw();
   
   pl = new TPaveLabel(1,15.77,4.205,16.28,"TAttLine","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(0.5,15.175,1,15.175);
   line->Draw();
   
   pl = new TPaveLabel(1,14.92,4.205,15.43,"TAttMarker","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(0.5,9.775,4.4,9.775);
   line->Draw();
   line = new TLine(4.4,7.65,4.4,12.325);
   line->Draw();
   
   pl = new TPaveLabel(1,9.52,4.205,10.03,"TObject","br");
   pl->SetFillColor(5);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,12.325,4.9,12.325);
   line->Draw();
   
   pl = new TPaveLabel(4.9,12.07,8.105,12.58,"AliArrayI","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,11.475,4.9,11.475);
   line->Draw();
   
   pl = new TPaveLabel(4.9,11.22,8.105,11.73,"AliArrayS","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,18.575,4.9,18.575);
   line->Draw();
   
   pl = new TPaveLabel(4.9,18.32,8.105,18.83,"TArrayI","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,17.725,4.9,17.725);
   line->Draw();
   
   pl = new TPaveLabel(4.9,17.47,8.105,17.98,"TArrayS","br");
   pl->SetFillColor(30);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,10.2,8.3,10.2);
   line->Draw();
   
   pl = new TPaveLabel(4.9,9.945,8.105,10.455,"TCollection","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(4.4,7.65,8.3,7.65);
   line->Draw();
   line = new TLine(8.3,6.8,8.3,8.075);
   line->Draw();
   
   pl = new TPaveLabel(4.9,7.395,8.105,7.905,"TNamed","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(8.3,8.075,12.2,8.075);
   line->Draw();
   
   pl = new TPaveLabel(8.8,7.82,12.005,8.33,"AliSegmentArray","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(8.3,10.2,12.2,10.2);
   line->Draw();
   
   pl = new TPaveLabel(8.8,9.945,12.005,10.455,"TSeqCollection","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(8.3,6.8,8.8,6.8);
   line->Draw();
   
   pl = new TPaveLabel(8.8,6.545,12.005,7.055,"TTree","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(12.2,8.075,12.7,8.075);
   line->Draw();
   
   pl = new TPaveLabel(12.7,7.82,15.905,8.33,"AliTPCClustersArray","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(12.2,10.2,16.1,10.2);
   line->Draw();
   
   pl = new TPaveLabel(12.7,9.945,15.905,10.455,"TObjArray","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   line = new TLine(16.1,10.2,16.6,10.2);
   line->Draw();
   
   pl = new TPaveLabel(16.6,9.945,19.805,10.455,"TClonesArray","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.9);
   pl->Draw();
   
   pl = new TPaveLabel(0.1,19.1,18.2,19.9,"*AliSegmet:*AliSegmentArray:*AliArrayI:*AliArrayS:TTree:*TObjArray","br");
   pl->SetFillColor(42);
   pl->SetTextSize(0.7);
   pl->Draw();
   line = new TLine(11.4041,6.8,14.3025,10.2);
   line->SetLineColor(6);
   line->SetLineStyle(3);
   line->Draw();
   line = new TLine(11.4842,6.8,14.3025,10.2);
   line->SetLineColor(6);
   line->SetLineStyle(3);
   line->Draw();
   line = new TLine(6.5025,12.325,6.5025,18.575);
   line->SetLineColor(4);
   line->SetLineStyle(2);
   line->Draw();
   line = new TLine(6.5025,11.475,6.5025,17.725);
   line->SetLineColor(4);
   line->SetLineStyle(2);
   line->Draw();
   line = new TLine(10.4025,6.8,2.6025,16.025);
   line->SetLineColor(4);
   line->SetLineStyle(2);
   line->Draw();
   line = new TLine(10.4025,6.8,2.6025,16.875);
   line->SetLineColor(4);
   line->SetLineStyle(2);
   line->Draw();
   line = new TLine(10.4025,6.8,2.6025,15.175);
   line->SetLineColor(4);
   line->SetLineStyle(2);
   line->Draw();
   TArrow *arrow = new TArrow(5.43417,10.2,6.5025,10.2,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(6.85861,10.2,2.6025,9.775,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(9.60125,8.075,14.3025,10.2,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(10.1354,8.075,6.5025,12.325,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(11.2037,8.075,10.4025,6.8,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(13.9019,10.2,2.6025,9.775,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   arrow = new TArrow(19.2708,10.2,14.3025,10.2,0.008,"|>");
   arrow->SetFillColor(2);
   arrow->SetFillStyle(1001);
   arrow->SetLineColor(2);
   arrow->Draw();
   ClassTree->Modified();
   ClassTree->cd();
}
Exemplo n.º 7
0
Arquivo: file.C Projeto: MycrofD/root
void file(){

   TCanvas *c1 = new TCanvas("c1","ROOT File description",200,10,700,550);

   c1->Range(0,-0.25,21,14);
   TPaveLabel *title = new TPaveLabel(5,12,15,13.7,c1->GetTitle());
   title->SetFillColor(16);
   title->Draw();

   // horizonthal file layout
   TPave *file = new TPave(1,8.5,20,11);
   file->SetFillColor(11);
   file->Draw();
   TPave *fileh = new TPave(1,8.5,2.5,11);
   fileh->SetFillColor(44);
   fileh->Draw();
   TPave *lrh = new TPave(2.5,8.5,3.3,11,1);
   lrh->SetFillColor(33);
   lrh->Draw();
   lrh->DrawPave(6.9,8.5,7.7,11,1);
   lrh->DrawPave(10.5,8.5,11.3,11,1);
   lrh->DrawPave(14.5,8.5,15.3,11,1);
   TLine *ldot = new TLine(1,8.5,0.5,6.5);
   ldot->SetLineStyle(2);
   ldot->Draw();
   ldot->DrawLine(2.5, 8.5, 9.4, 6.5);
   ldot->DrawLine(10.5, 8.5, 10, 6.5);
   ldot->DrawLine(11.3, 8.5, 19.5, 6.5);
   TLine *line = new TLine(2.6,11,2.6,11.5);
   line->Draw();
   line->DrawLine(2.6,11.5,7,11.5);
   TArrow *arrow = new TArrow(7,11.5,7,11.1,0.01,"|>");
   arrow->SetFillStyle(1001);
   arrow->Draw();
   line->DrawLine( 7, 8.5, 7, 8.0);
   line->DrawLine( 7, 8.0, 10.6, 8);
   arrow->DrawArrow( 10.6,8, 10.6, 8.4,0.01,"|>");
   line->DrawLine( 10.6, 11, 10.6, 11.5);
   line->DrawLine( 10.6, 11.5, 14.6, 11.5);
   arrow->DrawArrow( 14.6,11.5, 14.6,11.1,0.01,"|>");
   line->DrawLine( 14.6, 8.5, 14.6, 8.0);
   line->DrawLine( 14.6, 8.0, 16, 8);
   ldot->DrawLine(16, 8, 19, 8);
   TText *vert = new TText(1.5,9.75,"File");
   vert->SetTextAlign(21);
   vert->SetTextAngle(90);
   vert->SetTextSize(0.025);
   vert->Draw();
   vert->DrawText(2.0, 9.75,"Header");
   vert->DrawText(2.9, 9.75,"Logical Record");
   vert->DrawText(3.2, 9.75,"Header");
   vert->DrawText(7.3, 9.75,"Logical Record");
   vert->DrawText(7.6, 9.75,"Header");
   vert->DrawText(10.9,9.75,"Logical Record");
   vert->DrawText(11.2,9.75,"Header");
   vert->DrawText(14.9,9.75,"Logical Record");
   vert->DrawText(15.2,9.75,"Header");
   TText *hori = new TText(4.75,10,"Object");
   hori->SetTextAlign(22);
   hori->SetTextSize(0.035);
   hori->Draw();
   hori->DrawText(4.75, 9.5,"Data");
   hori->DrawText(9.2, 10,"Deleted");
   hori->DrawText(9.2, 9.5,"Object");
   line->DrawLine( 6.9, 8.5, 10.5, 11);
   line->DrawLine( 6.9, 11, 10.5, 8.5);
   TText *tbig = new TText(17,9.75,"............");
   tbig->SetTextAlign(22);
   tbig->SetTextSize(0.03);
   tbig->Draw();
   tbig->DrawText(2.6, 7, "fBEGIN");
   tbig->DrawText(20., 7, "fEND");
   arrow->DrawArrow( 2.6,7, 2.6,8.4,0.01,"|>");
   arrow->DrawArrow( 20,7, 20,8.4,0.01,"|>");

   //file header
   TPaveText *header = new TPaveText(0.5,.2,9.4,6.5);
   header->SetFillColor(44);
   header->Draw();
   TText *fh=header->AddText("File Header");
   fh->SetTextAlign(22);
   fh->SetTextSize(0.04);
   header->SetTextSize(0.027);
   header->SetTextAlign(12);
   header->AddText(" ");
   header->AddLine(0,0,0,0);
   header->AddText("\"root\": Root File Identifier");
   header->AddText("fVersion: File version identifier");
   header->AddText("fBEGIN: Pointer to first data record");
   header->AddText("fEND: Pointer to first free word at EOF");
   header->AddText("fSeekFree: Pointer to FREE data record");
   header->AddText("fNbytesFree: Number of bytes in FREE");
   header->AddText("fNfree: Number of free data records");
   header->AddText("fNbytesName: Number of bytes in name/title");
   header->AddText("fUnits: Number of bytes for pointers");
   header->AddText("fCompress: Compression level");

   //logical record header
   TPaveText *lrecord = new TPaveText(10,0.2,19.5,6.5);
   lrecord->SetFillColor(33);
   lrecord->Draw();
   TText *tlrh=lrecord->AddText("Logical Record Header (TKEY)");
   tlrh->SetTextAlign(22);
   tlrh->SetTextSize(0.04);
   lrecord->SetTextSize(0.027);
   lrecord->SetTextAlign(12);
   lrecord->AddText(" ");
   lrecord->AddLine(0,0,0,0);
   lrecord->AddText("fNbytes: Length of compressed object");
   lrecord->AddText("fVersion: Key version identifier");
   lrecord->AddText("fObjLen: Length of uncompressed object");
   lrecord->AddText("fDatime: Date/Time when written to store");
   lrecord->AddText("fKeylen: Number of bytes for the key");
   lrecord->AddText("fCycle : Cycle number");
   lrecord->AddText("fSeekKey: Pointer to object on file");
   lrecord->AddText("fSeekPdir: Pointer to directory on file");
   lrecord->AddText("fClassName: class name of the object");
   lrecord->AddText("fName: name of the object");
   lrecord->AddText("fTitle: title of the object");

   c1->Update();
   c1->Print("file.png");
}