{ #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"); // Define location of Unique ID generator files. string dial_uids = Environment::current().value("DIAL_UIDS"); UniqueIdGenerator::base_directory(dial_uids); // Instantiate the dataset database (DDB). dset::DatasetDb& ddb = *dset::DatasetDb::default_instance(); // Create scheduler. dial::ProcessJobCreator cre; bool remove_jobs = false; dial::LocalScheduler lsch(cre, remove_jobs); dial::Scheduler& msch = lsch; // Load test script. gROOT->LoadMacro("test.C"); // Define global job ID. dial::JobId jid; // Welcome message. cout << "Welcome to DIAL demo 1" << endl; cout << "See README for instructions" << endl; cout << " To start job: root> test(\"dial_cbnt\")" << endl; cout << " To fetch job: root> dial::Job& job = lsch.job(jid);" << endl; cout << " To display job: root> job.update(); cout << job << endl << endl;" << endl; cout << " To fetch results: root> open_hbook()" << endl; cout << "Questions or problems to dladams@bnl.gov" << endl; // Check the job ID generator. if ( dial::JobId::generator() == 0 || ! dial::JobId::generator()->is_global() ) { cout << "Job ID generator is absent or local" << endl; cout << "Please resolve problem before job submission" << endl; } // Check the dataset ID generator. if ( ! dset::BaseDataset::id_generator().is_valid() || ! dset::BaseDataset::id_generator()->is_global() ) { cout << "Dataset ID generator is invalid or local" << endl; cout << "Please resolve problem before job submission" << endl; } // Check the task ID generator. if ( ! dial::Task::generator().is_valid() || ! dial::Task::generator()->is_global() ) { cout << "Task ID generator is invalid or local" << endl; cout << "Please resolve problem before creating tasks" << endl; } }