Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

JobCROOT.cxx

Go to the documentation of this file.
00001 
00002 // The ROOT job controller
00003 //
00004 // Interface for JobController for ROOT
00005 //
00006 // messier@huhepl.harvard.edu
00008 #include "JobControl/JobCROOT.h"
00009 #include "JobControl/JobController.h"
00010 #include "JobControl/JobCEnv.h"
00011 ClassImp(JobCROOT)
00012 
00013 JobCROOT* JobCROOT::fInstance = 0; // The sole instance of the JobCROOT class
00014 
00015 //......................................................................
00016 
00017 JobCROOT::JobCROOT()
00018 {
00019 //======================================================================
00020 // Purpose: Create an instance of the JobCROOT interface to job control
00021 //======================================================================
00022 }
00023 
00024 //......................................................................
00025 
00026 JobCROOT::~JobCROOT() 
00027 {
00028 //======================================================================
00029 // Purpose: Clean up after the JobCROOT class
00030 //======================================================================
00031 }
00032 
00033 //......................................................................
00034 
00035 void JobCROOT::operator()(const char *input) 
00036 { 
00037 //======================================================================
00038 // Purpose: Pass job control commands to the controller
00039 //======================================================================
00040   // Send the command to the controller
00041   (*JobController::GetMotherController()) << input << "\n"; 
00042 }
00043 
00044 //......................................................................
00045 
00046 JobCROOT& JobCROOT::Instance() 
00047 {
00048 //======================================================================
00049 // Purpose: Instantiate the single instance of the JobCROOT class
00050 //======================================================================
00051   static JobCROOT::Cleaner c; // Handles deletion of the singlton
00052   if (fInstance == 0) {
00053     c.ClassIsUsed(); // Keeps compilers quite if I use this class...
00054     fInstance = new JobCROOT;
00055   }
00056   return *fInstance;
00057 }
00058 
00059 //......................................................................
00060 
00061 MomNavigator* JobCROOT::GetMom() 
00062 {
00063 //======================================================================
00064 // Purpose: Return a pointer to the data records which are to be used
00065 // interactively
00066 //======================================================================
00067   return (*JobController::GetMotherController()).GetMom();
00068 }
00069 

Generated on Mon Feb 15 11:06:49 2010 for loon by  doxygen 1.3.9.1