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

Public Member Functions | |
| Summarizer () | |
| ~Summarizer () | |
| void | Summarize (VldContext start=VldContext(Detector::kFar, SimFlag::kData, VldTimeStamp(0, 0))) |
| virtual void | SummarizePoint (VldContext vldPointStart, VldContext vldPoint) |
Private Member Functions | |
| VldContext | FindNextContext (VldContext start) |
Definition at line 13 of file Summarizer.h.
|
|
Definition at line 17 of file Summarizer.cxx. 00018 {
00019 }
|
|
|
Definition at line 21 of file Summarizer.cxx. 00022 {
00023 }
|
|
|
Definition at line 25 of file Summarizer.cxx. References VldTimeStamp::AsString(), Form(), VldContext::GetDetector(), VldContext::GetSimFlag(), VldContext::GetTimeStamp(), VldRange::GetTimeStart(), DbiResultPtr< T >::GetValidityRec(), and DbiValidityRec::GetVldRange(). Referenced by Summarize(). 00026 {
00027 // Find the first valid context after 'start'.
00028
00029
00030 const char* sqltxt = Form("(TIMESTART>'%s') and (TASK=%d) and (AGGREGATENO=%d) and (DETECTORMASK & %d) and (SIMMASK & %d) order by TIMESTART asc limit 1",
00031 start.GetTimeStamp().AsString("s"),
00032 Pulser::kNearEnd,
00033 1, // agg
00034 start.GetDetector(),
00035 start.GetSimFlag() );
00036
00037 DbiSqlContext myContext(sqltxt);
00038
00039 DbiResultPtr<PulserDrift> resPtr("PULSERDRIFT",myContext);
00040 VldTimeStamp ts= resPtr.GetValidityRec()->GetVldRange().GetTimeStart();
00041
00042 VldContext cx(start.GetDetector(),start.GetSimFlag(),ts);
00043 return cx;
00044 }
|
|
|
Definition at line 46 of file Summarizer.cxx. References VldTimeStamp::Add(), FindNextContext(), VldContext::GetDetector(), VldContext::GetSimFlag(), VldContext::GetTimeStamp(), and SummarizePoint(). 00047 {
00048 // Find the first dirft point:
00049 VldContext next = FindNextContext(start);
00050
00051 VldTimeStamp end;
00052 end.Add(-1.0*Munits::hour); // 1 hour ago.
00053
00054 while(next.GetTimeStamp()<end) {
00055 // Move forward 2.5 hours to get to end of drift point.
00056 VldTimeStamp pointts = next.GetTimeStamp();
00057
00058 if(start.GetDetector()==Detector::kFar)
00059 pointts.Add(2.5*Munits::hour);
00060 else
00061 pointts.Add(0.9*Munits::hour);
00062
00063 VldContext point(next.GetDetector(),
00064 next.GetSimFlag(),
00065 pointts);
00066
00067 // Now actually do the job.
00068
00069 SummarizePoint(next,point);
00070
00071 next = FindNextContext(next);
00072 };
00073
00074 }
|
|
||||||||||||
|
Reimplemented in PhotonStatSummarizer. Definition at line 77 of file Summarizer.cxx. References VldContext::AsString(). Referenced by Summarize(). 00080 {
00081 std::cout << "Summarizer called:" << endl;
00082 std::cout << vldPointStart.AsString() << " " << vldPoint.AsString() << std::endl;
00083 }
|
1.3.9.1