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

Public Member Functions | |
| DDSPaceModule () | |
| ~DDSPaceModule () | |
| const Registry & | DefaultConfig () const |
| void | Config (const Registry &r) |
| JobCResult | Ana (const MomNavigator *mom) |
Private Attributes | |
| VldTimeStamp | fVldStartTime |
| TStopwatch | fStopwatch |
|
|
Definition at line 40 of file DDSPaceModule.cxx. 00040 : fVldStartTime(0,0) { 00041 // Default constructor 00042 00043 fStopwatch.Reset(); 00044 fStopwatch.Stop(); 00045 00046 }
|
|
|
Definition at line 23 of file DDSPaceModule.h. 00023 {}
|
|
|
Implement this for read only access to the MomNavigator Reimplemented from JobCModule. Definition at line 93 of file DDSPaceModule.cxx. References MomNavigator::FragmentIter(), fStopwatch, fVldStartTime, VldTimeStamp::GetSec(), VldContext::GetTimeStamp(), RecMinos::GetVldContext(), gSystem(), MSG, JobCResult::SetFailed(), and JobCResult::SetWarning(). 00093 {
00094 //
00095 // Purpose: Create and fill ntuple record.
00096 //
00097 // Arguments: mom.
00098 //
00099 // Return: status.
00100 //
00101
00102 JobCResult result(JobCResult::kPassed);
00103 MSG("DDSPace",Msg::kDebug) << "DDSPaceModule::Ana" << endl;
00104
00105 // Check that mom exists.
00106 assert(mom);
00107
00108 // Blindly look at first record, this module is very simple
00109 // Assumption is that its only of interest to RawRecords with RecMinos base
00110 TIter fiter = mom->FragmentIter();
00111 RecMinos* record = dynamic_cast<RecMinos*>(fiter());
00112 if ( !record ) {
00113 MSG("DDS",Msg::kWarning) << "First record not RecMinos record" << endl;
00114 result.SetWarning().SetFailed();
00115 return result;
00116 }
00117 VldTimeStamp vldCurrentTime = record->GetVldContext()->GetTimeStamp();
00118
00119 if ( fVldStartTime.GetSec() == 0 ) {
00120 // first call
00121 fVldStartTime = vldCurrentTime;
00122 fStopwatch.Start(); // start timer
00123 }
00124
00125 Double_t vldtimediff = vldCurrentTime-fVldStartTime; // seconds
00126 Double_t realtime = fStopwatch.RealTime(); // seconds
00127 // RealTime will stop it, need to restart w/o resetting
00128 fStopwatch.Start(false);
00129
00130 Double_t timediff = vldtimediff - realtime;
00131 MSG("DDS",Msg::kDebug) << "Delta VldTime " << vldtimediff
00132 << " RealTime " << realtime << " => sleep for "
00133 << timediff << " seconds." << endl;
00134
00135 if ( timediff > 0 ) {
00136 // Sleep for specified length of time in msec
00137 gSystem->Sleep((Int_t)(timediff*1000));
00138 }
00139
00140
00141 return result;
00142
00143 }
|
|
|
Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables. Reimplemented from JobCModule. Definition at line 74 of file DDSPaceModule.cxx. References MSG. 00074 {
00075 //
00076 // Purpose: Configure the module given a registry.
00077 //
00078 // Arguments: Registry to use to configure the module.
00079 //
00080 // Return: none.
00081 //
00082
00083 MSG("DDSPace",Msg::kDebug) << "DDSPaceModule::Config" << endl;
00084
00085 //Int_t tmpi;
00086 // Double_t tmpd;
00087 // const Char_t* tmps;
00088
00089 }
|
|
|
Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like: const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; } Reimplemented from JobCModule. Definition at line 49 of file DDSPaceModule.cxx. References JobCModule::GetName(), Registry::LockValues(), MSG, and Registry::UnLockValues(). 00049 {
00050 //
00051 // Purpose: Method to return default configuration.
00052 //
00053 // Arguments: none.
00054 //
00055 // Return: Registry containing default configuration
00056 //
00057
00058 MSG("DDSPace",Msg::kDebug) <<
00059 "DDSPaceModule::DefaultConfig" << endl;
00060
00061 static Registry r;
00062 std::string name = this->JobCModule::GetName();
00063 name += ".config.default";
00064 r.SetName(name.c_str());
00065
00066 r.UnLockValues();
00067 r.LockValues();
00068
00069 return r;
00070 }
|
|
|
Definition at line 35 of file DDSPaceModule.h. Referenced by Ana(). |
|
|
Definition at line 34 of file DDSPaceModule.h. Referenced by Ana(). |
1.3.9.1