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

Public Member Functions | |
| BDSpliceModule () | |
| virtual | ~BDSpliceModule () |
| const Registry & | DefaultConfig () const |
| void | Config (const Registry &r) |
| JobCResult | Ana (const MomNavigator *mom) |
Private Attributes | |
| VldTimeStamp | fBegin |
| VldTimeStamp | fEnd |
This simply fails all records outside of a configured time range. It has these configuration parameters:
BeginTime: unix epoc seconds of begin of accepted time range (def: 0) EndTime: unix epoc seconds of end of accepted time range (def: -1)
For human readable setting do something like:
VldTimeStamp begin(2005,1,1, 12,30,0);
and use begin.GetSec().
Remeber, times are all in UTC.
Created on: Wed Aug 3 10:02:00 2005
Definition at line 42 of file BDSpliceModule.h.
|
|
Definition at line 11 of file BDSpliceModule.cxx.
|
|
|
Definition at line 17 of file BDSpliceModule.cxx. 00018 {
00019 }
|
|
|
Implement this for read only access to the MomNavigator Reimplemented from JobCModule. Definition at line 41 of file BDSpliceModule.cxx. References JobCResult::Failed(), RawBeamMonHeaderBlock::GetTimeStamp(), MSG, and JobCResult::Passed(). 00042 {
00043 static bool inrange = false;
00044
00045 const RawBeamMonHeaderBlock* header =
00046 DataUtil::GetRawBlock<RawBeamMonHeaderBlock>(mom);
00047
00048 if (!header) {
00049 MSG("BDSpliceModule",Msg::kWarning)
00050 << "No RawBeamMonHeaderBlock, failing record\n";
00051 return JobCResult::kFailed;
00052 }
00053
00054 VldTimeStamp now = header->GetTimeStamp();
00055
00056 JobCResult pf = JobCResult::kPassed;
00057
00058 if (now < fBegin) pf = JobCResult::kFailed;
00059 if (now > fEnd) pf = JobCResult::kFailed;
00060
00061 if (inrange && pf.Failed()) {
00062 MSG("BDSpliceModule",Msg::kInfo)
00063 << "Leaving range at " << now << endl;
00064 }
00065 if (!inrange && pf.Passed()) {
00066 MSG("BDSpliceModule",Msg::kInfo)
00067 << "Entering range at " << now << endl;
00068 }
00069 if (pf.Passed()) inrange = true;
00070 else inrange = false;
00071
00072 return pf;
00073 }
|
|
|
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 32 of file BDSpliceModule.cxx. References fBegin, fEnd, Registry::Get(), and VldTimeStamp::GetSec(). 00033 {
00034 int t;
00035 if (cfg.Get("BeginTime",t) && t != fBegin.GetSec())
00036 fBegin = VldTimeStamp(t);
00037 if (cfg.Get("EndTime",t) && t != fEnd.GetSec())
00038 fEnd = VldTimeStamp(t);
00039 }
|
|
|
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 22 of file BDSpliceModule.cxx. References Form(), Registry::Set(), and Registry::Size(). 00023 {
00024 static Registry r;
00025 if (r.Size()) return r;
00026 r.Set("BeginTime",0);
00027 r.Set("EndTime",(int)((time_t)-1));
00028 r.SetName(Form("%s.config.default",this->JobCModule::GetName()));
00029 return r;
00030 }
|
|
|
Definition at line 44 of file BDSpliceModule.h. Referenced by Config(). |
|
|
Definition at line 44 of file BDSpliceModule.h. Referenced by Config(). |
1.3.9.1