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

Public Member Functions | |
| TimeCalScheme () | |
| virtual void | DoReset (const VldContext &context) |
| virtual void | ConfigModified () |
| virtual void | PrintConfig (std::ostream &os) const |
| virtual DoubleErr | GetCalibratedTime (DoubleErr rawtime, FloatErr, const PlexStripEndId &seid) const |
| virtual DoubleErr | DecalTime (DoubleErr caltime, FloatErr, const PlexStripEndId &seid) const |
Private Member Functions | |
| ClassDef (TimeCalScheme, 1) | |
Private Attributes | |
| DbiResultPtr< CalTimeCalibration > | fResPtr |
|
|
Definition at line 20 of file TimeCalScheme.cxx. 00021 {
00022 Registry r;
00023 // No configurable options.
00024 InitializeConfig(r);
00025 }
|
|
||||||||||||
|
|
|
|
Reimplemented from CalScheme. Definition at line 44 of file TimeCalScheme.cxx. 00045 {
00046 // No configurable options.
00047 }
|
|
||||||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Go from calibrated time to raw time Input: True time Raw charge Strip end Output: Raw, uncalibrated time. Must be implimented by: TimeCalibrator Reimplemented from CalScheme. Definition at line 90 of file TimeCalScheme.cxx. References PlexStripEndId::BuildPlnStripEndKey(), DoubleErr, FloatErr, fResPtr, DbiResultPtr< T >::GetNumRows(), CalTimeCalibration::GetOffset(), DbiResultPtr< T >::GetRowByIndex(), CalTimeCalibration::GetScale(), CalScheme::IncrementErrors(), and MAXMSG. 00093 {
00107
00108 // Now need to get the row which corresponds to the stripendnum.
00109 const CalTimeCalibration* dpgc = fResPtr.GetRowByIndex(seid.BuildPlnStripEndKey());
00110
00111 if(dpgc==0) {
00112 // Print warning message / log errors if-and-only-if the table is not empty:
00113 if(fResPtr.GetNumRows()>0) {
00114 MAXMSG("Calib",Msg::kWarning,10)
00115 << "TimeCalScheme: No database row for StripEnd " << seid.BuildPlnStripEndKey() << "\n";
00116
00117 IncrementErrors(kTimeCalibrator,kMissingRow,seid);
00118 }
00119
00120 return caltime + FloatErr(0,50*Munits::ns); // Add error of 50ns, since we really don't know.;
00121 }
00122
00123 // No inverse function exists in the row function, so I'll kludge one here.
00124 // NJT 7/04
00125 return (caltime + (double)dpgc->GetOffset())*(double)dpgc->GetScale();
00126 }
|
|
|
Reimplemented from CalScheme. Definition at line 29 of file TimeCalScheme.cxx. References VldContext::AsString(), fResPtr, DbiResultPtr< T >::GetNumRows(), CalScheme::IncrementErrors(), MAXMSG, MSG, and DbiResultPtr< T >::NewQuery(). 00030 {
00031 MSG("Calib",Msg::kVerbose) << "TimeCalScheme::DoReset()" << endl;
00032
00033 fResPtr.NewQuery(context,0);
00034
00035 if(fResPtr.GetNumRows()==0) {
00036 MAXMSG("Calib",Msg::kWarning,10)
00037 << "No rows in database table with validity context "
00038 << context.AsString() << " No calibration will be applied." << endl;
00039 IncrementErrors(kTimeCalibrator,kMissingTable);
00040 }
00041 }
|
|
||||||||||||||||
|
Purpose: Apply time calibration In: raw time in seconds raw charge strip end Out: calibrated time. Must be implimented by: TimeCalibrator Reimplemented from CalScheme. Definition at line 57 of file TimeCalScheme.cxx. References PlexStripEndId::AsString(), PlexStripEndId::BuildPlnStripEndKey(), DoubleErr, FloatErr, fResPtr, DbiResultPtr< T >::GetNumRows(), DbiResultPtr< T >::GetRowByIndex(), CalTimeCalibration::GetTime(), CalScheme::IncrementErrors(), and MAXMSG. 00060 {
00072
00073 // Now need to get the row which corresponds to the stripendnum.
00074 const CalTimeCalibration* dpgc = fResPtr.GetRowByIndex(seid.BuildPlnStripEndKey());
00075
00076 if(dpgc==0) {
00077 if(fResPtr.GetNumRows()>0) {
00078 MAXMSG("Calib",Msg::kWarning,10)
00079 << "TimeCalScheme: No database row for StripEnd " << seid.AsString() << "\n";
00080
00081 IncrementErrors(kTimeCalibrator,kMissingRow,seid);
00082 }
00083 return rawtime + FloatErr(0,50*Munits::ns); // Add error of 50ns, since we really don't know.
00084 }
00085 return dpgc->GetTime(rawtime);
00086 }
|
|
|
Prints out the current configuration status Should be overridden by implimentation. Reimplemented from CalScheme. Definition at line 50 of file TimeCalScheme.cxx. 00051 {
00052 // Nothing to print.
00053 }
|
|
|
Definition at line 29 of file TimeCalScheme.h. Referenced by DecalTime(), DoReset(), and GetCalibratedTime(). |
1.3.9.1