{ // Check the grid proxy. if ( system("check_proxy") ) { cerr << "rootlogon: Proxy check failed--exiting root" << endl; gROOT->ProcessLine(".q"); } // Load the dataset and DIAL libraries. gROOT->ProcessLine(".X load_dial.cxx+"); // Load the macro for opening root datasets. gROOT->LoadMacro("open_root.C"); // Load the DIAL command macro. gROOT->LoadMacro("dialcom.C"); // Load credential. cout << endl; dset::GssCredentialManager::set_default(); pprint(dset::GssCredentialManager::credential()); // Instantiate XML parser and create DTD. XmlParser parser; // Define location of Unique ID generator files. string dial_uids = Environment::current().value("DIAL_UIDS"); UniqueIdGenerator::set_generator(dial_uids); // Instantiate the catalogs. dset::DatasetRepository& dr = dset::DatasetRepository::default_instance(); dset::DatasetFileCatalog& dfc = dset::DatasetFileCatalog::default_instance(); dset::DatasetSelectionCatalog& dsc = dset::DatasetSelectionCatalog::default_instance(); dset::DatasetReplicaCatalog& drc = dset::DatasetReplicaCatalog::default_instance(); dial::ApplicationRepository& ar = dial::ApplicationRepository::default_instance(); dial::ApplicationSelectionCatalog& asc = dial::ApplicationSelectionCatalog::default_instance(); dial::TaskRepository& tr = dial::TaskRepository::default_instance(); dial::TaskSelectionCatalog& tsc = dial::TaskSelectionCatalog::default_instance(); dset::CredentialSelectionCatalog& csc = dset::CredentialSelectionCatalog::default_instance(); dial::JobRepository& jr = dial::JobRepository::default_instance(); // Following is informative but a bit slow. //show_catalogs(); // Define global variables to reference the current application, // task and dataset. dial::ApplicationId aid; dial::TaskId tid; DatasetId did; const dial::Application* papp = 0; const dial::Task* ptsk = 0; const dset::Dataset* pdst = 0; const dial::JobPreferences* pprf = 0; // Define global job ID. dial::JobId jid; if ( FileStatus("jid").is_readable() ) { jid = JobId(Text("jid").line(0)); } // Create client scheduler. string sconn = Environment::current().value("DIAL_SCHEDULER"); if ( FileStatus("scheduler").is_readable() ) { Text tsch("scheduler"); sconn = tsch.line(0); } if ( ! sconn.size() ) { cout << "DIAL_SCHEDULER is undefined" << endl; cout << "Using default scheduler" << endl; sconn = "http://dial02.usatlas.bnl.gov:20011"; } cout << "Connecting to analysis service at" << endl; cout << " " << sconn << endl; dial::WsClientScheduler msch(sconn); msch.set_timeout(5); // Welcome message. cout << endl; system("cat welcome.txt"); cout << endl; // Execute user logon. if ( FileStatus("userlogon.C").is_readable() ) { cout << "Executing user logon" << endl; gROOT->ProcessLine(".X userlogon.C"); } cout << "\nWelcome " << dset::GssCredentialManager::owner() << endl; }