// @(#)root/treeplayer:$Id$
// Author: Rene Brun   15/01/2003

/*************************************************************************
 * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TFileDrawMap                                                         //
//                                                                      //
// This class is automatically called by TFile::DrawMap
// It draws a canvas showing the internal structure of a ROOT file.
// Each key or basket in a file is shown with a fill area drawn
// at the byte position of the key/basket in the file.
// The Y axis of the canvas shows the number of Kbytes/Mbytes.
// The X axis shows the bytes between y(i) and y(i+1).
// A color corresponding to the class in the key/basket is automatically
// selected using the class unique identifier.
//
// When moving the mouse in the canvas, the "Event Status" panels
// shows the object corresponding to the mouse position.
// if the object is a key, it shows the class and object name as well as
//    the file directory name if the file has sub-directories.
// if the object is a basket, it shows:
//   -the name of the Tree
//   -the name of the branch
//   -the basket number
//   -the entry number in the basket
//
// Special keys like the StreamerInfo record, the Keys List Record
// and the Free Blocks Record are also shown.
//
// When clicking the right mouse button, a pop-up menu is shown
// with its title identifying the picked object and with the items:
//   -DrawObject: in case of a key, the Draw function of the object is called
//                in case of a basket, the branch is drawn for all entries
//   -DumpObject: in case of a key, the Dump function of the object is called
//                in case of a basket, tree->Show(entry) is called
//   -InspectObject: the Inspect function is called for the object.
//
// The normal axis zoom functionality can be used to zoom or unzoom
// One can also use the TCanvas context menu SetCanvasSize to make
// a larger canvas and use the canvas scroll bars.
//
// When the class is built, it is possible to identify a subset of the
// objects to be shown. For example, to view only the keys with
// names starting with "abc", set the argument keys to "abc*".
// The default is to view all the objects.
// The argument options can also be used (only one option currently)
// When the option "same" is given, the new picture is suprimposed.
// The option "same" is useful, eg:
//  to draw all keys with names = "abc" in a first pass
// then all keys with names = "uv*" in a second pass, etc.
//
//Begin_Html
/*
<img src="gif/filedrawmap.gif">
*/
//End_Html
//
//  =============================================================================

#include "TFileDrawMap.h"
#include "TROOT.h"
#include "TClass.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TLeaf.h"
#include "TMath.h"
#include "TVirtualPad.h"
#include "TStyle.h"
#include "TH1.h"
#include "TBox.h"
#include "TKey.h"
#include "TRegexp.h"
#include "TSystem.h"

ClassImp(TFileDrawMap)

//______________________________________________________________________________
TFileDrawMap::TFileDrawMap() :TNamed()
{
// Default TreeFileMap constructor

   fFile   = 0;
   fFrame  = 0;
   fXsize  = 1000;
   fYsize  = 1000;
}

//______________________________________________________________________________
TFileDrawMap::TFileDrawMap(const TFile *file, const char *keys, Option_t *option)
         : TNamed("TFileDrawMap","")
{
// TFileDrawMap normal constructor
// see descriptions of arguments above

   fFile     = (TFile*)file;
   fKeys     = keys;
   fOption   = option;
   fOption.ToLower();
   SetBit(kCanDelete);

   //create histogram used to draw the map frame

   if (file->GetEND() > 1000000) {
      fXsize = 1000000;
   } else {
      fXsize = 1000;
   }
   fFrame = new TH1D("hmapframe","",1000,0,fXsize);
   fFrame->SetDirectory(0);
   fFrame->SetBit(TH1::kNoStats);
   fFrame->SetBit(kCanDelete);
   fFrame->SetMinimum(0);
   if (fXsize > 1000) {
      fFrame->GetYaxis()->SetTitle("MBytes");
   } else {
      fFrame->GetYaxis()->SetTitle("KBytes");
   }
   fFrame->GetXaxis()->SetTitle("Bytes");
   fYsize = 1 + Int_t(file->GetEND()/fXsize);
   fFrame->SetMaximum(fYsize);
   fFrame->GetYaxis()->SetLimits(0,fYsize);

   //Bool_t show = kFALSE;
   if (gPad) {
      gPad->Clear();
      //show = gPad->GetCanvas()->GetShowEventStatus();
   }
   Draw();
   if (gPad) {
      //if (!show) gPad->GetCanvas()->ToggleEventStatus();
      gPad->Update();
   }
}

//______________________________________________________________________________
TFileDrawMap::~TFileDrawMap()
{
//*-*-*-*-*-*-*-*-*-*-*Tree destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                  =================

   //delete fFrame; //should not be deleted (kCanDelete set)
}

