00001 00002 // $Id: JobC.cxx,v 1.11 2004/12/20 05:11:00 schubert Exp $ 00003 // 00004 // The job controller object. 00005 // 00006 // messier@huhepl.harvard.edu 00008 #include "JobControl/JobC.h" 00009 #include <vector> 00010 #include "JobControl/JobCleaner.h" 00011 #include "JobControl/JobCEnv.h" 00012 #include "MessageService/MsgService.h" 00013 00014 CVSID("$Id: JobC.cxx,v 1.11 2004/12/20 05:11:00 schubert Exp $"); 00015 00016 JobC::JobC() 00017 { 00018 MSG("JobC",Msg::kDebug) << "JobC def ctor " << this << endl; 00019 00020 this->Init(); 00021 00022 // Register with the cleaner object... 00023 JobCleaner::Instance().Add(this); 00024 } 00025 00026 //...................................................................... 00027 00028 JobC::JobC(int argc, char** argv) 00029 { 00030 MSG("JobC",Msg::kDebug) << "JobC normal ctor " << this << endl; 00031 00032 JobCEnv::Instance(argc, argv); // Setup the job environment 00033 this->Init(); 00034 00035 // Register with the cleaner object... 00036 JobCleaner::Instance().Add(this); 00037 } 00038 00039 //...................................................................... 00040 00041 void JobC::Init() 00042 { 00043 // Configure the input module 00044 Input.SetMom(&Mom); 00045 Input.Use("INPUT"); 00046 00047 // Configure the path module 00048 Path.SetMom(&Mom); 00049 Path.SetInput(&Input); 00050 Path.SetPathRegistry(&fPathRegistry); 00051 } 00052 00053 //...................................................................... 00054 00055 JobC::~JobC() { 00056 // Remove this from the list of objects managed by the cleaner 00057 MSG("JobC",Msg::kDebug) << "JobC dtor " << this << endl; 00058 Mom.Clear(); // invoke Clear to remove any lingering objects 00059 JobCleaner::Instance().Remove(this); 00060 } 00061
1.3.9.1