#include <JobCModule.h>
Inheritance diagram for JobCModule:

Public Member Functions | |
| JobCModule () | |
| virtual | ~JobCModule () |
| const char * | GetName () const |
| virtual JobCResult | Ana (const MomNavigator *mom) |
| virtual JobCResult | Reco (MomNavigator *mom) |
| virtual void | BeginJob () |
| virtual void | EndJob () |
| virtual void | BeginFile () |
| virtual void | EndFile () |
| virtual void | BeginRun () |
| virtual void | EndRun () |
| Int_t | GetCurrentRun () const |
| Int_t | GetLastRun () const |
| const char * | GetCurrentFile (const char *streamname="*") const |
| const char * | GetLastFile (const char *streamname="*") const |
| virtual const Registry & | DefaultConfig () const |
| virtual void | Config (const Registry &r) |
| virtual JobCResult | Get (MomNavigator *mom) |
| virtual JobCResult | Put (const MomNavigator *mom) |
| virtual void | Cmd (const char *command) |
| virtual void | HandleCommand (JobCommand *command) |
| virtual void | Help () |
| virtual void | Report () |
| virtual void | Reset () |
| void | Init (const char *name) |
| void | Set (const char *paramlist) |
| void | Set (JobCDialog *d=0) |
| virtual Registry & | GetConfig () |
| bool | SetUniqueName (const char *name) |
| const char * | GetUniqueName () const |
| JobCPath * | GetPath () |
| void | SetPath (JobCPath *path) |
Private Member Functions | |
| JobCInputModule * | GetJobCInputModule () const |
Private Attributes | |
| std::string | fName |
| Registry | fConfig |
| JobCPath * | fPath |
|
|
Definition at line 23 of file JobCModule.cxx.
|
|
|
Definition at line 44 of file JobCModule.cxx. 00044 {}
|
|
|
|
Implement for notification of begin of file. See GetCurrentFile(). Reimplemented in BeamMonDbuModule, BeamMonSwicPedsDbuModule, NtpBDFullModule, BDataQualityModule, CDFMonitoringModule, BDTestDataModule, AutoPIDMaker, Cluster3DModule, DbuDaqFileModule, SleepModule, JobCDisplayModule, JobCInput, JobCRootCommandModule, JobCDemoModuleA, FiltMBSpillModule, MNtpModule, FiltCosmicModule, RemoveMuon, MCMonitorBeam, MCMonitorCosmic, PulserDBModule, and RotoClientModule. Definition at line 73 of file JobCModule.cxx. References GetName(), and MSG. Referenced by JobCDisplayModule::BeginFile(). 00073 {
00074 MSG("JobC",Msg::kDebug) <<
00075 "JobCModule::BeginFile for module " << this->GetName() << "\n";
00076 }
|
|
|
|
Implement for notification of begin of run (meaningful for Daq data only). See GetCurrentRun(). Reimplemented in AutoPIDMaker, Cluster3DModule, DbuDaqFileModule, SleepModule, GenieModule, JobCDisplayModule, JobCInput, JobCRootCommandModule, JobCDemoModuleA, UserDisplayModule, FiltMBSpillModule, FiltCosmicModule, NueDisplayModule, ParticleDisplay, PulserDBModule, PulserSummaryModule, and RotoClientModule. Definition at line 87 of file JobCModule.cxx. References GetName(), and MSG. Referenced by JobCDisplayModule::BeginRun(). 00088 {
00089 MSG("JobC",Msg::kDebug) <<
00090 "JobCModule::BeginRun for module " << this->GetName() << "\n";
00091 }
|
|
|
Implement to handle a command Reimplemented in JobCInput. Definition at line 224 of file JobCModule.cxx. References HandleCommand(). Referenced by attach_mrcc_path(), attach_mrcc_path_far(), attach_mrcc_path_near(), set_cand_output_bntp(), set_ntpst_output_bntp(), set_ntpst_output_bntpsa(), SetCandOutputNoBNtp(), SetCandOutputWithBNtp(), SetNtpStOutputNoBNtp(), and SetNtpStOutputWithBNtp(). 00225 {
00226 //======================================================================
00227 // Pass commands through like this for now...
00228 //======================================================================
00229 JobCommand c(cmd);
00230 this->HandleCommand(&c);
00231 }
|
|
|
|
|
Implement for notification of end of file. See GetLastFile(). Reimplemented in BeamMonDbuModule, BeamMonSwicPedsDbuModule, BDataQualityModule, CDFMonitoringModule, BDTestDataModule, AutoPIDMaker, Cluster3DModule, DbuDaqFileModule, HistManModule, SleepModule, JobCDisplayModule, JobCInput, JobCRootCommandModule, JobCDemoModuleA, FiltMBSpillModule, FiltCosmicModule, RemoveMuon, MCMonitorBeam, MCMonitorCosmic, PulserDBModule, and RotoClientModule. Definition at line 80 of file JobCModule.cxx. References GetName(), and MSG. Referenced by JobCDisplayModule::EndFile(). 00080 {
00081 MSG("JobC",Msg::kDebug) <<
00082 "JobCModule::EndFile for module " << this->GetName() << "\n";
00083 }
|
|
|
|
Implement for notification of end of run (meaningful for Daq data only). See GetLastRun(). Reimplemented in AutoPIDMaker, Cluster3DModule, DbuDaqFileModule, SleepModule, GenieModule, JobCDisplayModule, JobCInput, JobCRootCommandModule, JobCDemoModuleA, FiltMBSpillModule, FiltCosmicModule, PulserDBModule, PulserSummaryModule, and RotoClientModule. Definition at line 95 of file JobCModule.cxx. References GetName(), and MSG. Referenced by JobCDisplayModule::EndRun(). 00096 {
00097 MSG("JobC",Msg::kDebug) <<
00098 "JobCModule::EndRun for module " << this->GetName() << "\n";
00099 }
|
|
|
|
|
Return the currently opened input file. This should not be overridden. Use this in BeginFile(). Reimplemented in IoInputModule, JobCInput, and JobCInputModule. Definition at line 138 of file JobCModule.cxx. References JobCInputModule::GetCurrentFile(), and GetJobCInputModule(). Referenced by NueHandScan::Ana(), SleepModule::BeginFile(), JobCRootCommandModule::BeginFile(), DbuDaqFileModule::BeginFile(), BeamMonSwicPedsDbuModule::BeginFile(), BeamMonDbuModule::BeginFile(), BDTestDataModule::BeginFile(), SleepModule::EndFile(), and DbuDaqFileModule::EndFile(). 00139 {
00140 JobCInputModule* m = GetJobCInputModule();
00141 if (!m) return "";
00142 return m->GetCurrentFile(streamname);
00143 }
|
|
|
Return the current run #. This should not be overridden. Use this in BeginRun(). Reimplemented in LightInjector, IoInputModule, JobCInput, and JobCInputModule. Definition at line 122 of file JobCModule.cxx. References JobCInputModule::GetCurrentRun(), and GetJobCInputModule(). Referenced by JobCRootCommandModule::BeginRun(), DbuDaqFileModule::BeginRun(), and DbuDaqFileModule::EndRun(). 00123 {
00124 JobCInputModule* m = GetJobCInputModule();
00125 if (!m) return -1;
00126 return m->GetCurrentRun();
00127 }
|
|
|
Definition at line 103 of file JobCModule.cxx. References fName, fPath, JobCPath::GetInputModule(), and MSG. Referenced by GetCurrentFile(), GetCurrentRun(), GetLastFile(), and GetLastRun(). 00104 {
00105 if (!fPath) {
00106 MSG("JobC",Msg::kWarning)
00107 << fName << " has no associated JobCPath" << endl;
00108 return 0;
00109 }
00110 JobCInputModule* m = fPath->GetInputModule();
00111 if (!m) {
00112 MSG("JobC",Msg::kWarning)
00113 << "the associated path for " << fName
00114 << " has no input module" << endl;
00115 return 0;
00116 }
00117 return m;
00118 }
|
|
|
Return the previously opened input file. This should not be overridden. Use this in EndFile(). Reimplemented in IoInputModule, JobCInput, and JobCInputModule. Definition at line 145 of file JobCModule.cxx. References GetJobCInputModule(), and JobCInputModule::GetLastFile(). Referenced by JobCRootCommandModule::EndFile(). 00146 {
00147 JobCInputModule* m = GetJobCInputModule();
00148 if (!m) return "";
00149 return m->GetLastFile(streamname);
00150 }
|
|
|
Return the previous run #. This should not be overridden. Use this in EndRun(). Reimplemented in IoInputModule, JobCInput, and JobCInputModule. Definition at line 129 of file JobCModule.cxx. References GetJobCInputModule(), and JobCInputModule::GetLastRun(). Referenced by JobCRootCommandModule::EndRun(). 00130 {
00131 JobCInputModule* m = GetJobCInputModule();
00132 if (!m) return -1;
00133 return m->GetLastRun();
00134 }
|
|
|
|
Definition at line 174 of file JobCModule.h. 00174 { return fPath; }
|
|
|
Definition at line 50 of file JobCModule.cxx. References fConfig, and Registry::Get(). Referenced by JobCRootCommandModule::Ana(), JobCRootCommandModule::BeginFile(), JobCRootCommandModule::BeginJob(), JobCRootCommandModule::BeginRun(), JobCRootCommandModule::EndFile(), JobCRootCommandModule::EndJob(), JobCRootCommandModule::EndRun(), HistManModule::GetHistMan(), and JobCRootCommandModule::Reco(). 00051 {
00052 const char* name=0;
00053 if (!fConfig.Get("UniqueName",name)) return 0;
00054 return name;
00055 }
|
|
|
|
|
Definition at line 27 of file JobCModule.cxx. References Config(), DefaultConfig(), fName, GetConfig(), Registry::LockKeys(), and Registry::UnLockValues(). 00028 {
00029 fName = name;
00030
00031 // Configure the module with the defaults
00032 // "=" doesn't affect the name of the registry...
00033 Registry r = this->DefaultConfig();
00034 this->GetConfig().UnLockValues();
00035 this->GetConfig() = r;
00036 this->GetConfig().SetName(r.GetName());
00037 this->Config(this->GetConfig());
00038
00039 this->GetConfig().LockKeys();
00040 }
|
|
|
Implement if your module needs to write data to some external sink. Reimplemented in Cluster3DModule, HistManModule, IoOutputModule, JobCDisplayModule, JobCRootCommandModule, and RotoClientModule. Definition at line 191 of file JobCModule.cxx. References gsMessage, and MSG. Referenced by JobCMethod::Execute(), and JobCDisplayModule::Put(). 00192 {
00193 //======================================================================
00194 // Purpose: Dummy Put method
00195 //======================================================================
00196 MSG("JobC", Msg::kError) << gsMessage << "'Put'\n";
00197 return JobCResult::kError;
00198 }
|
|
|
|
|
Implement to reset oneself Reimplemented in FillFarRunQuality, FillNearRunQuality, Cluster3DModule, JobCDisplayModule, JobCInput, JobCMsgModule, JobCPathModule, JobCRootCommandModule, JobCRootModule, JobCDemoModuleB, FiltMBSpillModule, FiltCosmicModule, AnaTrim, ParticleAna, ParticleFinder, ParticleReport, ParticleTruthMaker, ParticlePIDSaver, PIDEval, and NueReweight. Definition at line 274 of file JobCModule.cxx. References Config(). Referenced by JobCDisplayModule::Reset(). 00275 {
00276 // Reset restores the module to its original configuration
00277 this->Config(this->DefaultConfig());
00278 }
|
|
|
Definition at line 307 of file JobCModule.cxx. References Config(), GetConfig(), Registry::LockValues(), Registry::Merge(), JobCDialog::Querry(), JobCDialog::SetCurrent(), JobCDialog::SetDefault(), and Registry::UnLockValues(). 00308 {
00309 //======================================================================
00310 // Change the module's configuration using a dialog object
00311 //======================================================================
00312 bool deleted = false; // Delete dialog it before return?
00313 if (d == 0) {
00314 d = new JobCDialog();
00315 deleted = true;
00316 }
00317
00318 // Set up d with the module's configuration parameters
00319 d->SetDefault(this->DefaultConfig());
00320 d->SetCurrent(this->GetConfig());
00321
00322 // Do the querry...
00323 Registry r = d->Querry();
00324
00325 // Set the module config
00326 this->GetConfig().UnLockValues();
00327 this->GetConfig().Merge(r);
00328 this->GetConfig().LockValues();
00329
00330 this->Config(this->GetConfig());
00331
00332 // Clean up
00333 if (deleted) { delete d; d=0; }
00334 }
|
|
|
|
Definition at line 175 of file JobCModule.h. Referenced by JobCPath::GetModule(). 00175 { fPath = path; }
|
|
|
Definition at line 337 of file JobCModule.cxx. References fConfig, Registry::KeyExists(), Registry::KeysLocked(), Registry::LockKeys(), Registry::Set(), and Registry::UnLockKeys(). Referenced by JobCPath::SetUniquePaths(). 00338 {
00339 if (fConfig.KeyExists("UniqueName")) return false;
00340 bool locked = fConfig.KeysLocked();
00341 fConfig.UnLockKeys();
00342 fConfig.Set("UniqueName",name);
00343 if (locked) fConfig.LockKeys();
00344 return true;
00345 }
|
|
|
Reimplemented in AlignmentModule, BeamMonBaseModule, SetKNNModule, FillDataModule, and TestDataModule. Definition at line 182 of file JobCModule.h. Referenced by GetUniqueName(), and SetUniqueName(). |
|
|
Reimplemented in FillNearRunQuality. Definition at line 181 of file JobCModule.h. Referenced by GetJobCInputModule(), GetName(), and Init(). |
|
|
Reimplemented in SetKNNModule. Definition at line 183 of file JobCModule.h. Referenced by GetJobCInputModule(). |
1.3.9.1