//______________________________________________________________________________
void  TFileDrawMap::AnimateTree(const char *branches)
{
// Show sequence of baskets reads for the list of baskets involved
// in the list of branches (separated by ",")
// if branches="", the branch pointed by the mouse is taken.
// if branches="*", all branches are taken
// Example:
//  AnimateTree("x,y,u");

   TString ourbranches( GetName() );
   Ssiz_t pos = ourbranches.Index(", basket=");
   if (pos == kNPOS) return;
   ourbranches.Remove(pos);
   pos = ourbranches.Index(", branch=");
   if (pos == kNPOS) return;
   ourbranches[pos] = 0;

   TTree *tree = (TTree*)fFile->Get(ourbranches.Data());
   if (!tree) return;
   TString info;
   if (strlen(branches) > 0) info = branches;
   else                      info = ourbranches.Data()+pos+9;
   printf("Animating tree, branches=%s\n",info.Data());

   // create list of branches
   Int_t nzip = 0;
   TBranch *branch;
   TObjArray list;
   char *comma;
   while((comma = strrchr((char*)info.Data(),','))) {
      *comma = 0;
      comma++;
      while (*comma == ' ') comma++;
      branch = tree->GetBranch(comma);
      if (branch) {
         nzip += (Int_t)branch->GetZipBytes();
         branch->SetUniqueID(0);
         list.Add(branch);
      }
   }
   comma = (char*)info.Data();
   while (*comma == ' ') comma++;
   branch = tree->GetBranch(comma);
   if (branch) {
      nzip += (Int_t)branch->GetZipBytes();
      branch->SetUniqueID(0);
      list.Add(branch);
   }
   Double_t fractionRead = Double_t(nzip)/Double_t(fFile->GetEND());
   Int_t nbranches = list.GetEntries();

   // loop on all tree entries
   Int_t nentries = (Int_t)tree->GetEntries();
   Int_t sleep = 1;
   Int_t stime = (Int_t)(100./(nentries*fractionRead));
   if (stime < 10) {stime=1; sleep = nentries/400;}
   gPad->SetDoubleBuffer(0);             // turn off double buffer mode
   gVirtualX->SetDrawMode(TVirtualX::kInvert);  // set the drawing mode to XOR mode
   for (Int_t entry=0;entry<nentries;entry++) {
      for (Int_t ib=0;ib<nbranches;ib++) {
         branch = (TBranch*)list.At(ib);
         Int_t nbaskets = branch->GetListOfBaskets()->GetSize();
         Int_t basket = TMath::BinarySearch(nbaskets,branch->GetBasketEntry(), (Long64_t) entry);
         Int_t nbytes = branch->GetBasketBytes()[basket];
         Int_t bseek  = branch->GetBasketSeek(basket);
         Int_t entry0 = branch->GetBasketEntry()[basket];
         Int_t entryn = branch->GetBasketEntry()[basket+1];
         Int_t eseek  = (Int_t)(bseek + nbytes*Double_t(entry-entry0)/Double_t(entryn-entry0));
         DrawMarker(ib,branch->GetUniqueID());
         DrawMarker(ib,eseek);
         branch->SetUniqueID(eseek);
         gSystem->ProcessEvents();
         if (entry%sleep == 0) gSystem->Sleep(stime);
      }
   }
}

//______________________________________________________________________________
Int_t TFileDrawMap::DistancetoPrimitive(Int_t px, Int_t py)
{
// Compute distance from point px,py to this TreeFileMap
// Find the closest object to the mouse, save its path in the TFileDrawMap name.

   Int_t pxmin = gPad->XtoAbsPixel(gPad->GetUxmin());
   Int_t pxmax = gPad->XtoAbsPixel(gPad->GetUxmax());
   Int_t pymin = gPad->YtoAbsPixel(gPad->GetUymin());
   Int_t pymax = gPad->YtoAbsPixel(gPad->GetUymax());
   if (px > pxmin && px < pxmax && py > pymax && py < pymin) {
      SetName(GetObjectInfo(px,py));
      return 0;
   }
   return fFrame->DistancetoPrimitive(px,py);
}

//______________________________________________________________________________
void TFileDrawMap::DrawMarker(Int_t marker, Long64_t eseek)
{
// Draw marker

   Int_t iy = gPad->YtoAbsPixel(eseek/fXsize);
   Int_t ix = gPad->XtoAbsPixel(eseek%fXsize);
   Int_t d;
   Int_t mark = marker%4;
   switch (mark) {
      case 0 :
         d = 6; //arrow
         gVirtualX->DrawLine(ix-3*d,iy,ix,iy);
         gVirtualX->DrawLine(ix-d,iy+d,ix,iy);
         gVirtualX->DrawLine(ix-d,iy-d,ix,iy);
         gVirtualX->DrawLine(ix-d,iy-d,ix-d,iy+d);
         break;
      case 1 :
         d = 5; //up triangle
         gVirtualX->DrawLine(ix-d,iy-d,ix+d,iy-d);
         gVirtualX->DrawLine(ix+d,iy-d,ix,iy+d);
         gVirtualX->DrawLine(ix,iy+d,ix-d,iy-d);
         break;
      case 2 :
         d = 5; //open square
         gVirtualX->DrawLine(ix-d,iy-d,ix+d,iy-d);
         gVirtualX->DrawLine(ix+d,iy-d,ix+d,iy+d);
         gVirtualX->DrawLine(ix+d,iy+d,ix-d,iy+d);
         gVirtualX->DrawLine(ix-d,iy+d,ix-d,iy-d);
         break;
      case 3 :
         d = 8; //cross
         gVirtualX->DrawLine(ix-d,iy,ix+d,iy);
         gVirtualX->DrawLine(ix,iy-d,ix,iy+d);
         break;
   }
}

//______________________________________________________________________________
void TFileDrawMap::DrawObject()
{
// Draw object at the mouse position

   TVirtualPad *padsave = gROOT->GetSelectedPad();
   if (padsave == gPad) {
      //must create a new canvas
      gROOT->MakeDefCanvas();
   } else {
      padsave->cd();
   }

   // case of a TTree
   char *info = new char[fName.Length()+1];
   strlcpy(info,fName.Data(),fName.Length()+1);
   char *cbasket = (char*)strstr(info,", basket=");
   if (cbasket) {
      *cbasket = 0;
      char *cbranch = (char*)strstr(info,", branch=");
      if (!cbranch) return;
      *cbranch = 0;
      cbranch += 9;
      TTree *tree = (TTree*)fFile->Get(info);
      if (tree) tree->Draw(cbranch);
      return;
   }

   // other objects
   TObject *obj = GetObject();
   if (obj) obj->Draw();
}


//______________________________________________________________________________
void TFileDrawMap::DumpObject()
{
// Dump object at the mouse position

   TObject *obj = GetObject();
   if (obj) {
      obj->Dump();
      return;
   }
   char *centry = (char*)strstr(GetName(),"entry=");
   if (!centry) return;
   Int_t entry = 0;
   sscanf(centry+6,"%d",&entry);
   TString info(GetName());
   char *colon = (char*)strstr((char*)info.Data(),"::");
   if (!colon) return;
   colon--;
   *colon = 0;
   TTree *tree; fFile->GetObject(info.Data(),tree);
   if (tree) tree->Show(entry);
}

