#include <PulserTimePlotter.h>
Public Member Functions | |
| PulserTimePlotter (VldContext vc) | |
| virtual | ~PulserTimePlotter () |
| TGraphErrors * | CreateGraph (PlexLedId &led, int gain) |
Private Attributes | |
| VldContext | fStartVC |
| VldContext | fVC |
| PlexHandle | fPlex |
|
|
Definition at line 39 of file PulserTimePlotter.cxx.
|
|
|
Definition at line 45 of file PulserTimePlotter.cxx. 00046 {
00047
00048 }
|
|
||||||||||||
|
Definition at line 50 of file PulserTimePlotter.cxx. References fPlex, fStartVC, VldRange::GetDetectorMask(), PulserRawDriftPin::GetError(), PulserRawDriftPin::GetMean(), DbiResultPtr< T >::GetNumRows(), PlexHandle::GetPinDiodeIds(), DbiResultPtr< T >::GetRowByIndex(), VldTimeStamp::GetSec(), VldRange::GetSimMask(), DbiValidityRec::GetTask(), VldRange::GetTimeEnd(), VldRange::GetTimeStart(), DbiResultPtr< T >::GetValidityRec(), DbiValidityRec::GetVldRange(), DbiResultPtr< T >::NewQuery(), and SimFlag::SimFlag_t. 00051 {
00052 vector<float> mean;
00053 vector<float> error;
00054 vector<float> secs;
00055 int sec;
00056 // Find the correct PIN diode, pull it from the DB.
00057 std::pair<PlexPinDiodeId,PlexPinDiodeId> pinids =
00058 fPlex.GetPinDiodeIds(led);
00059 const PulserRawDriftPin *pin;
00060 DbiResultPtr<PulserRawDriftPin> pinRP(fStartVC);
00061 for (;;) {
00062 cout<<"In loop "<<*(pinRP.GetValidityRec())<<endl;
00063 if (pinRP.GetNumRows()>0) {
00064 switch (gain) {
00065 case 0:
00066 pin = pinRP.GetRowByIndex(pinids.second.GetEncoded());
00067 break;
00068 case 1:
00069 pin = pinRP.GetRowByIndex(pinids.first.GetEncoded());
00070 break;
00071 default:
00072 cout<<"You asked for non-existent gain "<<gain<<endl;
00073 return 0;
00074 }
00075 if (!pin) {
00076 cout<<"Couldn't get PIN data for gain "<<gain<<" of led "<<led<<endl;
00077 return 0;
00078 }
00079 cout<<pin->GetMean()<<" "<<pin->GetError()<<endl;
00080 mean.push_back(pin->GetMean());
00081 error.push_back(pin->GetError());
00082 sec = pinRP.GetValidityRec()->GetVldRange().GetTimeStart().GetSec();
00083 secs.push_back(sec);
00084 }
00085 // if (pinRP.NextQuery()==0) break;
00086 int ntime = pinRP.GetValidityRec()->GetVldRange().GetTimeEnd().GetSec() + 1;
00087 VldContext v(Detector::Detector_t(pinRP.GetValidityRec()->GetVldRange().GetDetectorMask()),
00088 SimFlag::SimFlag_t(pinRP.GetValidityRec()->GetVldRange().GetSimMask()),
00089 VldTimeStamp(ntime,0));
00090 cout<<v<<endl;
00091 if (pinRP.NewQuery(v,pinRP.GetValidityRec()->GetTask())==0) break;
00092 }
00093 TGraphErrors *g = new TGraphErrors(mean.size(),&(secs[0]),0,&(mean[0]),&(error[0]));
00094 return g;
00095 }
|
|
|
Definition at line 40 of file PulserTimePlotter.h. Referenced by CreateGraph(). |
|
|
Definition at line 38 of file PulserTimePlotter.h. Referenced by CreateGraph(). |
|
|
Definition at line 39 of file PulserTimePlotter.h. |
1.3.9.1