{ #include // Needed for ROOT 3.10 // Load the dataset and DIAL libraries. gROOT->ProcessLine(".X load_dial.cxx+"); // Load the macro for opening HBOOK files. gROOT->LoadMacro("open_hbook.C"); // Instantiate XML parser and create DTD. XmlParser parser; DtdRegistry::instance("dataset").write(); DtdRegistry::instance("dial").write(); // Define location of Unique ID generator files. string dial_uids = Environment::current().value("DIAL_UIDS"); UniqueIdGenerator::set_generator(dial_uids); // Instantiate access to the dataset repository (DR). // This is used to fetch a dataset with a dataset ID. dset::DatasetRepository& dr = dset::DatasetRepository::default_instance(); // Instantiate access to the dataset selection catalog (DSC). // This is used to fetch a dataset ID with a dataset name. dset::DatasetSelectionCatalog& dsc = dset::DatasetSelectionCatalog::default_instance(); // Instantiate access to the dataset replica catalog (DSC). // This is used to fetch the nonvirtual datasets mapped to // a virtual dataset. dset::DatasetReplicaCatalog& drc = dset::DatasetReplicaCatalog::default_instance(); // Create client scheduler. // For interactive response: dial::WsClientScheduler msch("http://atlasgrid09.usatlas.bnl.gov:20011"); // For long-running jobs: //dial::WsClientScheduler msch("http://atlasgrid09.usatlas.bnl.gov:20012"); // Load scripts gROOT->ProcessLine(".L submit.C"); gROOT->ProcessLine(".L evloop.C"); // Define global job ID. dial::JobId jid; if ( FileStatus("jid").is_readable() ) { jid = JobId(Text("jid").line(0)); } // Welcome message. cout << endl << "Welcome to DIAL demo 3" << endl; cout << " To submit a job: root>"; cout << " submit(appname, dataset_name)" << endl; cout << " To display job: root> "; cout << " cout << endl << msch.job(jid) << endl;" << endl; cout << " To fetch results: root> open_hbook()" << endl; //cout << " To monitor a job: root> evloop()" << endl; cout << "See README for more information" << endl; cout << "Questions or problems to dladams@bnl.gov" << endl; cout << endl << msch << endl; }