//______________________________________________________________________________
void TFileDrawMap::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
// Execute action corresponding to one event

   fFrame->ExecuteEvent(event,px,py);
}

//______________________________________________________________________________
TObject *TFileDrawMap::GetObject()
{
// Retrieve object at the mouse position in memory

   if (strstr(GetName(),"entry=")) return 0;
   char *info = new char[fName.Length()+1];
   strlcpy(info,fName.Data(),fName.Length()+1);
   char *colon = strstr(info,"::");
   if (!colon) return 0;
   colon--;
   *colon = 0;
   return fFile->Get(info);
}

//______________________________________________________________________________
char *TFileDrawMap::GetObjectInfo(Int_t px, Int_t py) const
{
//   Redefines TObject::GetObjectInfo.
//   Displays the keys info in the file corresponding to cursor position px,py
//   in the canvas status bar info panel

   // Thread safety: this solution is not elegant, but given the action performed
   // by the method, this construct can be considered thred-safe.
   static TString info;
   GetObjectInfoDir(fFile, px, py, info);
   return (char*)info.Data();
}

//______________________________________________________________________________
Bool_t TFileDrawMap::GetObjectInfoDir(TDirectory *dir, Int_t px, Int_t py, TString &info) const
{
//   Redefines TObject::GetObjectInfo.
//   Displays the keys info in the directory
//   corresponding to cursor position px,py
//
   Double_t x = gPad->AbsPixeltoX(px);
   Double_t y = gPad->AbsPixeltoY(py);
   Int_t iy   = (Int_t)y;
   Long64_t pbyte = (Long64_t)(fXsize*iy+x);
   Int_t nbytes;
   Long64_t bseek;
   TDirectory *dirsav = gDirectory;
   dir->cd();

   TIter next(dir->GetListOfKeys());
   TKey *key;
   while ((key = (TKey*)next())) {
      TDirectory *curdir = gDirectory;
      TClass *cl = TClass::GetClass(key->GetClassName());
      // a TDirectory ?
      if (cl && cl == TDirectoryFile::Class()) {
         curdir->cd(key->GetName());
         TDirectory *subdir = gDirectory;
         Bool_t gotInfo = GetObjectInfoDir(subdir, px, py, info);
         if (gotInfo) {
            dirsav->cd();
            return kTRUE;
         }
         curdir->cd();
         continue;
      }
      // a TTree ?
      if (cl && cl->InheritsFrom(TTree::Class())) {
         TTree *tree = (TTree*)gDirectory->Get(key->GetName());
         TIter nextb(tree->GetListOfLeaves());
         TLeaf *leaf;
         while ((leaf = (TLeaf*)nextb())) {
            TBranch *branch = leaf->GetBranch();
            Int_t nbaskets = branch->GetMaxBaskets();
            Int_t offsets = branch->GetEntryOffsetLen();
            Int_t len = leaf->GetLen();
            for (Int_t i=0;i<nbaskets;i++) {
               bseek = branch->GetBasketSeek(i);
               if (!bseek) break;
               nbytes = branch->GetBasketBytes()[i];
               if (pbyte >= bseek && pbyte < bseek+nbytes) {
                  Int_t entry = branch->GetBasketEntry()[i];
                  if (!offsets) entry += (pbyte-bseek)/len;
                  if (curdir == (TDirectory*)fFile) {
                     info.Form("%s%s, branch=%s, basket=%d, entry=%d",curdir->GetPath(),key->GetName(),branch->GetName(),i,entry);
                  } else {
                     info.Form("%s/%s, branch=%s, basket=%d, entry=%d",curdir->GetPath(),key->GetName(),branch->GetName(),i,entry);
                  }
                  return kTRUE;
               }
            }
         }
      }
      nbytes = key->GetNbytes();
      bseek = key->GetSeekKey();
      if (pbyte >= bseek && pbyte < bseek+nbytes) {
         if (curdir == (TDirectory*)fFile) {
            info.Form("%s%s ::%s, nbytes=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),nbytes);
         } else {
            info.Form("%s/%s ::%s, nbytes=%d",curdir->GetPath(),key->GetName(),key->GetClassName(),nbytes);
         }
         dirsav->cd();
         return kTRUE;
      }
   }
   // Are we in the Keys list
   if (pbyte >= dir->GetSeekKeys() && pbyte < dir->GetSeekKeys()+dir->GetNbytesKeys()) {
      info.Form("%sKeys List, nbytes=%d",dir->GetPath(),dir->GetNbytesKeys());
      dirsav->cd();
      return kTRUE;
   }
   if (dir == (TDirectory*)fFile) {
      // Are we in the TStreamerInfo
      if (pbyte >= fFile->GetSeekInfo() && pbyte < fFile->GetSeekInfo()+fFile->GetNbytesInfo()) {
         info.Form("%sStreamerInfo List, nbytes=%d",dir->GetPath(),fFile->GetNbytesInfo());
         dirsav->cd();
         return kTRUE;
      }
      // Are we in the Free Segments
      if (pbyte >= fFile->GetSeekFree() && pbyte < fFile->GetSeekFree()+fFile->GetNbytesFree()) {
         info.Form("%sFree List, nbytes=%d",dir->GetPath(),fFile->GetNbytesFree());
         dirsav->cd();
         return kTRUE;
      }
   }
   info.Form("(byte=%lld)",pbyte);
   dirsav->cd();
   return kFALSE;
}

//______________________________________________________________________________
void TFileDrawMap::InspectObject()
{
// Inspect object at the mouse position

   TObject *obj = GetObject();
   if (obj) obj->Inspect();
}

//______________________________________________________________________________
void TFileDrawMap::Paint(Option_t *)
{
//  Paint this TFileDrawMap

   // draw map frame
   if (!fOption.Contains("same")) {
      gPad->Clear();
      //just in case axis Y has been unzoomed
      if (fFrame->GetMaximumStored() < -1000) {
         fFrame->SetMaximum(fYsize+1);
         fFrame->SetMinimum(0);
         fFrame->GetYaxis()->SetLimits(0,fYsize+1);
      }
      fFrame->Paint("a");
   }

   //draw keys
   PaintDir(fFile, fKeys.Data());

   fFrame->Draw("sameaxis");
}

//______________________________________________________________________________
void TFileDrawMap::PaintBox(TBox &box, Long64_t bseek, Int_t nbytes)
{
// Paint the object at bseek with nbytes using the box object

   Int_t iy = bseek/fXsize;
   Int_t ix = bseek%fXsize;
   Int_t ny = 1+(nbytes+ix)/fXsize;
   Double_t xmin,ymin,xmax,ymax;
   for (Int_t j=0;j<ny;j++) {
      if (j == 0) xmin = (Double_t)ix;
      else        xmin = 0;
      xmax = xmin + nbytes;
      if (xmax > fXsize) xmax = fXsize;
      ymin = iy+j;
      ymax = ymin+1;
      nbytes -= (Int_t)(xmax-xmin);
      if (xmax < gPad->GetUxmin()) continue;
      if (xmin > gPad->GetUxmax()) continue;
      if (xmin < gPad->GetUxmin()) xmin = gPad->GetUxmin();
      if (xmax > gPad->GetUxmax()) xmax = gPad->GetUxmax();
      if (ymax < gPad->GetUymin()) continue;
      if (ymin > gPad->GetUymax()) continue;
      if (ymin < gPad->GetUymin()) ymin = gPad->GetUymin();
      if (ymax > gPad->GetUymax()) ymax = gPad->GetUymax();
      //box.TAttFill::Modify();
      box.PaintBox(xmin,ymin,xmax,ymax);
   }
}

//______________________________________________________________________________
void TFileDrawMap::PaintDir(TDirectory *dir, const char *keys)
{
// Paint keys in a directory

   TDirectory *dirsav = gDirectory;
   TIter next(dir->GetListOfKeys());
   TKey *key;
   Int_t color = 0;
   TBox box;
   TRegexp re(keys,kTRUE);
   while ((key = (TKey*)next())) {
      Int_t nbytes = key->GetNbytes();
      Long64_t bseek = key->GetSeekKey();
      TClass *cl = TClass::GetClass(key->GetClassName());
      if (cl) {
         color = (Int_t)(cl->GetUniqueID()%20);
      } else {
         color = 1;
      }
      box.SetFillColor(color);
      box.SetFillStyle(1001);
      TString s = key->GetName();
      if (strcmp(fKeys.Data(),key->GetName()) && s.Index(re) == kNPOS) continue;
      // a TDirectory ?
      if (cl && cl == TDirectoryFile::Class()) {
         TDirectory *curdir = gDirectory;
         gDirectory->cd(key->GetName());
         TDirectory *subdir = gDirectory;
         PaintDir(subdir,"*");
         curdir->cd();
      }
      PaintBox(box,bseek,nbytes);
      // a TTree ?
      if (cl && cl->InheritsFrom(TTree::Class())) {
         TTree *tree = (TTree*)gDirectory->Get(key->GetName());
         TIter nextb(tree->GetListOfLeaves());
         TLeaf *leaf;
         while ((leaf = (TLeaf*)nextb())) {
            TBranch *branch = leaf->GetBranch();
            color = branch->GetFillColor();
            if (color == 0) color = 1;
            box.SetFillColor(color);
            Int_t nbaskets = branch->GetMaxBaskets();
            for (Int_t i=0;i<nbaskets;i++) {
               bseek = branch->GetBasketSeek(i);
               if (!bseek) break;
               nbytes = branch->GetBasketBytes()[i];
               PaintBox(box,bseek,nbytes);
            }
         }
      }
   }
   // draw the box for Keys list
   box.SetFillColor(50);
   box.SetFillStyle(1001);
   PaintBox(box,dir->GetSeekKeys(),dir->GetNbytesKeys());
   if (dir == (TDirectory*)fFile) {
      // draw the box for TStreamerInfo
      box.SetFillColor(6);
      box.SetFillStyle(3008);
      PaintBox(box,fFile->GetSeekInfo(),fFile->GetNbytesInfo());
      // draw the box for Free Segments
      box.SetFillColor(1);
      box.SetFillStyle(1001);
      PaintBox(box,fFile->GetSeekFree(),fFile->GetNbytesFree());
   }
   dirsav->cd();
}
 TFileDrawMap.cxx:1
 TFileDrawMap.cxx:2
 TFileDrawMap.cxx:3
 TFileDrawMap.cxx:4
 TFileDrawMap.cxx:5
 TFileDrawMap.cxx:6
 TFileDrawMap.cxx:7
 TFileDrawMap.cxx:8
 TFileDrawMap.cxx:9
 TFileDrawMap.cxx:10
 TFileDrawMap.cxx:11
 TFileDrawMap.cxx:12
 TFileDrawMap.cxx:13
 TFileDrawMap.cxx:14
 TFileDrawMap.cxx:15
 TFileDrawMap.cxx:16
 TFileDrawMap.cxx:17
 TFileDrawMap.cxx:18
 TFileDrawMap.cxx:19
 TFileDrawMap.cxx:20
 TFileDrawMap.cxx:21
 TFileDrawMap.cxx:22
 TFileDrawMap.cxx:23
 TFileDrawMap.cxx:24
 TFileDrawMap.cxx:25
 TFileDrawMap.cxx:26
 TFileDrawMap.cxx:27
 TFileDrawMap.cxx:28
 TFileDrawMap.cxx:29
 TFileDrawMap.cxx:30
 TFileDrawMap.cxx:31
 TFileDrawMap.cxx:32
 TFileDrawMap.cxx:33
 TFileDrawMap.cxx:34
 TFileDrawMap.cxx:35
 TFileDrawMap.cxx:36
 TFileDrawMap.cxx:37
 TFileDrawMap.cxx:38
 TFileDrawMap.cxx:39
 TFileDrawMap.cxx:40
 TFileDrawMap.cxx:41
 TFileDrawMap.cxx:42
 TFileDrawMap.cxx:43
 TFileDrawMap.cxx:44
 TFileDrawMap.cxx:45
 TFileDrawMap.cxx:46
 TFileDrawMap.cxx:47
 TFileDrawMap.cxx:48
 TFileDrawMap.cxx:49
 TFileDrawMap.cxx:50
 TFileDrawMap.cxx:51
 TFileDrawMap.cxx:52
 TFileDrawMap.cxx:53
 TFileDrawMap.cxx:54
 TFileDrawMap.cxx:55
 TFileDrawMap.cxx:56
 TFileDrawMap.cxx:57
 TFileDrawMap.cxx:58
 TFileDrawMap.cxx:59
 TFileDrawMap.cxx:60
 TFileDrawMap.cxx:61
 TFileDrawMap.cxx:62
 TFileDrawMap.cxx:63
 TFileDrawMap.cxx:64
 TFileDrawMap.cxx:65
 TFileDrawMap.cxx:66
 TFileDrawMap.cxx:67
 TFileDrawMap.cxx:68
 TFileDrawMap.cxx:69
 TFileDrawMap.cxx:70
 TFileDrawMap.cxx:71
 TFileDrawMap.cxx:72
 TFileDrawMap.cxx:73
 TFileDrawMap.cxx:74
 TFileDrawMap.cxx:75
 TFileDrawMap.cxx:76
 TFileDrawMap.cxx:77
 TFileDrawMap.cxx:78
 TFileDrawMap.cxx:79
 TFileDrawMap.cxx:80
 TFileDrawMap.cxx:81
 TFileDrawMap.cxx:82
 TFileDrawMap.cxx:83
 TFileDrawMap.cxx:84
 TFileDrawMap.cxx:85
 TFileDrawMap.cxx:86
 TFileDrawMap.cxx:87
 TFileDrawMap.cxx:88
 TFileDrawMap.cxx:89
 TFileDrawMap.cxx:90
 TFileDrawMap.cxx:91
 TFileDrawMap.cxx:92
 TFileDrawMap.cxx:93
 TFileDrawMap.cxx:94
 TFileDrawMap.cxx:95
 TFileDrawMap.cxx:96
 TFileDrawMap.cxx:97
 TFileDrawMap.cxx:98
 TFileDrawMap.cxx:99
 TFileDrawMap.cxx:100
 TFileDrawMap.cxx:101
 TFileDrawMap.cxx:102
 TFileDrawMap.cxx:103
 TFileDrawMap.cxx:104
 TFileDrawMap.cxx:105
 TFileDrawMap.cxx:106
 TFileDrawMap.cxx:107
 TFileDrawMap.cxx:108
 TFileDrawMap.cxx:109
 TFileDrawMap.cxx:110
 TFileDrawMap.cxx:111
 TFileDrawMap.cxx:112
 TFileDrawMap.cxx:113
 TFileDrawMap.cxx:114
 TFileDrawMap.cxx:115
 TFileDrawMap.cxx:116
 TFileDrawMap.cxx:117
 TFileDrawMap.cxx:118
 TFileDrawMap.cxx:119
 TFileDrawMap.cxx:120
 TFileDrawMap.cxx:121
 TFileDrawMap.cxx:122
 TFileDrawMap.cxx:123
 TFileDrawMap.cxx:124
 TFileDrawMap.cxx:125
 TFileDrawMap.cxx:126
 TFileDrawMap.cxx:127
 TFileDrawMap.cxx:128
 TFileDrawMap.cxx:129
 TFileDrawMap.cxx:130
 TFileDrawMap.cxx:131
 TFileDrawMap.cxx:132
 TFileDrawMap.cxx:133
 TFileDrawMap.cxx:134
 TFileDrawMap.cxx:135
 TFileDrawMap.cxx:136
 TFileDrawMap.cxx:137
 TFileDrawMap.cxx:138
 TFileDrawMap.cxx:139
 TFileDrawMap.cxx:140
 TFileDrawMap.cxx:141
 TFileDrawMap.cxx:142
 TFileDrawMap.cxx:143
 TFileDrawMap.cxx:144
 TFileDrawMap.cxx:145
 TFileDrawMap.cxx:146
 TFileDrawMap.cxx:147
 TFileDrawMap.cxx:148
 TFileDrawMap.cxx:149
 TFileDrawMap.cxx:150
 TFileDrawMap.cxx:151
 TFileDrawMap.cxx:152
 TFileDrawMap.cxx:153
 TFileDrawMap.cxx:154
 TFileDrawMap.cxx:155
 TFileDrawMap.cxx:156
 TFileDrawMap.cxx:157
 TFileDrawMap.cxx:158
 TFileDrawMap.cxx:159
 TFileDrawMap.cxx:160
 TFileDrawMap.cxx:161
 TFileDrawMap.cxx:162
 TFileDrawMap.cxx:163
 TFileDrawMap.cxx:164
 TFileDrawMap.cxx:165
 TFileDrawMap.cxx:166
 TFileDrawMap.cxx:167
 TFileDrawMap.cxx:168
 TFileDrawMap.cxx:169
 TFileDrawMap.cxx:170
 TFileDrawMap.cxx:171
 TFileDrawMap.cxx:172
 TFileDrawMap.cxx:173
 TFileDrawMap.cxx:174
 TFileDrawMap.cxx:175
 TFileDrawMap.cxx:176
 TFileDrawMap.cxx:177
 TFileDrawMap.cxx:178
 TFileDrawMap.cxx:179
 TFileDrawMap.cxx:180
 TFileDrawMap.cxx:181
 TFileDrawMap.cxx:182
 TFileDrawMap.cxx:183
 TFileDrawMap.cxx:184
 TFileDrawMap.cxx:185
 TFileDrawMap.cxx:186
 TFileDrawMap.cxx:187
 TFileDrawMap.cxx:188
 TFileDrawMap.cxx:189
 TFileDrawMap.cxx:190
 TFileDrawMap.cxx:191
 TFileDrawMap.cxx:192
 TFileDrawMap.cxx:193
 TFileDrawMap.cxx:194
 TFileDrawMap.cxx:195
 TFileDrawMap.cxx:196
 TFileDrawMap.cxx:197
 TFileDrawMap.cxx:198
 TFileDrawMap.cxx:199
 TFileDrawMap.cxx:200
 TFileDrawMap.cxx:201
 TFileDrawMap.cxx:202
 TFileDrawMap.cxx:203
 TFileDrawMap.cxx:204
 TFileDrawMap.cxx:205
 TFileDrawMap.cxx:206
 TFileDrawMap.cxx:207
 TFileDrawMap.cxx:208
 TFileDrawMap.cxx:209
 TFileDrawMap.cxx:210
 TFileDrawMap.cxx:211
 TFileDrawMap.cxx:212
 TFileDrawMap.cxx:213
 TFileDrawMap.cxx:214
 TFileDrawMap.cxx:215
 TFileDrawMap.cxx:216
 TFileDrawMap.cxx:217
 TFileDrawMap.cxx:218
 TFileDrawMap.cxx:219
 TFileDrawMap.cxx:220
 TFileDrawMap.cxx:221
 TFileDrawMap.cxx:222
 TFileDrawMap.cxx:223
 TFileDrawMap.cxx:224
 TFileDrawMap.cxx:225
 TFileDrawMap.cxx:226
 TFileDrawMap.cxx:227
 TFileDrawMap.cxx:228
 TFileDrawMap.cxx:229
 TFileDrawMap.cxx:230
 TFileDrawMap.cxx:231
 TFileDrawMap.cxx:232
 TFileDrawMap.cxx:233
 TFileDrawMap.cxx:234
 TFileDrawMap.cxx:235
 TFileDrawMap.cxx:236
 TFileDrawMap.cxx:237
 TFileDrawMap.cxx:238
 TFileDrawMap.cxx:239
 TFileDrawMap.cxx:240
 TFileDrawMap.cxx:241
 TFileDrawMap.cxx:242
 TFileDrawMap.cxx:243
 TFileDrawMap.cxx:244
 TFileDrawMap.cxx:245
 TFileDrawMap.cxx:246
 TFileDrawMap.cxx:247
 TFileDrawMap.cxx:248
 TFileDrawMap.cxx:249
 TFileDrawMap.cxx:250
 TFileDrawMap.cxx:251
 TFileDrawMap.cxx:252
 TFileDrawMap.cxx:253
 TFileDrawMap.cxx:254
 TFileDrawMap.cxx:255
 TFileDrawMap.cxx:256
 TFileDrawMap.cxx:257
 TFileDrawMap.cxx:258
 TFileDrawMap.cxx:259
 TFileDrawMap.cxx:260
 TFileDrawMap.cxx:261
 TFileDrawMap.cxx:262
 TFileDrawMap.cxx:263
 TFileDrawMap.cxx:264
 TFileDrawMap.cxx:265
 TFileDrawMap.cxx:266
 TFileDrawMap.cxx:267
 TFileDrawMap.cxx:268
 TFileDrawMap.cxx:269
 TFileDrawMap.cxx:270
 TFileDrawMap.cxx:271
 TFileDrawMap.cxx:272
 TFileDrawMap.cxx:273
 TFileDrawMap.cxx:274
 TFileDrawMap.cxx:275
 TFileDrawMap.cxx:276
 TFileDrawMap.cxx:277
 TFileDrawMap.cxx:278
 TFileDrawMap.cxx:279
 TFileDrawMap.cxx:280
 TFileDrawMap.cxx:281
 TFileDrawMap.cxx:282
 TFileDrawMap.cxx:283
 TFileDrawMap.cxx:284
 TFileDrawMap.cxx:285
 TFileDrawMap.cxx:286
 TFileDrawMap.cxx:287
 TFileDrawMap.cxx:288
 TFileDrawMap.cxx:289
 TFileDrawMap.cxx:290
 TFileDrawMap.cxx:291
 TFileDrawMap.cxx:292
 TFileDrawMap.cxx:293
 TFileDrawMap.cxx:294
 TFileDrawMap.cxx:295
 TFileDrawMap.cxx:296
 TFileDrawMap.cxx:297
 TFileDrawMap.cxx:298
 TFileDrawMap.cxx:299
 TFileDrawMap.cxx:300
 TFileDrawMap.cxx:301
 TFileDrawMap.cxx:302
 TFileDrawMap.cxx:303
 TFileDrawMap.cxx:304
 TFileDrawMap.cxx:305
 TFileDrawMap.cxx:306
 TFileDrawMap.cxx:307
 TFileDrawMap.cxx:308
 TFileDrawMap.cxx:309
 TFileDrawMap.cxx:310
 TFileDrawMap.cxx:311
 TFileDrawMap.cxx:312
 TFileDrawMap.cxx:313
 TFileDrawMap.cxx:314
 TFileDrawMap.cxx:315
 TFileDrawMap.cxx:316
 TFileDrawMap.cxx:317
 TFileDrawMap.cxx:318
 TFileDrawMap.cxx:319
 TFileDrawMap.cxx:320
 TFileDrawMap.cxx:321
 TFileDrawMap.cxx:322
 TFileDrawMap.cxx:323
 TFileDrawMap.cxx:324
 TFileDrawMap.cxx:325
 TFileDrawMap.cxx:326
 TFileDrawMap.cxx:327
 TFileDrawMap.cxx:328
 TFileDrawMap.cxx:329
 TFileDrawMap.cxx:330
 TFileDrawMap.cxx:331
 TFileDrawMap.cxx:332
 TFileDrawMap.cxx:333
 TFileDrawMap.cxx:334
 TFileDrawMap.cxx:335
 TFileDrawMap.cxx:336
 TFileDrawMap.cxx:337
 TFileDrawMap.cxx:338
 TFileDrawMap.cxx:339
 TFileDrawMap.cxx:340
 TFileDrawMap.cxx:341
 TFileDrawMap.cxx:342
 TFileDrawMap.cxx:343
 TFileDrawMap.cxx:344
 TFileDrawMap.cxx:345
 TFileDrawMap.cxx:346
 TFileDrawMap.cxx:347
 TFileDrawMap.cxx:348
 TFileDrawMap.cxx:349
 TFileDrawMap.cxx:350
 TFileDrawMap.cxx:351
 TFileDrawMap.cxx:352
 TFileDrawMap.cxx:353
 TFileDrawMap.cxx:354
 TFileDrawMap.cxx:355
 TFileDrawMap.cxx:356
 TFileDrawMap.cxx:357
 TFileDrawMap.cxx:358
 TFileDrawMap.cxx:359
 TFileDrawMap.cxx:360
 TFileDrawMap.cxx:361
 TFileDrawMap.cxx:362
 TFileDrawMap.cxx:363
 TFileDrawMap.cxx:364
 TFileDrawMap.cxx:365
 TFileDrawMap.cxx:366
 TFileDrawMap.cxx:367
 TFileDrawMap.cxx:368
 TFileDrawMap.cxx:369
 TFileDrawMap.cxx:370
 TFileDrawMap.cxx:371
 TFileDrawMap.cxx:372
 TFileDrawMap.cxx:373
 TFileDrawMap.cxx:374
 TFileDrawMap.cxx:375
 TFileDrawMap.cxx:376
 TFileDrawMap.cxx:377
 TFileDrawMap.cxx:378
 TFileDrawMap.cxx:379
 TFileDrawMap.cxx:380
 TFileDrawMap.cxx:381
 TFileDrawMap.cxx:382
 TFileDrawMap.cxx:383
 TFileDrawMap.cxx:384
 TFileDrawMap.cxx:385
 TFileDrawMap.cxx:386
 TFileDrawMap.cxx:387
 TFileDrawMap.cxx:388
 TFileDrawMap.cxx:389
 TFileDrawMap.cxx:390
 TFileDrawMap.cxx:391
 TFileDrawMap.cxx:392
 TFileDrawMap.cxx:393
 TFileDrawMap.cxx:394
 TFileDrawMap.cxx:395
 TFileDrawMap.cxx:396
 TFileDrawMap.cxx:397
 TFileDrawMap.cxx:398
 TFileDrawMap.cxx:399
 TFileDrawMap.cxx:400
 TFileDrawMap.cxx:401
 TFileDrawMap.cxx:402
 TFileDrawMap.cxx:403
 TFileDrawMap.cxx:404
 TFileDrawMap.cxx:405
 TFileDrawMap.cxx:406
 TFileDrawMap.cxx:407
 TFileDrawMap.cxx:408
 TFileDrawMap.cxx:409
 TFileDrawMap.cxx:410
 TFileDrawMap.cxx:411
 TFileDrawMap.cxx:412
 TFileDrawMap.cxx:413
 TFileDrawMap.cxx:414
 TFileDrawMap.cxx:415
 TFileDrawMap.cxx:416
 TFileDrawMap.cxx:417
 TFileDrawMap.cxx:418
 TFileDrawMap.cxx:419
 TFileDrawMap.cxx:420
 TFileDrawMap.cxx:421
 TFileDrawMap.cxx:422
 TFileDrawMap.cxx:423
 TFileDrawMap.cxx:424
 TFileDrawMap.cxx:425
 TFileDrawMap.cxx:426
 TFileDrawMap.cxx:427
 TFileDrawMap.cxx:428
 TFileDrawMap.cxx:429
 TFileDrawMap.cxx:430
 TFileDrawMap.cxx:431
 TFileDrawMap.cxx:432
 TFileDrawMap.cxx:433
 TFileDrawMap.cxx:434
 TFileDrawMap.cxx:435
 TFileDrawMap.cxx:436
 TFileDrawMap.cxx:437
 TFileDrawMap.cxx:438
 TFileDrawMap.cxx:439
 TFileDrawMap.cxx:440
 TFileDrawMap.cxx:441
 TFileDrawMap.cxx:442
 TFileDrawMap.cxx:443
 TFileDrawMap.cxx:444
 TFileDrawMap.cxx:445
 TFileDrawMap.cxx:446
 TFileDrawMap.cxx:447
 TFileDrawMap.cxx:448
 TFileDrawMap.cxx:449
 TFileDrawMap.cxx:450
 TFileDrawMap.cxx:451
 TFileDrawMap.cxx:452
 TFileDrawMap.cxx:453
 TFileDrawMap.cxx:454
 TFileDrawMap.cxx:455
 TFileDrawMap.cxx:456
 TFileDrawMap.cxx:457
 TFileDrawMap.cxx:458
 TFileDrawMap.cxx:459
 TFileDrawMap.cxx:460
 TFileDrawMap.cxx:461
 TFileDrawMap.cxx:462
 TFileDrawMap.cxx:463
 TFileDrawMap.cxx:464
 TFileDrawMap.cxx:465
 TFileDrawMap.cxx:466
 TFileDrawMap.cxx:467
 TFileDrawMap.cxx:468
 TFileDrawMap.cxx:469
 TFileDrawMap.cxx:470
 TFileDrawMap.cxx:471
 TFileDrawMap.cxx:472
 TFileDrawMap.cxx:473
 TFileDrawMap.cxx:474
 TFileDrawMap.cxx:475
 TFileDrawMap.cxx:476
 TFileDrawMap.cxx:477
 TFileDrawMap.cxx:478
 TFileDrawMap.cxx:479
 TFileDrawMap.cxx:480
 TFileDrawMap.cxx:481
 TFileDrawMap.cxx:482
 TFileDrawMap.cxx:483
 TFileDrawMap.cxx:484
 TFileDrawMap.cxx:485
 TFileDrawMap.cxx:486
 TFileDrawMap.cxx:487
 TFileDrawMap.cxx:488
 TFileDrawMap.cxx:489
 TFileDrawMap.cxx:490
 TFileDrawMap.cxx:491
 TFileDrawMap.cxx:492
 TFileDrawMap.cxx:493
 TFileDrawMap.cxx:494
 TFileDrawMap.cxx:495
 TFileDrawMap.cxx:496
 TFileDrawMap.cxx:497
 TFileDrawMap.cxx:498
 TFileDrawMap.cxx:499
 TFileDrawMap.cxx:500
 TFileDrawMap.cxx:501
 TFileDrawMap.cxx:502
 TFileDrawMap.cxx:503
 TFileDrawMap.cxx:504
 TFileDrawMap.cxx:505
 TFileDrawMap.cxx:506
 TFileDrawMap.cxx:507
 TFileDrawMap.cxx:508
 TFileDrawMap.cxx:509
 TFileDrawMap.cxx:510
 TFileDrawMap.cxx:511
 TFileDrawMap.cxx:512
 TFileDrawMap.cxx:513
 TFileDrawMap.cxx:514
 TFileDrawMap.cxx:515
 TFileDrawMap.cxx:516
 TFileDrawMap.cxx:517
 TFileDrawMap.cxx:518
 TFileDrawMap.cxx:519
 TFileDrawMap.cxx:520
 TFileDrawMap.cxx:521
 TFileDrawMap.cxx:522
 TFileDrawMap.cxx:523
 TFileDrawMap.cxx:524
 TFileDrawMap.cxx:525
 TFileDrawMap.cxx:526
 TFileDrawMap.cxx:527
 TFileDrawMap.cxx:528
 TFileDrawMap.cxx:529
 TFileDrawMap.cxx:530
 TFileDrawMap.cxx:531
 TFileDrawMap.cxx:532
 TFileDrawMap.cxx:533
 TFileDrawMap.cxx:534
 TFileDrawMap.cxx:535
 TFileDrawMap.cxx:536
 TFileDrawMap.cxx:537
 TFileDrawMap.cxx:538
 TFileDrawMap.cxx:539
 TFileDrawMap.cxx:540
 TFileDrawMap.cxx:541
 TFileDrawMap.cxx:542
 TFileDrawMap.cxx:543
 TFileDrawMap.cxx:544
 TFileDrawMap.cxx:545
 TFileDrawMap.cxx:546
 TFileDrawMap.cxx:547
 TFileDrawMap.cxx:548
 TFileDrawMap.cxx:549
 TFileDrawMap.cxx:550
 TFileDrawMap.cxx:551
 TFileDrawMap.cxx:552
 TFileDrawMap.cxx:553
 TFileDrawMap.cxx:554
 TFileDrawMap.cxx:555
 TFileDrawMap.cxx:556
 TFileDrawMap.cxx:557
 TFileDrawMap.cxx:558
 TFileDrawMap.cxx:559
 TFileDrawMap.cxx:560
 TFileDrawMap.cxx:561
 TFileDrawMap.cxx:562
 TFileDrawMap.cxx:563
 TFileDrawMap.cxx:564
 TFileDrawMap.cxx:565
 TFileDrawMap.cxx:566
 TFileDrawMap.cxx:567
 TFileDrawMap.cxx:568
 TFileDrawMap.cxx:569
 TFileDrawMap.cxx:570
 TFileDrawMap.cxx:571
 TFileDrawMap.cxx:572
 TFileDrawMap.cxx:573
 TFileDrawMap.cxx:574
 TFileDrawMap.cxx:575
 TFileDrawMap.cxx:576
 TFileDrawMap.cxx:577
 TFileDrawMap.cxx:578
 TFileDrawMap.cxx:579
 TFileDrawMap.cxx:580
 TFileDrawMap.cxx:581
 TFileDrawMap.cxx:582
 TFileDrawMap.cxx:583
 TFileDrawMap.cxx:584
 TFileDrawMap.cxx:585
 TFileDrawMap.cxx:586
 TFileDrawMap.cxx:587
 TFileDrawMap.cxx:588
 TFileDrawMap.cxx:589
 TFileDrawMap.cxx:590
 TFileDrawMap.cxx:591
 TFileDrawMap.cxx:592
 TFileDrawMap.cxx:593
 TFileDrawMap.cxx:594
 TFileDrawMap.cxx:595
 TFileDrawMap.cxx:596
 TFileDrawMap.cxx:597
 TFileDrawMap.cxx:598
 TFileDrawMap.cxx:599
 TFileDrawMap.cxx:600
 TFileDrawMap.cxx:601
 TFileDrawMap.cxx:602
 TFileDrawMap.cxx:603
 TFileDrawMap.cxx:604
 TFileDrawMap.cxx:605
 TFileDrawMap.cxx:606
 TFileDrawMap.cxx:607