Public Member Functions | |
| PlotAllPedsImp () | |
| bool | Update () |
Public Attributes | |
| TCanvas | canvas |
| TH1F * | swicpeds [15] |
| map< string, TH1F * > | hists |
| DbiResultPtr< BeamMonSwicPeds > | drp |
|
|
Definition at line 40 of file PlotAllPeds.cxx. References Form(), and BDDevices::SwicDevices(). 00040 : canvas("canvas","All Peds",1000,600) 00041 { 00042 canvas.Divide(5,3); 00043 vector<string> swicnames = BDDevices::SwicDevices(); 00044 size_t siz = swicnames.size(); 00045 for (size_t ind=0;ind<siz;++ind) { 00046 canvas.cd(ind+1); 00047 string name = Form("peds%02d",ind); 00048 string title = Form("Peds for %s",swicnames[ind].c_str()); 00049 swicpeds[ind] = new TH1F(name.c_str(),title.c_str(),96,0,96); 00050 hists[swicnames[ind]] = swicpeds[ind]; 00051 swicpeds[ind]->Draw(); 00052 cerr << ind << ": " << name << ", " << title << endl; 00053 } 00054 swicpeds[14] = 0; 00055 }
|
|
|
Definition at line 61 of file PlotAllPeds.cxx. References canvas, drp, BeamMonSwicPeds::GetDeviceName(), BeamMonSwicPeds::GetMeans(), BeamMonSwicPeds::GetNsamples(), DbiResultPtr< T >::GetNumRows(), DbiResultPtr< T >::GetRow(), BeamMonSwicPeds::GetSigmas(), hists, and swicpeds. Referenced by PlotAllPeds::Next(), PlotAllPeds::Prev(), and PlotAllPeds::Start(). 00062 {
00063 for (int ind=0; ind<14; ++ind)
00064 swicpeds[ind]->Reset("ICE");
00065 int nrows = drp.GetNumRows();
00066 for (int ind=0; ind<nrows; ++ind) {
00067 const BeamMonSwicPeds* peds = drp.GetRow(ind);
00068 string name = peds->GetDeviceName();
00069 TH1F* h = hists[name];
00070 if (!h) {
00071 cerr << "Unknown SWIC: " << name << endl;
00072 continue;
00073 }
00074 int cut = 0;
00075 vector<float> means = peds->GetMeans();
00076 vector<float> sigmas = peds->GetSigmas();
00077
00078 for (int ch=0; ch<96; ++ch) {
00079 h->SetBinContent(ch+1,means[ch]);
00080 h->SetBinError(ch+1,sigmas[ch]);
00081 }
00082 cerr << name << ": cut " << cut << " channels of "
00083 << peds->GetNsamples() << " samples\n";
00084
00085 canvas.cd(ind+1);
00086 gPad->Modified();
00087 }
00088 canvas.cd();
00089 canvas.Modified();
00090 canvas.Update();
00091 return true;
00092 }
|
|
|
Definition at line 35 of file PlotAllPeds.cxx. Referenced by Update(). |
|
|
Definition at line 38 of file PlotAllPeds.cxx. Referenced by PlotAllPeds::Next(), PlotAllPeds::Prev(), PlotAllPeds::Start(), and Update(). |
|
|
Definition at line 37 of file PlotAllPeds.cxx. Referenced by Update(). |
|
|
Definition at line 36 of file PlotAllPeds.cxx. Referenced by Update(). |
1.3.9.1