Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
rootalias.C File Reference

Detailed Description

Defines aliases:

//______________________________________________________________________________
void edit(char *file)
{
char s[64], *e;
if (!strcmp(gSystem->GetName(), "WinNT")) {
if ((e = getenv("EDITOR")))
sprintf(s, "start %s %s", e, file);
else
sprintf(s, "start notepad %s", file);
} else {
if ((e = getenv("EDITOR")))
sprintf(s, "%s %s", e, file);
else
sprintf(s, "xterm -e vi %s &", file);
}
}
//______________________________________________________________________________
void ls(char *path=0)
{
char s[256];
strcpy(s, (!strcmp(gSystem->GetName(), "WinNT")) ? "dir /w " : "ls ");
if (path) strcat(s,path);
}
//______________________________________________________________________________
void dir(char *path=0)
{
char s[256];
strcpy(s,(!strcmp(gSystem->GetName(), "WinNT")) ? "dir " : "ls -l ");
if (path) strcat(s,path);
}
//______________________________________________________________________________
const char *pwd()
{
}
//______________________________________________________________________________
const char *cd(char *path=0)
{
if (path)
return pwd();
}
//______________________________________________________________________________
void bexec2(char *macro)
{
printf("in bexec dir=%s\n",pwd());
if (gROOT->IsBatch()) printf("Processing benchmark: %s\n",macro);
TPaveText *summary = (TPaveText*)bench->GetPrimitive("TPave");
TText *tmacro = summary->GetLineWith(macro);
if (tmacro) tmacro->SetTextColor(4);
bench->Modified(); bench->Update();
gROOT->Macro(macro);
TPaveText *summary2 = (TPaveText*)bench->GetPrimitive("TPave");
TText *tmacro2 = summary2->GetLineWith(macro);
if (tmacro2) tmacro2->SetTextColor(2);
bench->Modified(); bench->Update();
}
#define e(i)
Definition RSha256.hxx:103
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define gROOT
Definition TROOT.h:406
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
The Canvas class.
Definition TCanvas.h:23
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition TSystem.cxx:653
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Definition TSystem.cxx:862
virtual const char * WorkingDirectory()
Return working directory.
Definition TSystem.cxx:871
Base class for several text objects.
Definition TText.h:22
Author
Rene Brun

Definition in file rootalias.C.