void tar()
{
    TString dir = gSystem->pwd();

    Int_t slash = dir.Last('/');

    TString name = &dir[slash+1];

    gSystem->cd("..");

    TString cmd = "tar cvf "+name+".tar --exclude=Root "+name+"/.rootrc "+name+"/*";

    cout << "Executing: " << cmd << endl;

    gSystem->Exec(cmd);
    gSystem->Exec("gzip -9 "+name+".tar");

    gSystem->cd(name);
}
