#include <iostream>#include <fstream>#include <iosfwd>#include <unistd.h>#include <vector>#include "TCanvas.h"#include "TChain.h"#include "TGaxis.h"#include "TCut.h"#include "TError.h"#include "TFile.h"#include "TH2.h"#include "THStack.h"#include "TObject.h"#include "TLegend.h"#include "TPaveText.h"#include "TProfile.h"#include "TROOT.h"#include "TString.h"#include "TStyle.h"#include "TTimeStamp.h"#include "TTree.h"#include "TMath.h"#include "TClonesArray.h"#include "RSM.h"#include "UtilRSM.h"#include "TPSinglesEvent.h"#include "DaqSnarlEvent.h"#include "MessageService/MsgService.h"#include "Util/UtilString.h"Go to the source code of this file.
Functions | |
| CVSID ("$Id: rate_plot.cc,v 1.34 2007/10/22 22:42:54 bspeak Exp $") | |
| TCanvas * | crate4_disp (const char *ptitle) |
| TCanvas * | crate2_disp (const char *ptitle) |
| TCanvas * | single_disp (const char *ptitle) |
| void | tp_plot (TTree *tprates) |
| void | tp_crate_plot (TTree *tprates, const int Crate) |
| void | tp_vmm_plot (TTree *tprates, const int Crate, const int Varc, const int Vmm) |
| void | ds_plot (TTree *dsrates) |
| void | ds_crate_plot (TTree *dsrates, const int Crate) |
| void | ds_vmm_plot (TTree *dsrates, const int Crate, const int Varc, const int Vmm) |
| void | time_range (TTree *rates) |
| Double_t | run_time (TH1 *rthisto, Double_t OptSignal, bool Quell=false, TH1 *fillhisto=0, double *rtsigma=0) |
| void | set_style () |
| void | usage () |
| int | main (int argc, char **argv) |
Variables | |
| int | loud = 0 |
| bool | DryRun = false |
| Bool_t | root_files = true |
| Double_t | time_mult = 3600. |
| string | time_str = "hours" |
| Int_t | ZoneDiff = 0 |
| string | ZoneStr = " (UTC)" |
| bool | ZoneUTC = true |
| Int_t | LocalOffset = 0 |
| string | LocalOffsetStr = "" |
| Double_t | MinX |
| Double_t | MaxX |
| Double_t | FirstFrame |
| Double_t | MinTime |
| Double_t | MaxTime |
| TTimeStamp * | ZeroTime |
| TTimeStamp * | BegTime |
| TTimeStamp * | EndTime |
| string | ZeroStr |
| string | BegStr |
| string | EndStr |
| Int_t | bin_con = 0 |
| Int_t | WeeklyZeroDate = 1 |
| Double_t | bin_mult = 3600. |
| string | bin_str = "hour" |
| Int_t | bin_width = 1 |
| Int_t | NBins = 0 |
| vector< int > | fRunNum |
| Int_t | fSignalADC = 2000 |
| Int_t | fSMPlaneLimit = 16 |
| Int_t | fBlPlaneLimit = 16 |
| Int_t | fPlaneLimit = 16 |
| Double_t | fOptSMSignal = 0.18 |
| Double_t | fOptBlSignal = 0.31 |
| Double_t | fOptSignal = 0.68 |
| string | chain_title = "" |
| string | NameBase = "rates" |
| bool | AllowPulsed = false |
| bool | AllowShield = true |
|
|
Definition at line 1946 of file rate_plot.cc. References loud. Referenced by ds_vmm_plot(), and tp_vmm_plot(). 01947 {
01948 if(loud>=2) cout << "Making crate2 Canvas\n";
01949
01950 TCanvas *canv = new TCanvas(ptitle,ptitle,930,750);
01951 canv->Range(0.0,0.0,1.0,1.0);
01952 canv->SetGridx(0);
01953 canv->SetGridy(0);
01954 canv->SetFrameFillColor(0);
01955
01956 TPad *drawpad;
01957 if(!(drawpad=(TPad*)gROOT->Get("drawpad")))
01958 drawpad = new TPad("drawpad","Drawing Pad",0,0,1,0.9);
01959 drawpad->SetGridx(0);
01960 drawpad->SetGridy(0);
01961 drawpad->SetFrameFillColor(0);
01962 drawpad->Divide(1,2, 0.001, 0.001);
01963 drawpad->Draw();
01964
01965 return canv;
01966 }
|
|
|
Definition at line 1924 of file rate_plot.cc. References loud. Referenced by tp_plot(). 01925 {
01926 if(loud>=2) cout << "Making crate4 Canvas\n";
01927
01928 TCanvas *canv = new TCanvas(ptitle,ptitle,930,750);
01929 canv->Range(0.0,0.0,1.0,1.0);
01930 canv->SetGridx(0);
01931 canv->SetGridy(0);
01932 canv->SetFrameFillColor(0);
01933
01934 TPad *drawpad;
01935 if(!(drawpad=(TPad*)gROOT->Get("drawpad")))
01936 drawpad = new TPad("drawpad","Drawing Pad",0,0,1,0.9);
01937 drawpad->SetGridx(0);
01938 drawpad->SetGridy(0);
01939 drawpad->SetFrameFillColor(0);
01940 drawpad->Divide(2,2, 0.001, 0.001);
01941 drawpad->Draw();
01942
01943 return canv;
01944 }
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 1420 of file rate_plot.cc. References loud, and time_range(). Referenced by main(). 01421 {
01422 if(loud>=1) cout << "ds_crate_plot for Crate" << Crate << endl;
01423
01424 time_range((TTree*)dsrates);
01425 /*
01426 TPad *drawpad = 0;
01427 TCanvas *rcan = 0;
01428 TPaveText *pl = 0;
01429 TProfile *rate_proj[2][3];
01430 string dsrates_base="DSVMM";
01431 dsrates_base += UtilString::ToString<int>(Crate);
01432 dsrates_base += "-";
01433 dsrates_base += UtilString::ToString<int>(Varc);
01434 dsrates_base += "-";
01435 dsrates_base += UtilString::ToString<int>(Vmm);
01436 dsrates_base += NameBase;
01437
01438 //Open a file if requested
01439 TFile *tf = 0;
01440 if (root_files) {
01441 tf = new TFile((dsrates_base+".root").c_str(),"RECREATE");
01442 tf->cd();
01443 }
01444
01445 rcan = crate2_disp("Init");
01446 rcan->Print((dsrates_base+".ps[").c_str());
01447 rcan->Close();
01448
01449 if(loud >= 1) cout << "Top Title for dsrates plot: " << chain_title << endl;
01450
01451 char names_list[2][16];
01452
01453 time_range((TTree*)dsrates);
01454
01455 Double_t MinRate, MaxRate;
01456 char hname[20];
01457 char htitle[30];
01458 for(int i=0;i<2;i++) for (int j=0;j<3;j++) {
01459 sprintf(hname,"rproj%d_%d",i,j);
01460 sprintf(htitle,"ADC %d Chip %d Rate",i,j);
01461 rate_proj[i][j] = new TProfile(hname,htitle,NBins,MinX,MaxX);
01462 }
01463
01464 DaqSnarlEvent *revt = 0;
01465 //dsrates->SetBranchStatus("*",0);
01466 //dsrates->SetBranchStatus("Time*",1);
01467 //dsrates->SetBranchStatus("ChipEvents",1);
01468 dsrates->SetBranchAddress("dsevt",&revt);
01469
01470 Int_t ientry = 0;
01471 while (dsrates->GetEntry(ientry++)) {
01472
01473 TClonesArray* chips = revt->ChipEvents;
01474 Double_t time_val = (revt->Time-ZeroTime->GetSec())/time_mult;
01475 for (int i=0;i<chips->GetLast();i++) {
01476 DSChipEvent *chip = dynamic_cast<DSChipEvent*>(chips->At(i));
01477 if(chip->IsLoc(Crate,Varc,Vmm) && chip->ADC != 0) {
01478 rate_proj[chip->GetVadc()][chip->GetVachip()]->Fill(time_val,chip->ADC);
01479 }
01480 }
01481 }
01482
01483 sprintf(names_list[0],"Vadc 0");
01484 sprintf(names_list[1],"Vadc 1");
01485
01486 TLegend *leg = 0;
01487 rcan = crate2_disp("Vmm");
01488 pl = new TPaveText(0,0.9,1,1);
01489 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
01490 else pl->AddText("RawDigit ADC");
01491 pl->AddText(Form("Vmm Profiles %d-%d-%d %s",Crate,Varc,Vmm,bin_str.c_str()));
01492 rcan->cd(0);
01493 pl->SetBorderSize(1);
01494 pl->Draw();
01495 char stats[40];
01496
01497 drawpad = dynamic_cast<TPad*>(rcan->FindObject("drawpad"));
01498 TH2D *prof_base[2];
01499 for (int i=0;i<2;i++) {
01500 MaxRate = -10;
01501 MinRate = 10000000;
01502 Double_t BinRate,BinErr;
01503 for (int j=0;j<3;j++) {
01504 for (int k=0;k<rate_proj[i][j]->GetNbinsX();k++) {
01505 BinRate = rate_proj[i][j]->GetBinContent(k);
01506 BinErr = rate_proj[i][j]->GetBinError(k);
01507 if(BinRate==0 && BinErr==0)
01508 continue;
01509 if(BinRate+BinErr > MaxRate)
01510 MaxRate = BinRate+BinErr;
01511 if(BinRate-BinErr < MinRate)
01512 MinRate = BinRate-BinErr;
01513 }
01514 }
01515 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01516 if (MaxRate-MinRate <= 0.002) {
01517 if(loud>=2) cout << "Adjusting Min and Max Rate for small range\n";
01518 MinRate = MinRate - 1.0;
01519 MaxRate = MaxRate + 1.0;
01520 }
01521 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01522 drawpad->cd(i+1);
01523 prof_base[i] = new TH2D(names_list[i],names_list[i],
01524 NBins,MinX,MaxX,50,MinRate,MaxRate);
01525 if(loud>=2) printf("Base Name = %s\n",names_list[i]);
01526 if(loud>=2) printf("BinsX=%d MinX=%f MaxX=%f\n",NBins,MinX,MaxX);
01527 if(loud>=2) printf("BinsY=%d MinY=%f MaxY=%f\n",50,MinRate,MaxRate);
01528
01529 string x_title;
01530 x_title = time_str + " since " + ZeroStr;
01531 prof_base[i]->GetXaxis()->SetTitle(x_title.c_str());
01532 prof_base[i]->GetXaxis()->CenterTitle();
01533 prof_base[i]->GetYaxis()->SetTitle("DaqSnarl ADC");
01534 prof_base[i]->GetYaxis()->CenterTitle();
01535 prof_base[i]->Draw();
01536 leg = new TLegend(0.55,0.875,1.0,1.0);
01537 leg->SetBorderSize(1);
01538 for (int j=0;j<3;j++) {
01539 rate_proj[i][j]->Draw("SAME");
01540 rate_proj[i][j]->SetLineColor(j+2);
01541 sprintf(stats,"Vachip %d Mean=%-6.2f RMS=%-4.4f",j,
01542 rate_proj[i][j]->GetMean(2),rate_proj[i][j]->GetRMS(2));
01543 leg->AddEntry(rate_proj[i][j],stats,"l");
01544 if(root_files) rate_proj[i][j]->Write();
01545 }
01546 leg->Draw();
01547
01548 if(root_files) prof_base[i]->Write();
01549 }
01550
01551 if(loud>=3) cout << "Printing Canvas\n";
01552 rcan->Print((dsrates_base+".ps").c_str());
01553
01554 if (root_files) {
01555 if(loud>=2) cout << "Writing THistos, TCanvases, and TChains\n";
01556 rcan->Write();
01557 dsrates->Write();
01558 }
01559 rcan->Close();
01560
01561 if(loud>=3) cout << "Printing Closing Canvas\n";
01562 rcan = crate2_disp("Fini");
01563 rcan->Print((dsrates_base+".ps]").c_str());
01564 rcan->Close();
01565
01566 if(loud>=3) cout << "Deleting histograms\n";
01567 for(int i=0;i<2;i++) for(int j=0;j<3;j++) rate_proj[i][j]->Delete();
01568 for(int i=0;i<2;i++) prof_base[i]->Delete();
01569
01570 if (root_files) {
01571 tf->Write();
01572 tf->Close();
01573 }
01574 */
01575 }
|
|
|
Definition at line 464 of file rate_plot.cc. References BegStr, bin_con, bin_str, chain_title, EndStr, fBlPlaneLimit, FirstFrame, fOptBlSignal, fOptSignal, fOptSMSignal, Form(), fSignalADC, fSMPlaneLimit, LocalOffset, LocalOffsetStr, loud, MaxTime, MaxX, MinTime, MinX, NBins, run_time(), single_disp(), time_mult, time_range(), time_str, ZeroStr, and ZeroTime. Referenced by main(). 00465 {
00466 if(loud>=1) cout << "Entering routine ds_plot" << endl;
00467 TPad *drawpad = 0;
00468 char leg_label[80];
00469 string dsrates_base="DS"+NameBase;
00470
00471 TCut BaseCut = "dsevt.Time>1";
00472 TCut ADCCut = Form("dsevt.PostTrigADC>=%d",fSignalADC);
00473
00474 //Open a file if requested
00475 TFile *tf = 0;
00476 ofstream tf_txt;
00477 if (root_files) {
00478 tf = new TFile((dsrates_base+".root").c_str(),"RECREATE");
00479 tf->cd();
00480 }
00481
00482 //Open postscript file
00483 TCanvas *rcan = single_disp("Init");
00484 rcan->Print((dsrates_base+".ps[").c_str());
00485 rcan->Close();
00486
00487 if(loud >= 1) cout << "Top Title for dsrates plot: " << chain_title << endl;
00488
00489 rcan = single_disp("evrate");
00490 rcan->cd();
00491
00492 TPaveText *pl = new TPaveText(0,0.9,1,1);
00493 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
00494 else pl->AddText("Far Detector");
00495 pl->AddText(("DaqSnarl Rates "+bin_str).c_str());
00496 rcan->cd(0);
00497 pl->SetBorderSize(1);
00498 pl->Draw();
00499
00500 drawpad = dynamic_cast<TPad*>(rcan->FindObject("drawpad"));
00501 drawpad->cd();
00502 drawpad->SetTicky(0);
00503 drawpad->SetRightMargin(0.01);
00504 drawpad->SetTopMargin(0.2);
00505
00506 time_range((TTree*)dsrates);
00507
00508 char varexp[50];
00509 if(dsrates->GetLeaf("Time"))
00510 sprintf(varexp,"(Time-%li)/%.1f",ZeroTime->GetSec(),time_mult);
00511 if(dsrates->GetLeaf("fTime"))
00512 sprintf(varexp,"(fTime-%li)/%.1f",ZeroTime->GetSec(),time_mult);
00513
00514 TH1F *base_hist = new TH1F("base_hist","",NBins,MinX,MaxX);
00515 dsrates->Project("base_hist",varexp,BaseCut);
00516
00517 TH1F *sm1phit = new TH1F("sm1phit","",NBins,MinX,MaxX);
00518 TH1F *sm2phit = new TH1F("sm2phit","",NBins,MinX,MaxX);
00519 TH1F *smhblk = new TH1F("smhblk","",NBins,MinX,MaxX);
00520 TH1F *ltime = new TH1F("ltime","",NBins,MinX,MaxX);
00521
00522 dsrates->Project("sm1phit",varexp,BaseCut&&ADCCut&&
00523 Form("SMPlanesHit[0] > %d",fSMPlaneLimit));
00524 dsrates->Project("sm2phit",varexp,BaseCut&&ADCCut&&
00525 Form("SMPlanesHit[1] > %d",fSMPlaneLimit));
00526 dsrates->Project("smhblk",varexp,BaseCut&&ADCCut&&
00527 Form("SMHitBlock > %d",fBlPlaneLimit));
00528
00529 //Calculate RunTime and Flag hyperactive detector
00530 Bool_t DetNeedsRitalin = false;//Say for 4*fOptSignal is crazy
00531 Double_t BinWidth = base_hist->GetBinWidth(-1);
00532
00533 int i=(int)((MinTime-MinX-FirstFrame)/BinWidth);
00534 Double_t BinSignal = base_hist->GetBinContent(i+1)/BinWidth;
00535 BinSignal = BinSignal/time_mult;
00536 BinSignal = BinSignal * BinWidth / (MinX+BinWidth*(i+1)-MinTime+FirstFrame);
00537 if (BinSignal > 4*fOptSignal) {
00538 DetNeedsRitalin=true;
00539 base_hist->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00540 BinSignal = 4*fOptSignal;
00541 if(sm1phit->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) sm1phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00542 if(sm2phit->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) sm2phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00543 if(smhblk->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) smhblk->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00544 }
00545
00546 for (i++; i<(int)((MaxTime-FirstFrame-MinX)/BinWidth); i++) {
00547 BinSignal = base_hist->GetBinContent(i+1)/BinWidth;
00548 BinSignal = BinSignal/time_mult;
00549 if (BinSignal > 4*fOptSignal) {
00550 DetNeedsRitalin=true;
00551 base_hist->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00552 BinSignal = 4*fOptSignal;
00553 if(sm1phit->GetBinContent(i+1)/(time_mult*BinWidth) > 4*fOptSignal) sm1phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00554 if(sm2phit->GetBinContent(i+1)/(time_mult*BinWidth) > 4*fOptSignal) sm2phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00555 if(smhblk->GetBinContent(i+1)/(time_mult*BinWidth) > 4*fOptSignal) smhblk->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00556 }
00557 }
00558
00559 BinSignal = base_hist->GetBinContent(i+1)/BinWidth;
00560 BinSignal = BinSignal/time_mult;
00561 BinSignal = BinSignal * BinWidth / (MaxTime-FirstFrame-MinX-BinWidth*i);
00562 if (BinSignal > 4*fOptSignal) {
00563 DetNeedsRitalin=true;
00564 base_hist->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00565 BinSignal = 4*fOptSignal;
00566 if(sm1phit->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) sm1phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00567 if(sm2phit->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) sm2phit->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00568 if(smhblk->GetBinContent(i+1)/(time_mult*(MinX+BinWidth*(i+1)-MinTime+FirstFrame)) > 4*fOptSignal) smhblk->SetBinContent(i+1,BinWidth*4*fOptSignal*time_mult);
00569 }
00570
00571 //Double_t RunTime = run_time(base_hist,fOptSignal);
00572 double BlRTSigma, SM1RTSigma, SM2RTSigma;
00573 Double_t BlRunTime = run_time(smhblk,fOptBlSignal,false,ltime,&BlRTSigma);
00574 Double_t SM1RunTime = run_time(sm1phit,fOptSMSignal,false,0,&SM1RTSigma);
00575 Double_t SM2RunTime = run_time(sm2phit,fOptSMSignal,false,0,&SM2RTSigma);
00576 if (loud>=0) {
00577 cout << "BlRunTime = " << Form("%0.1f%%", BlRunTime*100) << endl;
00578 cout << "SM1RunTime = " << Form("%0.1f%%", SM1RunTime*100) << endl;
00579 cout << "SM2RunTime = " << Form("%0.1f%%", SM2RunTime*100) << endl;
00580 }
00581
00582 string x_title;
00583 x_title = time_str + " since " + ZeroStr;
00584 /*
00585 base_hist->GetXaxis()->SetTitle(x_title.c_str());
00586 base_hist->GetXaxis()->CenterTitle();
00587 base_hist->GetYaxis()->SetLabelColor(0);
00588 base_hist->GetYaxis()->SetTickLength(0);
00589 base_hist->SetMinimum(0);
00590 base_hist->Draw();
00591 */
00592
00593 smhblk->GetXaxis()->SetTitle(x_title.c_str());
00594 smhblk->GetXaxis()->CenterTitle();
00595 smhblk->GetYaxis()->SetLabelColor(0);
00596 smhblk->GetYaxis()->SetTickLength(0);
00597 smhblk->SetMinimum(0);
00598 smhblk->SetLineColor(1);
00599 smhblk->Draw();
00600
00601 sm1phit->SetLineColor(4);
00602 sm1phit->Draw("SAME");
00603 sm2phit->SetLineColor(2);
00604 sm2phit->Draw("SAME");
00605
00606 //Find appropriate frequency for the line
00607 char line_name[20];
00608 Double_t line_val, line_err;
00609 TLine *line = new TLine(); line->SetLineWidth(1);
00610 TText *text = new TText(); text->SetTextSize(0.05); text->SetTextAlign(32);
00611 //Detector optimal Signal line
00612 /*
00613 sprintf(line_name,"%1.2f Hz",fOptSignal);
00614 line_val = base_hist->GetBinWidth(-1)*time_mult*fOptSignal;
00615 line_err = TMath::Sqrt(line_val);
00616 line->SetLineStyle(1);
00617 line->DrawLine(MinX,line_val,MaxX,line_val);
00618 line->SetLineStyle(2);
00619 line->DrawLine(MinX,line_val+line_err,MaxX,line_val+line_err);
00620 line->DrawLine(MinX,line_val-line_err,MaxX,line_val-line_err);
00621 text->DrawText((MinX-0.03*(MaxX-MinX)),line_val,line_name);
00622 */
00623 //Hit Block Optimal Signal line
00624 sprintf(line_name,"%1.2f Hz",fOptBlSignal);
00625 line_val = BinWidth*time_mult*fOptBlSignal;
00626 line_err = TMath::Sqrt(line_val);
00627 line->SetLineColor(kBlack);
00628 line->SetLineStyle(1);
00629 line->DrawLine(MinX,line_val,MaxX,line_val);
00630 line->SetLineStyle(2);
00631 line->DrawLine(MinX,line_val+line_err,MaxX,line_val+line_err);
00632 line->DrawLine(MinX,line_val-line_err,MaxX,line_val-line_err);
00633 text->SetTextColor(kBlack);
00634 text->DrawText((MinX-0.03*(MaxX-MinX)),line_val,line_name);
00635 //SM Optimal Signal line
00636 sprintf(line_name,"%1.2f Hz",fOptSMSignal);
00637 line_val = BinWidth*time_mult*fOptSMSignal;
00638 line_err = TMath::Sqrt(line_val);
00639 line->SetLineColor(kBlue);
00640 line->SetLineStyle(1);
00641 line->DrawLine(MinX,line_val,MaxX,line_val);
00642 line->SetLineStyle(2);
00643 line->DrawLine(MinX,line_val+line_err,MaxX,line_val+line_err);
00644 line->DrawLine(MinX,line_val-line_err,MaxX,line_val-line_err);
00645 text->SetTextColor(kBlue);
00646 text->DrawText((MinX-0.03*(MaxX-MinX)),line_val,line_name);
00647
00648 if (line_val>base_hist->GetMaximum()) {
00649 line_val = base_hist->GetMaximum();
00650 if(loud>=1) cout << "Failed: New Line Value " << line_val << endl;
00651 Double_t line_freq;
00652 line_freq = line_val/(BinWidth*time_mult);
00653 sprintf(line_name,"%1.2f Hz",line_freq);
00654 if(loud>=1) cout << "Line Frequency " << line_freq << endl;
00655 //Draw a opt signal line, or what the max frequency denotes
00656 line->SetLineWidth(1);
00657 line->DrawLine(MinX,line_val,MaxX,line_val);
00658 //Mark the frequency of line
00659 text->SetTextSize(0.05);
00660 text->SetTextAlign(32);
00661 text->DrawText((MinX-0.03*(MaxX-MinX)),line_val,line_name);
00662 }
00663
00664 if (DetNeedsRitalin && false) {
00665 line_val = BinWidth*time_mult*4*fOptSignal;
00666 line->SetLineColor(kRed);
00667 line->DrawLine(MinX,line_val,MaxX,line_val);
00668 sprintf(line_name,">%1.2f Hz",4*fOptSignal);
00669 text->SetTextSize(0.05);
00670 text->SetTextAlign(12);
00671 text->SetTextColor(kRed);
00672 text->DrawText((MaxX+0.03*(MaxX-MinX)),line_val,line_name);
00673 }
00674
00675 if (bin_con!=1) {
00676 //Time Lines
00677 line->SetLineStyle(2);
00678 line->SetLineWidth(1);
00679
00680 //MinTime line
00681 Double_t XLoc = MinX + MinTime + ZoneDiff;
00682 XLoc = XLoc - ZeroTime->GetSec()/time_mult;
00683 line->DrawLine(XLoc,0,XLoc,line_val);
00684
00685 //MaxTime line
00686 XLoc = MinX + MaxTime + ZoneDiff;
00687 XLoc = XLoc - ZeroTime->GetSec()/time_mult;
00688 line->DrawLine(XLoc,0,XLoc,line_val);
00689 }
00690
00691 drawpad->cd(0);
00692 TLegend *leg = new TLegend(0.60,0.89,1.0,0.99);
00693
00694 /*
00695 sprintf(leg_label,"Signal Snarls (%d->%2.1f%%) ",
00696 (Int_t)base_hist->GetEntries(),RunTime*100);
00697 leg->AddEntry(base_hist,leg_label,"l");
00698 */
00699
00700 leg->AddEntry(sm1phit, Form("SM1 Planes Hit > %d (%2.1f #pm %.1f %%)",
00701 fSMPlaneLimit,SM1RunTime*100,SM1RTSigma*100), "l");
00702 leg->AddEntry(sm2phit, Form("SM2 Planes Hit > %d (%2.1f #pm %.1f %%)",
00703 fSMPlaneLimit,SM2RunTime*100,SM2RTSigma*100), "l");
00704 leg->AddEntry(smhblk, Form("Hit Block > %d (%2.1f #pm %.1f %%)",
00705 fBlPlaneLimit,BlRunTime*100,BlRTSigma*100), "l");
00706
00707 leg->SetBorderSize(1);
00708 leg->Draw();
00709
00710 drawpad->Modified();
00711 drawpad->Update();
00712
00713 //Add an axis atop the plot with
00714 if (ZoneUTC) {
00715 drawpad->SetTopMargin(0.2);
00716 drawpad->SetTickx(0);
00717 TGaxis *LocalTimeAxis = new TGaxis(MinX, drawpad->GetUymax(),
00718 MaxX, drawpad->GetUymax(), MinX-(LocalOffset/time_mult),
00719 MaxX-(LocalOffset/time_mult), 510, "-");
00720 LocalTimeAxis->SetTitle(Form("%s since %s (%s)", time_str.c_str(),
00721 ZeroTime->AsString("s"), LocalOffsetStr.c_str()));
00722 LocalTimeAxis->CenterTitle();
00723
00724 LocalTimeAxis->Draw();
00725 }
00726
00727 drawpad->Modified();
00728 drawpad->Update();
00729
00730 TPaveText *time_text = new TPaveText(0.0,0.89,0.32,0.99,"brNDC");
00731 sprintf(leg_label,"Zero: %s",ZeroStr.c_str());
00732 TText *tt = time_text->AddText(leg_label);
00733 //tt->SetTextSize(leg->GetTextSize());
00734 tt->SetTextFont(leg->GetTextFont());
00735 sprintf(leg_label,"Beg: %s",BegStr.c_str());
00736 tt = time_text->AddText(leg_label);
00737 //tt->SetTextSize(leg->GetTextSize());
00738 tt->SetTextFont(leg->GetTextFont());
00739 sprintf(leg_label,"End: %s",EndStr.c_str());
00740 tt = time_text->AddText(leg_label);
00741 //tt->SetTextSize(leg->GetTextSize());
00742 tt->SetTextFont(leg->GetTextFont());
00743 time_text->SetBorderSize(1);
00744 time_text->Draw();
00745
00746 TCanvas *lcan = single_disp("livetime");
00747 lcan->cd();
00748 /*
00749
00750 pl->Clear();
00751 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
00752 else pl->AddText("Far Detector");
00753 pl->AddText(("Livetime Development "+bin_str).c_str());
00754 lcan->cd(0);
00755 pl->SetBorderSize(1);
00756 pl->Draw();
00757
00758 drawpad = dynamic_cast<TPad*>(lcan->FindObject("drawpad"));
00759 drawpad->cd();
00760 drawpad->SetTicky(0);
00761
00762 ltime->GetXaxis()->SetTitle(x_title.c_str());
00763 ltime->GetXaxis()->CenterTitle();
00764 ltime->GetYaxis()->SetLabelColor(0);
00765 ltime->GetYaxis()->SetTickLength(0);
00766 ltime->SetMinimum(0);
00767 ltime->Draw();
00768
00769 //MaxOntime line
00770 Double_t X1 = MinX + MinTime + ZoneDiff - ZeroTime->GetSec()/time_mult;
00771 Double_t X2 = MinX + MaxTime + ZoneDiff - ZeroTime->GetSec()/time_mult;
00772 line->SetLineStyle(1);
00773 line->SetLineWidth(1);
00774 line->SetLineColor(3);
00775 line->DrawLine(X1,0,X2,99.5*(MaxTime-MinTime)/BinWidth);
00776 */
00777
00778 if (root_files) {
00779 if(loud>=2) cout << "Writing THistos, TCanvases, and TChains" << endl;
00780
00781 //Write the histograms
00782 base_hist->Write();
00783 sm1phit->Write();
00784 sm2phit->Write();
00785 smhblk->Write();
00786 ltime->Write();
00787
00788 //Write the canvases
00789 rcan->Write();
00790 lcan->Write();
00791
00792 //Write the tree
00793 dsrates->Write();
00794
00795 }
00796
00797 if(loud>=3) cout << "Printing Canvas\n";
00798 rcan->Print((dsrates_base+".ps").c_str());
00799 rcan->Close();
00800 //lcan->Print((dsrates_base+".ps").c_str());
00801 lcan->Close();
00802
00803 if(loud>=3) cout << "Printing Closing Canvas\n";
00804 rcan = single_disp("Fini");
00805 rcan->Print((dsrates_base+".ps]").c_str());
00806 rcan->Close();
00807
00808 if(loud>=3) cout << "Deleting histograms\n";
00809 base_hist->Delete();
00810
00811 sm1phit->Delete();
00812 sm2phit->Delete();
00813 smhblk->Delete();
00814 ltime->Delete();
00815
00816 if (root_files) {
00817 tf->Write();
00818 tf->Close();
00819 }
00820 }
|
|
||||||||||||||||||||
|
Definition at line 1577 of file rate_plot.cc. References DSChipEvent::ADC, bin_str, chain_title, BlockEvent::ChipEvents, crate2_disp(), Form(), ChipEvent::GetVachip(), ChipEvent::GetVadc(), ChipEvent::IsLoc(), loud, MaxX, MinX, NBins, BlockEvent::Time, time_range(), time_str, and ZeroTime. Referenced by main(). 01578 {
01579 if(loud>=1) cout << "Entering routine ds_vmm_plot" << endl;
01580 TPad *drawpad = 0;
01581 TCanvas *rcan = 0;
01582 TPaveText *pl = 0;
01583 TProfile *rate_proj[2][3];
01584 string dsrates_base="DSVMM";
01585 dsrates_base += UtilString::ToString<int>(Crate);
01586 dsrates_base += "-";
01587 dsrates_base += UtilString::ToString<int>(Varc);
01588 dsrates_base += "-";
01589 dsrates_base += UtilString::ToString<int>(Vmm);
01590 dsrates_base += NameBase;
01591
01592 //Open a file if requested
01593 TFile *tf;
01594 if (root_files) {
01595 tf = new TFile((dsrates_base+".root").c_str(),"RECREATE");
01596 tf->cd();
01597 }
01598
01599 rcan = crate2_disp("Init");
01600 rcan->Print((dsrates_base+".ps[").c_str());
01601 rcan->Close();
01602
01603 if(loud >= 1) cout << "Top Title for dsrates plot: " << chain_title << endl;
01604
01605 char names_list[2][16];
01606
01607 time_range((TTree*)dsrates);
01608
01609 char hname[20];
01610 char htitle[30];
01611 for(int i=0;i<2;i++) for (int j=0;j<3;j++) {
01612 sprintf(hname,"rproj%d_%d",i,j);
01613 sprintf(htitle,"ADC %d Chip %d Rate",i,j);
01614 rate_proj[i][j] = new TProfile(hname,htitle,NBins,MinX,MaxX);
01615 }
01616
01617 DaqSnarlEvent *revt = 0;
01618 dsrates->SetBranchAddress("dsevt",&revt);
01619
01620 Int_t ientry = 0;
01621 while (dsrates->GetEntry(ientry++)) {
01622
01623 TClonesArray* chips = revt->ChipEvents;
01624 Double_t time_val = (revt->Time-ZeroTime->GetSec())/time_mult;
01625 for (int i=0;i<chips->GetLast();i++) {
01626 DSChipEvent *chip = dynamic_cast<DSChipEvent*>(chips->At(i));
01627 if (chip->IsLoc(Crate,Varc,Vmm) && chip->ADC > 0) {
01628 rate_proj[chip->GetVadc()][chip->GetVachip()]->Fill(time_val,chip->ADC);
01629 }
01630 }
01631 }
01632
01633 sprintf(names_list[0],"Vadc 0");
01634 sprintf(names_list[1],"Vadc 1");
01635
01636 TLegend *leg = 0;
01637 rcan = crate2_disp("Vmm");
01638 pl = new TPaveText(0,0.9,1,1);
01639 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
01640 else pl->AddText("RawDigit ADC");
01641 pl->AddText(Form("Vmm Profiles %d-%d-%d %s",Crate,Varc,Vmm,bin_str.c_str()));
01642
01643 rcan->cd(0);
01644 pl->SetBorderSize(1);
01645 pl->Draw();
01646 char stats[40];
01647
01648 drawpad = dynamic_cast<TPad*>(rcan->FindObject("drawpad"));
01649 TH2D *prof_base[2];
01650 double MinRate, MaxRate;
01651 for (int i=0;i<2;i++) {
01652 MaxRate = -10;
01653 MinRate = 10000000;
01654 Double_t BinRate,BinErr;
01655 for (int j=0;j<3;j++) {
01656 for (int k=0;k<rate_proj[i][j]->GetNbinsX();k++) {
01657 BinRate = rate_proj[i][j]->GetBinContent(k);
01658 BinErr = rate_proj[i][j]->GetBinError(k);
01659 if(BinRate==0 && BinErr==0) continue;
01660 if(BinRate+BinErr > MaxRate) MaxRate = BinRate+BinErr;
01661 if(BinRate-BinErr < MinRate) MinRate = BinRate-BinErr;
01662 }
01663 }
01664 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01665 if (MaxRate-MinRate <= 0.002) {
01666 if(loud>=2) cout << "Adjusting Min and Max Rate for small range\n";
01667 MinRate = MinRate - 1.0;
01668 MaxRate = MaxRate + 1.0;
01669 }
01670 if(MinRate < 1.0) MinRate = 1.0;
01671 //Up the Min and Max Rate for LogY
01672 bool DoLogY = true;
01673 double MinY, MaxY;
01674
01675 if (DoLogY) {
01676 MinY = MinRate - 0.1*(TMath::Log10(MaxRate/MinRate));
01677 if(MinY < 1.0) MinY = 1.0;
01678 MaxY = MaxRate + 0.1*(MaxRate-MinRate);
01679 }
01680 else {
01681 MinY = MinRate - 0.1*(MaxRate-MinRate);
01682 if(MinY < 0.0) MinY = 0.0;
01683 MaxY = MaxRate + 0.1*(MaxRate-MinRate);
01684 }
01685
01686 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01687 drawpad->cd(i+1);
01688 if(DoLogY) gPad->SetLogy();
01689 prof_base[i] = new TH2D(names_list[i],names_list[i],
01690 NBins,MinX,MaxX,1,MinY,MaxY);
01691 if(loud>=2) printf("Base Name = %s\n",names_list[i]);
01692 if(loud>=2) printf("BinsX=%d MinX=%f MaxX=%f\n",NBins,MinX,MaxX);
01693 if(loud>=2) printf("BinsY=%d MinY=%f MaxY=%f\n",50,MinRate,MaxRate);
01694
01695 string x_title;
01696 x_title = time_str + " since " + ZeroStr;
01697 prof_base[i]->GetXaxis()->SetTitle(x_title.c_str());
01698 prof_base[i]->GetXaxis()->CenterTitle();
01699 prof_base[i]->GetYaxis()->SetTitle("DaqSnarl ADC");
01700 prof_base[i]->GetYaxis()->CenterTitle();
01701 prof_base[i]->Draw();
01702 leg = new TLegend(0.55,0.875,1.0,1.0);
01703 leg->SetBorderSize(1);
01704 for (int j=0; j<3; j++) {
01705 rate_proj[i][j]->Draw("SAME");
01706 rate_proj[i][j]->SetLineColor(j+2);
01707 sprintf(stats,"Vachip %d Mean=%-6.2f RMS=%-4.4f",j,
01708 rate_proj[i][j]->GetMean(2),rate_proj[i][j]->GetRMS(2));
01709 leg->AddEntry(rate_proj[i][j],stats,"l");
01710 if(root_files) rate_proj[i][j]->Write();
01711 }
01712 leg->Draw();
01713
01714 if(root_files) prof_base[i]->Write();
01715 }
01716
01717 if(loud>=3) cout << "Printing Canvas\n";
01718 rcan->Print((dsrates_base+".ps").c_str());
01719
01720 if (root_files) {
01721 if(loud>=2) cout << "Writing THistos, TCanvases, and TChains\n";
01722 rcan->Write();
01723 dsrates->Write();
01724 }
01725 rcan->Close();
01726
01727 if(loud>=3) cout << "Printing Closing Canvas\n";
01728 rcan = crate2_disp("Fini");
01729 rcan->Print((dsrates_base+".ps]").c_str());
01730 rcan->Close();
01731
01732 if(loud>=3) cout << "Deleting histograms\n";
01733 for(int i=0;i<2;i++) for(int j=0;j<3;j++) rate_proj[i][j]->Delete();
01734 for(int i=0;i<2;i++) prof_base[i]->Delete();
01735
01736 if (root_files) {
01737 tf->Write();
01738 tf->Close();
01739 }
01740 }
|
|
||||||||||||
|
COMMAND LINE CALIB CONSTANTS BEAM RUN KEY Cerenkov ADC cuts: ATTENUATION PARAMS FILE + TREE Definition at line 151 of file rate_plot.cc. References AllowPulsed, AllowShield, bin_con, bin_mult, bin_str, bin_width, chain_title, DryRun, ds_crate_plot(), ds_plot(), ds_vmm_plot(), fBlPlaneLimit, UtilRSM::FileFileList(), fOptBlSignal, fOptSignal, fOptSMSignal, Form(), fPlaneLimit, fSignalADC, fSMPlaneLimit, loud, NameBase, set_style(), time_mult, time_str, tp_crate_plot(), tp_plot(), tp_vmm_plot(), usage(), WeeklyZeroDate, ZoneDiff, ZoneStr, and ZoneUTC. 00152 {
00153 int c; int B=0; char W=0;
00154 int crate; int varc; int vmm;
00155 Double_t tdoub=0;
00156 Int_t tint=0;
00157 char tnm[40];
00158
00159 Bool_t DoTP=true;
00160 Bool_t DoDS=true;
00161 Bool_t DoVMM=false;
00162 Bool_t DoCrate=false;
00163
00164 string ListFile="";
00165
00166 while ((c = getopt(argc,argv,"vqnhR:L:N:x:X:b:B:Ww:Mm:T:s:P:V:C:A:")) != -1)
00167 switch (c) {
00168 case 'v':
00169 loud++;
00170 break;
00171 case 'q':
00172 loud--;
00173 break;
00174 case 'n':
00175 DryRun = true;
00176 break;
00177 case 'h':
00178 usage(); exit(0);
00179 break;
00180 case 'R':
00181 tint=0;
00182 while(optarg[tint]) {
00183 switch(optarg[tint]) {
00184 case 'd':
00185 DoDS=false;
00186 break;
00187 case 'D':
00188 DoDS=true;
00189 break;
00190 case 't':
00191 DoTP=false;
00192 break;
00193 case 'T':
00194 DoTP=true;
00195 break;
00196 default:
00197 break;
00198 }
00199 tint++;
00200 }
00201 break;
00202 case 'L':
00203 ListFile=optarg;
00204 break;
00205 case 'N':
00206 NameBase=optarg;
00207 break;
00208 case 'x':
00209 case 'X':
00210 B=0;
00211 while((W=toupper(optarg[B]))) {
00212 switch ((int)W) {
00213 case 'S':
00214 time_mult = 1.; time_str = "seconds";
00215 break;
00216 case 'M':
00217 time_mult = 60.; time_str = "minutes";
00218 break;
00219 case 'H':
00220 time_mult = 3600.; time_str = "hours";
00221 break;
00222 case 'D':
00223 time_mult = 86400.; time_str = "days";
00224 break;
00225 case 'U':
00226 ZoneDiff=0; ZoneStr=" (UTC)"; ZoneUTC=true;
00227 break;
00228 case 'L':
00229 ZoneDiff=6*3600; ZoneStr=" (CST)"; ZoneUTC=false;
00230 break;
00231 default:
00232 if(loud>=0) cout << "Unspecified X-Axis: " << optarg << endl;
00233 if(loud>=0) cout << "Use S(Sec), M(Min), H(Hours), D(Days),";
00234 if(loud>=0) cout << "U(UTC), or L(CST)" << endl;
00235 exit(1);
00236 break;
00237 }B++;}
00238 if(loud>=0) cout << time_str << ZoneStr << " on X-Axis\n";
00239 break;
00240 case 'b':
00241 case 'B':
00242 B=0;W=0;
00243 sscanf(optarg,"%d%c",&B,&W);
00244 if(B!=0) bin_width=B;
00245 else {
00246 cout << "Bad argument to -b option: " << optarg << endl;
00247 usage(); exit(1);
00248 }
00249 if(W!=0) switch ((int)toupper(W)) {
00250 case 'S':
00251 bin_mult = 1; bin_str = Form("second");
00252 break;
00253 case 'M':
00254 bin_mult = 60; bin_str = Form("minute");
00255 break;
00256 case 'H':
00257 bin_mult = 3600; bin_str = Form("hour");
00258 break;
00259 case 'D':
00260 bin_mult = 86400; bin_str = Form("day");
00261 break;
00262 default:
00263 if(loud>=0) cout << "Unspecified binning: " << optarg << endl;
00264 if(loud>=0) cout << "Use S(Sec), M(Min), H(Hours), or D(Days)\n";
00265 exit(1);
00266 break;
00267 }
00268 else {
00269 cout << "Bad argument to -b option: " << optarg << endl;
00270 usage(); exit(1);
00271 }
00272 if(loud>=0) cout << bin_width << " " << bin_str << " time bins\n";
00273 break;
00274 case 'W':
00275 bin_con = 1; bin_width = 1; bin_mult = 3600; bin_str = Form("Hour");
00276 time_mult = 86400.; time_str = "Days";
00277 if(loud>=0) cout << "Weekly binning convention, zero on Sunday\n";
00278 if(loud>=0) cout << time_str << " on X-Axis\n";
00279 if(loud>=0) cout << bin_width << " " << bin_str << " time bins\n";
00280 break;
00281 case 'w':
00282 WeeklyZeroDate = atoi(optarg);
00283 break;
00284 case 'M':
00285 bin_con = 2; bin_width = 4; bin_mult = 3600; bin_str = Form("Hour");
00286 time_mult = 86400.; time_str = "Days";
00287 if(loud>=0) cout << "Monthly binning, zero on end of month\n";
00288 if(loud>=0) cout << time_str << " on X-Axis\n";
00289 if(loud>=0) cout << bin_width << " " << bin_str << " time bins\n";
00290 break;
00291 case 'T':
00292 chain_title = optarg;
00293 if(loud>=0) cout << "Top of TCanvas title=" << optarg << endl;
00294 break;
00295 case 's':
00296 sscanf(optarg,"%lf%s",&tdoub,tnm);
00297 if (strncasecmp(tnm,"adc",3) == 0) {
00298 fSignalADC=TMath::Nint(tdoub);
00299 if(loud>=0) cout << "Min PostTrig ADC Signal: " << fSignalADC << endl;
00300 }
00301 else if (strncasecmp(tnm,"sm",2) == 0) {
00302 fOptSMSignal=(TMath::Nint(100*tdoub))/100.0;
00303 if(loud>=0) cout << "Optimal SM Signal: " << fOptSMSignal << endl;
00304 }
00305 else if (strncasecmp(tnm,"bl",2) == 0) {
00306 fOptBlSignal=(TMath::Nint(100*tdoub))/100.0;
00307 if(loud>=0) cout << "Optimal Block Signal: " << fOptBlSignal << endl;
00308 }
00309 else {
00310 fOptSignal=(TMath::Nint(100*tdoub))/100.0;
00311 if(loud>=0) cout << "Optimal Signal: " << fOptSignal << endl;
00312 }
00313 break;
00314 case 'P':
00315 sscanf(optarg,"%d%s",&tint,tnm);
00316 if (strncasecmp(tnm,"sm",2) == 0) {
00317 fSMPlaneLimit=tint;
00318 if(loud>=0) cout << "SM Plane Limit set to: " << fSMPlaneLimit << endl;
00319 }
00320 else if (strncasecmp(tnm,"bl",2) == 0) {
00321 fBlPlaneLimit=tint;
00322 if(loud>=0) cout << "Block Plane Limit set to: " << fBlPlaneLimit << endl;
00323 }
00324 else {
00325 fPlaneLimit=tint;
00326 if(loud>=0) cout << "Plane Limit set to: " << fPlaneLimit << endl;
00327 }
00328 break;
00329 case 'A':
00330 tint=0;
00331 while(optarg[tint]) {
00332 switch(optarg[tint]) {
00333 case 'p':
00334 AllowPulsed = false;
00335 break;
00336 case 'P':
00337 AllowPulsed = true;
00338 break;
00339 case 's':
00340 AllowShield = false;
00341 break;
00342 case 'S':
00343 AllowShield = true;
00344 break;
00345 default:
00346 break;
00347 }
00348 tint++;
00349 if(loud>=0) cout << "AllowShield=" << AllowShield << " AllowPulsed=" << AllowPulsed <<endl;
00350 }
00351 break;
00352 case 'V':
00353 sscanf(optarg,"%d-%d-%d",&crate,&varc,&vmm);
00354 DoVMM = true;
00355 break;
00356 case 'C':
00357 sscanf(optarg,"%d",&crate);
00358 DoCrate = true;
00359 break;
00360 default:
00361 cerr << "unknown command line option:" << optopt << endl;
00362 usage();
00363 exit(1);
00364 break;
00365 }
00366 if(loud>=1) cout << "Verbose output level " << loud << endl;
00367 if(loud>=1) cout << time_str << " on X-Axis\n";
00368 if(loud>=1) cout << bin_width << " " << bin_str << " time bins\n";
00369
00370 bin_str = Form(" (%d %s bins)",bin_width,bin_str.c_str());
00371
00372 set_style();
00373
00374 if(loud<=0) gErrorIgnoreLevel = kWarning;
00375 char fname[200];
00376
00377 vector<string> RateFiles;
00378 if (ListFile.size() > 0) {
00379 RateFiles = UtilRSM::FileFileList(ListFile,".rate.root");
00380 }
00381 for (int i=optind; i<argc; i++) {
00382 RateFiles.push_back(argv[i]);
00383 }
00384
00385 TChain *tpchain = new TChain("tprates");
00386 TChain *dschain = new TChain("dsrates");
00387
00388 for (unsigned int i=0; i<RateFiles.size(); i++) {
00389 sprintf(fname,"%s",RateFiles[i].c_str());
00390 TFile *tf = new TFile(fname);
00391 if (!tf) {
00392 printf("Failed to open %s\n",fname);
00393 continue;
00394 }
00395 if (tf->IsZombie()) {
00396 printf("Zombie file %s\n",fname);
00397 continue;
00398 }
00399 if (DoTP) {
00400 TObject *tobj = tf->Get("tprates");
00401 if(!tobj)
00402 printf("No tprates in %s\n",fname);
00403 else {
00404 if(tobj->InheritsFrom("TChain"))
00405 tpchain->Add((TChain *)tobj);
00406 else if(tobj->InheritsFrom("TTree"))
00407 tpchain->Add(fname);
00408 }
00409 if(loud>=2)
00410 printf("TPChain now has %lld entries\n",
00411 (long long int)tpchain->GetEntries());
00412 }
00413 if (DoDS) {
00414 TObject *tobj = tf->Get("dsrates");
00415 if(!tobj)
00416 printf("No dsrates in %s\n",fname);
00417 else {
00418 if(tobj->InheritsFrom("TChain")) dschain->Add((TChain *)tobj);
00419 else if(tobj->InheritsFrom("TTree")) dschain->Add(fname);
00420 }
00421 if (loud>=2) {
00422 printf("DSChain now has %lld entries\n",
00423 (long long int)dschain->GetEntries());
00424 }
00425 }
00426 tf->Close();
00427 }
00428
00429 if (DoTP) {
00430 if (loud>=1) {
00431 printf("Final tpchain has %lld entries in %d trees\n",
00432 (long long int)tpchain->GetEntries(),tpchain->GetNtrees());
00433 }
00434 if (tpchain->GetEntries()==0) {
00435 printf("Final tpchain has 0 entries(unusable)\n");
00436 }
00437 else {
00438 if(!DryRun) {
00439 if(DoCrate) tp_crate_plot((TTree*)tpchain,crate);
00440 else if(DoVMM) tp_vmm_plot((TTree*)tpchain,crate,varc,vmm);
00441 else tp_plot((TTree*)tpchain);
00442 }
00443 }
00444 }
00445
00446 if (DoDS) {
00447 if (loud>=1) {
00448 printf("Final dschain has %lld entries in %d trees\n",
00449 (long long int)dschain->GetEntries(),dschain->GetNtrees());
00450 }
00451 if (dschain->GetEntries() == 0) {
00452 printf("Final dschain has 0 entries(unusable)\n");
00453 }
00454 else {
00455 if (!DryRun) {
00456 if(DoCrate) ds_crate_plot((TTree*)dschain,crate);
00457 else if(DoVMM) ds_vmm_plot((TTree*)dschain,crate,varc,vmm);
00458 else ds_plot((TTree*)dschain);
00459 }
00460 }
00461 }
00462 }
|
|
||||||||||||||||||||||||
|
Definition at line 1860 of file rate_plot.cc. References FirstFrame, loud, MaxTime, MinTime, MinX, NBins, and time_mult. Referenced by ds_plot(). 01862 {
01863 Int_t UsedBins = 2;
01864 Double_t RunTime = 0;
01865 Double_t BinWidth = rthisto->GetBinWidth(-1);
01866
01867 Double_t BinOptContent = OptSignal * time_mult * BinWidth;
01868 Double_t BinOptErr = 2*TMath::Sqrt(BinOptContent);
01869
01870 Int_t i=(Int_t)((MinTime-MinX-FirstFrame)/BinWidth);
01871 Double_t BinContent = rthisto->GetBinContent(i+1);
01872 BinContent = BinContent*BinWidth/(MinX+BinWidth*(i+1)-MinTime+FirstFrame);
01873 if (BinContent > BinOptContent-BinOptErr) {
01874 RunTime += 1.0;
01875 if(Quell) BinContent = BinOptContent;
01876 }
01877 else RunTime += BinContent/BinOptContent;
01878 rthisto->SetBinContent(i+1,BinContent);
01879
01880 if (fillhisto) {
01881 fillhisto->SetBinContent(i+1,(int)(RunTime*100));
01882 }
01883
01884 if(loud>1) cout << "bin " << i << endl;
01885 int imax = (Int_t)((MaxTime-FirstFrame-MinX)/BinWidth);
01886 if(imax >= rthisto->GetNbinsX()) imax = rthisto->GetNbinsX()-1;
01887 for (i++; i<imax; i++) {
01888 if(loud>1) cout << "bin " << i << endl;
01889 BinContent = rthisto->GetBinContent(i+1);
01890 if(BinContent > BinOptContent-BinOptErr) {
01891 RunTime += 1.0;
01892 if(Quell) rthisto->SetBinContent(i+1,BinOptContent);
01893 }
01894 else RunTime += BinContent/BinOptContent;
01895
01896 if (fillhisto) {
01897 fillhisto->SetBinContent(i+1,(int)(RunTime*100));
01898 }
01899 UsedBins++;
01900 }
01901
01902 BinContent = rthisto->GetBinContent(i+1);
01903 BinContent = BinContent * BinWidth / (MaxTime-FirstFrame-MinX-BinWidth*i);
01904 if(BinContent > BinOptContent-BinOptErr) {
01905 RunTime += 1.0;
01906 if(Quell) BinContent = BinOptContent;
01907 }
01908 else RunTime += BinContent/BinOptContent;
01909 rthisto->SetBinContent(i+1,BinContent);
01910
01911 if (fillhisto) {
01912 fillhisto->SetBinContent(i+1,(int)(RunTime*100));
01913 }
01914
01915 if(rtsigma) *rtsigma = 1.0/TMath::Sqrt(UsedBins*time_mult*BinWidth*OptSignal);
01916
01917 if(loud>=1) cout << "Pre RunTime = " << RunTime << endl;
01918 if(loud>=1) printf("UsedBins=%d of NBins=%d\n",UsedBins,NBins);
01919 if(loud>=2) printf("BinWidth=%f\n",BinWidth);
01920 RunTime = (double)RunTime/UsedBins;
01921 return RunTime;
01922 }
|
|
|
Definition at line 1990 of file rate_plot.cc. References loud. Referenced by main(). 01991 {
01992 TStyle* myVStyle = new TStyle("videoStyle", "Video Style");
01993 // Colors
01994 myVStyle->SetFillColor(10);
01995 myVStyle->SetFrameFillColor(10);
01996 myVStyle->SetPalette(1,0);
01997 myVStyle->SetCanvasColor(10);
01998 myVStyle->SetPadColor(10);
01999 myVStyle->SetHistLineColor(kBlack);
02000 myVStyle->SetFuncColor(kGreen);
02001 myVStyle->SetLabelColor(kBlue,"xyz");
02002 myVStyle->SetTitleColor(kBlack);
02003 myVStyle->SetTitleFillColor(kWhite);
02004
02005 // Sizes
02006 myVStyle->SetCanvasDefH(300);
02007 myVStyle->SetCanvasDefW(500);
02008 myVStyle->SetPadBottomMargin(0.15);
02009 myVStyle->SetPadTopMargin(0.13);
02010 myVStyle->SetPadLeftMargin(0.15);
02011 myVStyle->SetLabelSize(0.04,"xyz");
02012 myVStyle->SetLabelOffset(0.01,"xyz");
02013 myVStyle->SetTitleSize(0.06,"xyz");
02014 //myVStyle->SetTitleOffset(-0.1,"xyz");
02015 myVStyle->SetTitleBorderSize(1);
02016
02017 // Misc
02018 myVStyle->SetHistLineWidth(2);
02019 myVStyle->SetFrameLineWidth(1);
02020 myVStyle->SetFuncWidth(2);
02021 myVStyle->SetPadGridX(1);
02022 myVStyle->SetPadGridY(1);
02023 myVStyle->SetCanvasBorderMode(0);
02024 myVStyle->SetPadTickX(1);
02025 myVStyle->SetPadTickY(1);
02026 myVStyle->SetOptStat(0);
02027 myVStyle->SetMarkerStyle(1);
02028 myVStyle->SetMarkerSize(0.85);
02029
02030 // Fonts
02031 myVStyle->SetTitleFont(52);
02032 myVStyle->SetStatFont(52);
02033 myVStyle->SetLabelFont(52,"xyz");
02034 myVStyle->SetTextFont(52);
02035
02036 // Paper
02037 myVStyle->SetPaperSize(20,24);
02038
02039 //gROOT->ForceStyle();
02040 gROOT->SetStyle("videoStyle");
02041 if(loud>=2) gStyle->ls();
02042 }
|
|
|
Definition at line 1968 of file rate_plot.cc. References loud. Referenced by ds_plot(). 01969 {
01970 if(loud>=2) cout << "Making single Canvas\n";
01971
01972 TCanvas *canv = new TCanvas(ptitle,ptitle,930,750);
01973 canv->Range(0.0,0.0,1.0,1.0);
01974 canv->SetGridx(0);
01975 canv->SetGridy(0);
01976 canv->SetFrameFillColor(0);
01977
01978 TPad *drawpad;
01979 if(!(drawpad=(TPad*)gROOT->Get("drawpad")))
01980 drawpad = new TPad("drawpad","Drawing Pad",0,0,1,0.9);
01981 drawpad->SetGridx(0);
01982 drawpad->SetGridy(0);
01983 drawpad->Range(0.0,0.0,1.0,1.0);
01984 drawpad->SetFrameFillColor(0);
01985 drawpad->Draw();
01986
01987 return canv;
01988 }
|
|
|
Definition at line 1742 of file rate_plot.cc. References BegStr, BegTime, bin_con, bin_mult, bin_width, EndStr, EndTime, FirstFrame, LocalOffset, LocalOffsetStr, loud, MaxTime, MaxX, MinTime, MinX, NBins, time_mult, WeeklyZeroDate, ZeroStr, ZeroTime, ZoneDiff, and ZoneUTC. Referenced by GfxTrackList::Configure(), GfxStripList::Configure(), GfxShowerList::Configure(), GfxDigitList::Configure(), ds_crate_plot(), ds_plot(), ds_vmm_plot(), select_digit(), select_strip(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). 01743 {
01744 if(loud>=1) cout << "Entering routine time_range" << endl;
01745 char tleaf[10];
01746 if(rates->GetLeaf("Time")) sprintf(tleaf,"Time");
01747 if(rates->GetLeaf("fTime")) sprintf(tleaf,"fTime");
01748
01749 Int_t MinSec = (int)(rates->GetMinimum(tleaf));
01750 Int_t MaxSec = (int)(rates->GetMaximum(tleaf));
01751
01752 ZeroTime = new TTimeStamp(MinSec,0);
01753 BegTime = new TTimeStamp(MinSec,0);
01754 EndTime = new TTimeStamp(MaxSec,0);
01755
01756 int min_time_isdst(0);
01757 if (true) {
01758 time_t min_time = (time_t)MinSec;
01759 struct tm *lmin_time = localtime(&min_time);
01760 min_time_isdst = lmin_time->tm_isdst;
01761 }
01762
01763 int mid_time_isdst(0);
01764 if (true) {
01765 time_t mid_time = (time_t)((MinSec/2+MaxSec/2));
01766 struct tm *lmid_time = localtime(&mid_time);
01767 mid_time_isdst = lmid_time->tm_isdst;
01768 }
01769
01770 int max_time_isdst(0);
01771 if (true) {
01772 time_t max_time = (time_t)MaxSec;
01773 struct tm *lmax_time = localtime(&max_time);
01774 max_time_isdst = lmax_time->tm_isdst;
01775 }
01776
01777 LocalOffset = ZeroTime->GetZoneOffset();
01778 LocalOffsetStr = "CST";
01779 if ((min_time_isdst==1 && max_time_isdst==1) || mid_time_isdst==1) {
01780 LocalOffset -= 3600;
01781 LocalOffsetStr = "CDT";
01782 }
01783
01784 Int_t day;
01785
01786 MinTime = (MinSec-ZoneDiff)/time_mult;
01787 FirstFrame = (Int_t)MinTime;
01788 if (bin_con==1 || bin_con==2) {
01789 FirstFrame = ((Int_t)(MinTime*time_mult/86400.))*86400/time_mult;
01790 }
01791 ZeroTime = new TTimeStamp((Int_t)(FirstFrame*time_mult)+ZoneDiff,0);
01792 day = ZeroTime->GetDate(ZoneUTC)-((ZeroTime->GetDate(ZoneUTC)/100)*100);
01793 //time_t seconds = ZeroTime->GetSec()-ZoneDiff;
01794 //wday = gmtime(&seconds)->tm_wday;
01795
01796 //Reset ZeroTime to the nearest zero day to MinTime
01797 //Strech the endtime to ZeroTime + 7 days
01798 if (bin_con==1) {
01799 if (WeeklyZeroDate > 7) {
01800 ZeroTime->Set(WeeklyZeroDate, 0, 0, true, 0);
01801 MinTime = (int)((ZeroTime->GetSec() - ZoneDiff) / time_mult);
01802 FirstFrame = MinTime;
01803 }
01804 else {
01805 int wday = ZeroTime->GetDayOfWeek(ZoneUTC);
01806 FirstFrame = ((FirstFrame*time_mult/86400)+1)*86400/time_mult;
01807 MinTime = FirstFrame;
01808
01809 ZeroTime = new TTimeStamp((Int_t)(FirstFrame*time_mult)+ZoneDiff,0);
01810 }
01811
01812 BegTime = ZeroTime;
01813 EndTime = new TTimeStamp((Int_t)((FirstFrame+7)*time_mult)+ZoneDiff,0);
01814 }
01815
01816 //Reset ZeroTime to the day of the previous month before the data
01817 while (bin_con==2 && day<28) {
01818 FirstFrame = ((FirstFrame*time_mult/86400)-1)*86400/time_mult;
01819 MinTime = FirstFrame;
01820 ZeroTime = new TTimeStamp((Int_t)(FirstFrame*time_mult)+ZoneDiff,0);
01821 day = ZeroTime->GetDate(ZoneUTC)-((ZeroTime->GetDate(ZoneUTC)/100)*100);
01822 }
01823
01824 //Reset ZeroTime to the BegTime
01825 if (bin_con==3) {
01826 ZeroTime = BegTime;
01827 FirstFrame = ZeroTime->GetSec()/time_mult;
01828 }
01829
01830 ZeroStr=ZeroTime->AsString("s");
01831 BegStr=BegTime->AsString("s");
01832 EndStr=EndTime->AsString("s");
01833 if (!ZoneUTC) {
01834 ZeroStr=ZeroTime->AsString("cl"); ZeroStr=ZeroStr.substr(0,19);
01835 BegStr=BegTime->AsString("cl"); BegStr=BegStr.substr(0,19);
01836 EndStr=EndTime->AsString("cl"); EndStr=EndStr.substr(0,19);
01837 }
01838 ZeroStr += ZoneStr;
01839 BegStr += ZoneStr;
01840 EndStr += ZoneStr;
01841
01842 MaxTime = (MaxSec-ZoneDiff)/time_mult;
01843 MinX = 0;
01844 MaxX = MaxTime-FirstFrame;
01845 NBins = ((Int_t)((time_mult/bin_mult)*(MaxX-MinX)/bin_width)) + 1;
01846 MaxX = MinX + (bin_mult*bin_width/time_mult)*NBins;
01847 if (bin_con==1) {
01848 MaxTime = FirstFrame + 7;
01849 MaxX = 7;
01850 NBins = 168;
01851 }
01852
01853 if (loud>0) {
01854 cout << "MaxTime = " << MaxTime << endl;
01855 cout << "MaxX = " << MaxX << endl;
01856 cout << "NBins = " << NBins << endl;
01857 }
01858 }
|
|
||||||||||||
|
Definition at line 1015 of file rate_plot.cc. References AllowPulsed, bin_str, chain_title, BlockEvent::ChipEvents, Form(), ChipEvent::GetCrate(), ChipEvent::GetVadc(), ChipEvent::GetVarc(), ChipEvent::GetVmm(), ChipEvent::IsLoc(), TPChipEvent::IsPulsed, TPChipEvent::IsShield, loud, MaxX, MinX, NBins, TPChipEvent::Rate, tc, BlockEvent::Time, time_range(), time_str, ZeroStr, and ZeroTime. Referenced by main(). 01016 {
01017 if(loud>=1) cout << "tp_crate_plot for Crate" << Crate << endl;
01018
01019 time_range((TTree*)tprates);
01020
01021 string TPBase=Form("TPCrate%d",Crate);
01022 if(Crate>15) TPBase="TPCrateAll";
01023 TPBase += NameBase;
01024
01025 //Open a file if requested
01026 TFile *tf = 0;
01027 ofstream tf_txt;
01028 if (root_files) {
01029 tf = new TFile((TPBase+".root").c_str(),"RECREATE");
01030 tf->cd();
01031 }
01032
01033 int FirstCrate = Crate;
01034 int LastCrate = Crate;
01035 int NCrates = 1;
01036 if (Crate>15) {
01037 FirstCrate = 0;
01038 LastCrate = 15;
01039 NCrates = 16;
01040 }
01041
01042 TCanvas *tc = new TCanvas("Init","Init",612, 792, 612, 792);
01043 tc->Print((TPBase+".ps[").c_str());
01044 tc->Close();
01045
01046 vector<vector<vector<TProfile*> > > CrateVarcVmmVadc0;
01047 vector<vector<vector<TProfile*> > > CrateVarcVmmVadc1;
01048 vector<vector<vector<THStack*> > > CrateVarcVmmStack;
01049
01050 for (int i=FirstCrate; i<=LastCrate; i++) {
01051 int icrate = i - FirstCrate;
01052 vector<vector<TProfile*> > VarcVmmVadc0Temp;
01053 vector<vector<TProfile*> > VarcVmmVadc1Temp;
01054 vector<vector<THStack* > > VarcVmmStackTemp;
01055 for (int ivarc=0; ivarc<3; ivarc++) {
01056 vector<TProfile*> VmmVadc0Temp;
01057 vector<TProfile*> VmmVadc1Temp;
01058 vector<THStack* > VmmStackTemp;
01059 for (int ivmm=0; ivmm<6; ivmm++) {
01060 VmmVadc0Temp.push_back(new TProfile(
01061 Form("TPCrate%dVarc%dVmm%dVadc0",icrate,ivarc,ivmm),
01062 Form("VARC %d VMM %d VADC 0",ivarc,ivmm),
01063 NBins,MinX,MaxX));
01064 VmmVadc0Temp[ivmm]->SetLineColor(kRed);
01065 VmmVadc1Temp.push_back(new TProfile(
01066 Form("TPCrate%dVarc%dVmm%dVadc1",icrate,ivarc,ivmm),
01067 Form("VARC %d VMM %d VARC 1",ivarc,ivmm),
01068 NBins,MinX,MaxX));
01069 VmmVadc1Temp[ivmm]->SetLineColor(kBlue);
01070 VmmStackTemp.push_back(new THStack(
01071 Form("Crate%dVarc%dVmm%d",icrate,ivarc,ivmm),
01072 Form("VARC %d VMM %d",ivarc,ivmm)));
01073 VmmStackTemp[ivmm]->Add(VmmVadc0Temp[ivmm]);
01074 VmmStackTemp[ivmm]->Add(VmmVadc1Temp[ivmm]);
01075 }
01076 VarcVmmVadc0Temp.push_back(VmmVadc0Temp);
01077 VarcVmmVadc1Temp.push_back(VmmVadc1Temp);
01078 VarcVmmStackTemp.push_back(VmmStackTemp);
01079 }
01080 CrateVarcVmmVadc0.push_back(VarcVmmVadc0Temp);
01081 CrateVarcVmmVadc1.push_back(VarcVmmVadc1Temp);
01082 CrateVarcVmmStack.push_back(VarcVmmStackTemp);
01083 }
01084
01085 TPSinglesEvent *revt = 0;
01086 tprates->SetBranchAddress("tpevt",&revt);
01087
01088 if (Crate > 15) {
01089 int ientry = 0;
01090 while (tprates->GetEntry(ientry++)) {
01091 TClonesArray* chips = revt->ChipEvents;
01092 Double_t UTime = (revt->Time-ZeroTime->GetSec())/time_mult;
01093 int RateMap[16][3][6][2];
01094 memset(RateMap,0,16*3*6*2*sizeof(int));
01095 for (int i=0;i<chips->GetLast();i++) {
01096 TPChipEvent *chip = dynamic_cast<TPChipEvent*>(chips->At(i));
01097 if(chip->IsPulsed && !AllowPulsed && !chip->IsShield) continue;
01098 RateMap[chip->GetCrate()][chip->GetVarc()]
01099 [chip->GetVmm()][chip->GetVadc()] += chip->Rate;
01100 }
01101 for (int icrate=0; icrate<NCrates; icrate++) {
01102 for (int ivarc=0; ivarc<3; ivarc++) {
01103 for (int ivmm=0; ivmm<6; ivmm++) {
01104 if(RateMap[icrate][ivarc][ivmm][0] > 1)
01105 CrateVarcVmmVadc0[icrate][ivarc][ivmm]->Fill(UTime,
01106 RateMap[icrate][ivarc][ivmm][0]);
01107 if(RateMap[icrate][ivarc][ivmm][1] > 1)
01108 CrateVarcVmmVadc1[icrate][ivarc][ivmm]->Fill(UTime,
01109 RateMap[icrate][ivarc][ivmm][1]);
01110 }
01111 }
01112 }
01113 }
01114 }
01115 else {
01116 int ientry = 0;
01117 while (tprates->GetEntry(ientry++)) {
01118 TClonesArray* chips = revt->ChipEvents;
01119 Double_t UTime = (revt->Time-ZeroTime->GetSec())/time_mult;
01120 int RateMap[3][6][2];
01121 memset(RateMap,0,3*6*2*sizeof(int));
01122 for (int i=0;i<chips->GetLast();i++) {
01123 TPChipEvent *chip = dynamic_cast<TPChipEvent*>(chips->At(i));
01124 if(!chip->IsLoc(Crate)) continue;
01125 if(chip->IsPulsed && !AllowPulsed) continue;
01126 RateMap[chip->GetVarc()][chip->GetVmm()][chip->GetVadc()] +=
01127 chip->Rate;
01128 }
01129 for (int ivarc=0; ivarc<3; ivarc++) {
01130 for (int ivmm=0; ivmm<6; ivmm++) {
01131 if(RateMap[ivarc][ivmm][0] > 0)
01132 CrateVarcVmmVadc0[0][ivarc][ivmm]->Fill(UTime,
01133 RateMap[ivarc][ivmm][0]);
01134 if(RateMap[ivarc][ivmm][1] > 0)
01135 CrateVarcVmmVadc1[0][ivarc][ivmm]->Fill(UTime,
01136 RateMap[ivarc][ivmm][1]);
01137 }
01138 }
01139 }
01140 }
01141
01142 for(int i=FirstCrate; i<=LastCrate; i++) {
01143 int icrate = i - FirstCrate;
01144 tc = new TCanvas(Form("Crate%d",i), Form("Crate%d",i),
01145 612, 792, 612, 792);
01146 tc->Range(0.0,0.0,1.0,1.0);
01147 tc->SetGridx(0);
01148 tc->SetGridy(0);
01149 tc->SetFrameFillColor(0);
01150
01151 TPaveText* pl = new TPaveText(0.0,0.9,1.0,1.0);
01152 pl->SetBorderSize(1);
01153 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
01154 else pl->AddText("RawTpSinglesSummaryBlock Rates");
01155 pl->AddText(Form("Crate %d Profiles %s",i,bin_str.c_str()));
01156 pl->Draw();
01157
01158 vector <TPad*> dpad;
01159 for (Int_t ipad=0; ipad<3; ipad++) {
01160 double x = (double)ipad;
01161 dpad.push_back(new TPad(Form("dpad%d",ipad),Form("dpad%d",ipad),
01162 0.3*x+0.09, 0., 0.3*(x+1)+0.09, 0.85));
01163
01164 dpad[ipad]->SetBorderSize(1);
01165 dpad[ipad]->SetGridx(0);
01166 dpad[ipad]->SetGridy(0);
01167 dpad[ipad]->SetFrameFillColor(0);
01168 dpad[ipad]->Divide(1,6, 0.001, 0.001);
01169 dpad[ipad]->Draw();
01170 }
01171
01172 TText* text = new TText();
01173 text->SetTextSize(0.03);
01174 text->SetTextAlign(22);
01175 for (int ivarc=0; ivarc<3; ivarc++) {
01176 double y = (double)ivarc;
01177 text->DrawText(0.3*(y+0.5)+0.09,0.87,Form("VARC%d",ivarc));
01178 }
01179
01180 text->SetTextAngle(90);
01181 for (Int_t ivmm=0; ivmm<6; ivmm++) {
01182 double y = (double)ivmm;
01183 text->DrawText(0.045,(0.85*(y+0.5)/6.0),Form("VMM%d",ivmm));
01184 }
01185
01186 for (int ivarc=0; ivarc<3; ivarc++) {
01187 for (int ivmm=0; ivmm<6; ivmm++) {
01188 dpad[ivarc]->cd(6-ivmm);
01189 if(CrateVarcVmmVadc0[icrate][ivarc][ivmm]->GetMean(2) == 0 &&
01190 CrateVarcVmmVadc1[icrate][ivarc][ivmm]->GetMean(2) == 0) continue;
01191 CrateVarcVmmStack[icrate][ivarc][ivmm]->Draw("nostack");
01192 CrateVarcVmmStack[icrate][ivarc][ivmm]->GetXaxis()->SetTitle(
01193 (time_str + " since " + ZeroStr).c_str());
01194 CrateVarcVmmStack[icrate][ivarc][ivmm]->GetXaxis()->CenterTitle();
01195 CrateVarcVmmStack[icrate][ivarc][ivmm]->GetYaxis()->SetTitle("TP Rate (Hz)");
01196 CrateVarcVmmStack[icrate][ivarc][ivmm]->GetYaxis()->CenterTitle();
01197 TLegend *leg = new TLegend(0.5,0.875,0.99,0.99);
01198 leg->SetBorderSize(1);
01199 leg->AddEntry(CrateVarcVmmVadc0[icrate][ivarc][ivmm],
01200 Form("Vadc 0 Mean=%-6.2f RMS=%-4.4f",
01201 CrateVarcVmmVadc0[icrate][ivarc][ivmm]->GetMean(2),
01202 CrateVarcVmmVadc0[icrate][ivarc][ivmm]->GetRMS(2)),
01203 "l");
01204 leg->AddEntry(CrateVarcVmmVadc1[icrate][ivarc][ivmm],
01205 Form("Vadc 1 Mean=%-6.2f RMS=%-4.4f",
01206 CrateVarcVmmVadc1[icrate][ivarc][ivmm]->GetMean(2),
01207 CrateVarcVmmVadc1[icrate][ivarc][ivmm]->GetRMS(2)),
01208 "l");
01209 leg->Draw();
01210 }
01211 }
01212
01213 for (int ivarc=0; ivarc<3 ; ivarc++) {
01214 for (int ivmm=0; ivmm<6; ivmm++) {
01215 double MaxRate = -10.0;
01216 double MinRate = 99e99;
01217 for (int k=0;k<NBins;k++) {
01218 double BinRate = CrateVarcVmmVadc0[icrate][ivarc][ivmm]->GetBinContent(k);
01219 double BinErr = CrateVarcVmmVadc0[icrate][ivarc][ivmm]->GetBinError(k);
01220 if (BinRate>0 && BinErr>0) {
01221 if(BinRate+BinErr > MaxRate) MaxRate = BinRate+BinErr;
01222 if(BinRate-BinErr < MinRate) MinRate = BinRate-BinErr;
01223 }
01224 BinRate = CrateVarcVmmVadc1[icrate][ivarc][ivmm]->GetBinContent(k);
01225 BinErr = CrateVarcVmmVadc1[icrate][ivarc][ivmm]->GetBinError(k);
01226 if (BinRate>0 && BinErr>0) {
01227 if(BinRate+BinErr > MaxRate) MaxRate = BinRate+BinErr;
01228 if(BinRate-BinErr < MinRate) MinRate = BinRate-BinErr;
01229 }
01230 }
01231 if (MaxRate-MinRate <= 0.002) {
01232 if(loud>=2) cout << "Adjusting Min/Max Rate for small range\n";
01233 MinRate = MinRate - 1.0;
01234 MaxRate = MaxRate + 1.0;
01235 }
01236
01237 double MinY = MinRate - (MaxRate -MinRate)*0.1;
01238 if(MinY < 0.0) MinY = 0.0;
01239 double MaxY = MaxRate + (MaxRate -MinRate)*0.1;
01240
01241 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01242 CrateVarcVmmStack[icrate][ivarc][ivmm]->SetMinimum(MinY);
01243 CrateVarcVmmStack[icrate][ivarc][ivmm]->SetMaximum(MaxY);
01244 }
01245 }
01246
01247 tc->Write();
01248 tc->Print((TPBase+".ps").c_str());
01249 }
01250
01251 tc = new TCanvas("Init","Init",612, 792, 612, 792);
01252 tc->Print((TPBase+".ps]").c_str());
01253 tc->Close();
01254
01255 if (root_files) {
01256 for(int icrate=0; icrate<NCrates; icrate++) {
01257 for (int ivarc=0; ivarc<3; ivarc++) {
01258 for (int ivmm=0; ivmm<6; ivmm++) {
01259 CrateVarcVmmVadc0[icrate][ivarc][ivmm]->Write();
01260 CrateVarcVmmVadc1[icrate][ivarc][ivmm]->Write();
01261 CrateVarcVmmStack[icrate][ivarc][ivmm]->Write();
01262 }
01263 }
01264 }
01265 tc->Write();
01266 tf->Write();
01267 tf->Close();
01268 }
01269 }
|
|
|
Definition at line 822 of file rate_plot.cc. References AllowPulsed, bin_str, chain_title, crate4_disp(), TPSinglesEvent::CratePulsed, TPSinglesEvent::CrateRate, Form(), LocalOffset, LocalOffsetStr, loud, MaxX, MinX, NBins, BlockEvent::Time, time_range(), time_str, and ZeroTime. Referenced by main(). 00823 {
00824 if(loud>=1) cout << "Entering routine tp_plot" << endl;
00825 TPad *drawpad = 0;
00826 TCanvas *rcan = 0;
00827 TPaveText *pl = 0;
00828 TProfile *rate_proj[16];
00829 string TPBase="TP"+NameBase;
00830
00831 //Open a file if requested
00832 TFile *tf = 0;
00833 ofstream tf_txt;
00834 if (root_files) {
00835 tf = new TFile((TPBase+".root").c_str(),"RECREATE");
00836 tf->cd();
00837 }
00838
00839 rcan = crate4_disp("Init");
00840 rcan->Print((TPBase+".ps[").c_str());
00841 rcan->Close();
00842
00843 if(loud >= 1) cout << "Top Title for tprates plot: " << chain_title << endl;
00844
00845 char names_list[4][16];
00846
00847 //tprates->SetBranchStatus("*ChipEvent*",0);
00848 time_range((TTree*)tprates);
00849
00850 char hname[20];
00851 char htitle[30];
00852 for (int i=0;i<NCRATE;i++) {
00853 sprintf(hname,"rproj%d",i);
00854 sprintf(htitle,"Crate %d Rate",i);
00855 rate_proj[i] = new TProfile(hname,htitle,NBins,MinX,MaxX);
00856 }
00857
00858 //tprates->SetBranchStatus("*CrateRate*",1);
00859 //tprates->SetBranchStatus("*Time*",1);
00860 if (tprates->GetBranch("tpevt")) {
00861 if (loud>=2) cout << "New Branch, read from TPSinglesEvent object" << endl;
00862 TPSinglesEvent *tpevt = 0;
00863 tprates->SetBranchAddress("tpevt",&tpevt);
00864 Int_t ientry = 0;
00865 tprates->GetEntry(0);
00866 while (tprates->GetEntry(ientry++)) {
00867 Double_t time_val = (tpevt->Time-ZeroTime->GetSec())/time_mult;
00868 for (int i=0;i<NCRATE;i++) {
00869 if(!AllowPulsed && tpevt->CratePulsed[i]) continue;
00870 (rate_proj[i])->Fill(time_val,(tpevt->CrateRate[i])/1000);
00871 }
00872 }
00873 }
00874 else {
00875 Int_t CrateRate[16];
00876 Int_t Time;
00877 if (loud>=2) cout << "Old Branch, read Time and CrateRate branches" << endl;
00878 tprates->SetBranchAddress("Time",&Time);
00879 tprates->SetBranchAddress("CrateRate",CrateRate);
00880 Int_t ientry = 0;
00881 while (tprates->GetEntry(ientry++)) {
00882 Double_t time_val = (Time-ZeroTime->GetSec())/time_mult;
00883 for(int i=0;i<NCRATE;i++)
00884 (rate_proj[i])->Fill(time_val,(CrateRate[i])/1000);
00885 }
00886 }
00887
00888 sprintf(names_list[0],"SM1South");
00889 sprintf(names_list[1],"SM1North");
00890 sprintf(names_list[2],"SM2South");
00891 sprintf(names_list[3],"SM2North");
00892
00893 TLegend *leg = 0;
00894 rcan = crate4_disp("Profiles");
00895 pl = new TPaveText(0,0.9,1,1);
00896 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
00897 else pl->AddText("RawTpSinglesSummaryBlock Rates");
00898 pl->AddText(("Z-Progression Profiles "+bin_str).c_str());
00899 rcan->cd(0);
00900 pl->SetBorderSize(1);
00901 pl->Draw();
00902 char stats[40];
00903
00904 drawpad = dynamic_cast<TPad*>(rcan->FindObject("drawpad"));
00905 TH2D *prof_base[4];
00906 double MinRate, MaxRate;
00907
00908 for (int i=0;i<4;i++) {
00909 MaxRate = -10;
00910 MinRate = 10000000;
00911 Double_t BinRate,BinErr;
00912 for (int j=0;j<4;j++) {
00913 for (int k=0;k<rate_proj[4*i+j]->GetNbinsX();k++) {
00914 BinRate = rate_proj[4*i+j]->GetBinContent(k);
00915 BinErr = rate_proj[4*i+j]->GetBinError(k);
00916 if(BinRate==0 && BinErr==0)
00917 continue;
00918 if(BinRate+BinErr > MaxRate)
00919 MaxRate = BinRate+BinErr;
00920 if(BinRate-BinErr < MinRate)
00921 MinRate = BinRate-BinErr;
00922 }
00923 }
00924 if (MaxRate-MinRate <= 0.002) {
00925 if(loud>=2) cout << "Adjusting Min and Max Rate for small range\n";
00926 MinRate = MinRate - 1.0;
00927 MaxRate = MaxRate + 1.0;
00928 }
00929 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
00930 TPad *tpad = dynamic_cast<TPad*>(drawpad->cd(i+1));
00931 tpad->SetRightMargin(0.01);
00932 prof_base[i] = new TH2D(names_list[i],names_list[i],NBins,MinX,MaxX,
00933 50,MinRate-0.1*(MaxRate-MinRate),
00934 MaxRate+0.1*(MaxRate-MinRate));
00935 if(loud>=2) printf("Base Name = %s\n",names_list[i]);
00936 if(loud>=2) printf("BinsX=%d MinX=%f MaxX=%f\n",NBins,MinX,MaxX);
00937 if(loud>=2) printf("BinsY=%d MinY=%f MaxY=%f\n",50,MinRate-0.1*(MaxRate-MinRate),MaxRate+0.1*(MaxRate-MinRate));
00938
00939 string x_title;
00940 x_title = time_str + " since " + ZeroStr;
00941 prof_base[i]->GetXaxis()->SetTitle(x_title.c_str());
00942 prof_base[i]->GetXaxis()->CenterTitle();
00943 prof_base[i]->GetYaxis()->SetTitle("TP Rate (kHz)");
00944 prof_base[i]->GetYaxis()->CenterTitle();
00945 prof_base[i]->Draw();
00946 leg = new TLegend(0.55,0.875,1.0,1.0);
00947 leg->SetBorderSize(1);
00948 for (int j=0;j<4;j++) {
00949 rate_proj[4*i+j]->Draw("SAME");
00950 rate_proj[4*i+j]->SetLineColor(j+1);
00951 sprintf(stats,"Crate %d Mean=%-6.2f RMS=%-4.4f",(4*i+j),
00952 rate_proj[4*i+j]->GetMean(2),rate_proj[4*i+j]->GetRMS(2));
00953 leg->AddEntry(rate_proj[4*i+j],stats,"l");
00954 }
00955 leg->Draw();
00956
00957 tpad->Modified();
00958 tpad->Update();
00959
00960 //Add an axis atop the plot with
00961 if (ZoneUTC) {
00962 tpad->SetTopMargin(0.23);
00963 tpad->SetTickx(0);
00964 TGaxis *LocalTimeAxis = new TGaxis(MinX, tpad->GetUymax(),
00965 MaxX, tpad->GetUymax(), MinX-(LocalOffset/time_mult),
00966 MaxX-(LocalOffset/time_mult), 510, "-");
00967 LocalTimeAxis->SetTitle(Form("%s since %s (%s)", time_str.c_str(),
00968 ZeroTime->AsString("s"), LocalOffsetStr.c_str()));
00969 LocalTimeAxis->CenterTitle();
00970
00971 LocalTimeAxis->Draw();
00972 }
00973
00974 tpad->Modified();
00975 tpad->Update();
00976 }
00977
00978 if(loud>=3) cout << "Printing Canvas\n";
00979 rcan->Print((TPBase+".ps").c_str());
00980
00981 if (root_files) {
00982 if(loud>=2) cout << "Writing THistos, TCanvases, and TChains\n";
00983
00984 //Write the histograms
00985 for (int i=0;i<4;i++) {
00986 for (int j=0;j<4;j++)
00987 rate_proj[4*i+j]->Write();
00988 prof_base[i]->Write();
00989 }
00990
00991 //Write the canvas
00992 rcan->Write();
00993
00994 //Write the tree
00995 tprates->Write();
00996
00997 }
00998 rcan->Close();
00999
01000 if(loud>=3) cout << "Printing Closing Canvas\n";
01001 rcan = crate4_disp("Fini");
01002 rcan->Print((TPBase+".ps]").c_str());
01003 rcan->Close();
01004
01005 if(loud>=3) cout << "Deleting histograms\n";
01006 for(int i=0;i<16;i++) rate_proj[i]->Delete();
01007 for(int i=0;i<4;i++) prof_base[i]->Delete();
01008
01009 if (root_files) {
01010 tf->Write();
01011 tf->Close();
01012 }
01013 }
|
|
||||||||||||||||||||
|
Definition at line 1271 of file rate_plot.cc. References bin_str, chain_title, BlockEvent::ChipEvents, crate2_disp(), Form(), ChipEvent::GetVachip(), ChipEvent::GetVadc(), ChipEvent::IsLoc(), TPChipEvent::IsPulsed, loud, MaxX, MinX, NBins, TPChipEvent::Rate, BlockEvent::Time, time_range(), time_str, and ZeroTime. Referenced by main(). 01272 {
01273 if(loud>=1) cout << "Entering routine tp_vmm_plot" << endl;
01274 TPad *drawpad = 0;
01275 TCanvas *rcan = 0;
01276 TPaveText *pl = 0;
01277 TProfile *rate_proj[2][3];
01278 string TPBase = Form("TPVMM%d-%d-%d",Crate,Varc,Vmm);
01279 TPBase += NameBase;
01280
01281 //Open a file if requested
01282 TFile *tf = 0;
01283 if (root_files) {
01284 tf = new TFile((TPBase+".root").c_str(),"RECREATE");
01285 tf->cd();
01286 }
01287
01288 rcan = crate2_disp("Init");
01289 rcan->Print((TPBase+".ps[").c_str());
01290 rcan->Close();
01291
01292 if(loud >= 1) cout << "Top Title for tprates plot: " << chain_title << endl;
01293
01294 char names_list[2][16];
01295
01296 time_range((TTree*)tprates);
01297
01298 Double_t MinRate, MaxRate;
01299 char hname[20];
01300 char htitle[30];
01301 for(int i=0;i<2;i++) for (int j=0;j<3;j++) {
01302 sprintf(hname,"rproj%d_%d",i,j);
01303 sprintf(htitle,"ADC %d Chip %d Rate",i,j);
01304 rate_proj[i][j] = new TProfile(hname,htitle,NBins,MinX,MaxX);
01305 }
01306
01307 TPSinglesEvent *revt = 0;
01308 //tprates->SetBranchStatus("*",0);
01309 //tprates->SetBranchStatus("Time*",1);
01310 //tprates->SetBranchStatus("ChipEvents",1);
01311 tprates->SetBranchAddress("tpevt",&revt);
01312
01313 Int_t ientry = 0;
01314 while (tprates->GetEntry(ientry++)) {
01315
01316 TClonesArray* chips = revt->ChipEvents;
01317 Double_t time_val = (revt->Time-ZeroTime->GetSec())/time_mult;
01318 for (int i=0;i<chips->GetLast();i++) {
01319 TPChipEvent *chip = dynamic_cast<TPChipEvent*>(chips->At(i));
01320 if(chip->IsLoc(Crate,Varc,Vmm)) {
01321 if(chip->IsPulsed && !AllowPulsed) continue;
01322 rate_proj[chip->GetVadc()][chip->GetVachip()]->Fill(time_val,chip->Rate);
01323 }
01324 }
01325 }
01326
01327 sprintf(names_list[0],"Vadc 0");
01328 sprintf(names_list[1],"Vadc 1");
01329
01330 TLegend *leg = 0;
01331 rcan = crate2_disp("Vmm");
01332 pl = new TPaveText(0,0.9,1,1);
01333 if(chain_title.size() != 0) pl->AddText(chain_title.c_str());
01334 else pl->AddText("RawTpSinglesSummaryBlock Rates");
01335 pl->AddText(Form("Vmm Profiles %d-%d-%d %s",Crate,Varc,Vmm,bin_str.c_str()));
01336 rcan->cd(0);
01337 pl->SetBorderSize(1);
01338 pl->Draw();
01339 char stats[40];
01340
01341 drawpad = dynamic_cast<TPad*>(rcan->FindObject("drawpad"));
01342 TH2D *prof_base[2];
01343 for (int i=0;i<2;i++) {
01344 MaxRate = -10;
01345 MinRate = 10000000;
01346 Double_t BinRate,BinErr;
01347 for (int j=0;j<3;j++) {
01348 for (int k=0;k<rate_proj[i][j]->GetNbinsX();k++) {
01349 BinRate = rate_proj[i][j]->GetBinContent(k);
01350 BinErr = rate_proj[i][j]->GetBinError(k);
01351 if(BinRate==0 && BinErr==0)
01352 continue;
01353 if(BinRate+BinErr > MaxRate)
01354 MaxRate = BinRate+BinErr;
01355 if(BinRate-BinErr < MinRate)
01356 MinRate = BinRate-BinErr;
01357 }
01358 }
01359 if (MaxRate-MinRate <= 0.002) {
01360 if(loud>=2) cout << "Adjusting Min and Max Rate for small range\n";
01361 MinRate = MinRate - 1.0;
01362 MaxRate = MaxRate + 1.0;
01363 }
01364 if(loud>=2) printf("MinRate=%-.6f MaxRate=%.6f\n",MinRate,MaxRate);
01365 drawpad->cd(i+1);
01366 prof_base[i] = new TH2D(names_list[i],names_list[i],NBins,MinX,MaxX,
01367 50,MinRate-0.1*(MaxRate-MinRate),
01368 MaxRate+0.1*(MaxRate-MinRate));
01369 if(loud>=2) printf("Base Name = %s\n",names_list[i]);
01370 if(loud>=2) printf("BinsX=%d MinX=%f MaxX=%f\n",NBins,MinX,MaxX);
01371 if(loud>=2) printf("BinsY=%d MinY=%f MaxY=%f\n",50,MinRate-0.1*(MaxRate-MinRate),MaxRate+0.1*(MaxRate-MinRate));
01372
01373 string x_title;
01374 x_title = time_str + " since " + ZeroStr;
01375 prof_base[i]->GetXaxis()->SetTitle(x_title.c_str());
01376 prof_base[i]->GetXaxis()->CenterTitle();
01377 prof_base[i]->GetYaxis()->SetTitle("TP Rate (Hz)");
01378 prof_base[i]->GetYaxis()->CenterTitle();
01379 prof_base[i]->Draw();
01380 leg = new TLegend(0.55,0.875,1.0,1.0);
01381 leg->SetBorderSize(1);
01382 for (int j=0;j<3;j++) {
01383 rate_proj[i][j]->Draw("SAME");
01384 rate_proj[i][j]->SetLineColor(j+2);
01385 sprintf(stats,"Vachip %d Mean=%-6.2f RMS=%-4.4f",j,
01386 rate_proj[i][j]->GetMean(2),rate_proj[i][j]->GetRMS(2));
01387 leg->AddEntry(rate_proj[i][j],stats,"l");
01388 if(root_files) rate_proj[i][j]->Write();
01389 }
01390 leg->Draw();
01391
01392 if(root_files) prof_base[i]->Write();
01393 }
01394
01395 if(loud>=3) cout << "Printing Canvas\n";
01396 rcan->Print((TPBase+".ps").c_str());
01397
01398 if (root_files) {
01399 if(loud>=2) cout << "Writing THistos, TCanvases, and TChains\n";
01400 rcan->Write();
01401 tprates->Write();
01402 }
01403 rcan->Close();
01404
01405 if(loud>=3) cout << "Printing Closing Canvas\n";
01406 rcan = crate2_disp("Fini");
01407 rcan->Print((TPBase+".ps]").c_str());
01408 rcan->Close();
01409
01410 if(loud>=3) cout << "Deleting histograms\n";
01411 for(int i=0;i<2;i++) for(int j=0;j<3;j++) rate_proj[i][j]->Delete();
01412 for(int i=0;i<2;i++) prof_base[i]->Delete();
01413
01414 if (root_files) {
01415 tf->Write();
01416 tf->Close();
01417 }
01418 }
|
|
|
Definition at line 121 of file rate_plot.cc. References bin_str, bin_width, fOptSignal, fPlaneLimit, and time_str. Referenced by LeaMemMonitor::CalcBytes(). 00122 {
00123 cout << "Usage: rate_plot -qvhntWMR -D,T,L [base] -C [Title] "
00124 << " -V [Crate-Varc-Vmm]"
00125 << " -x [X-Axis] -B [BinWidth]"
00126 << " -P [PlaneLimit] -s [OptRate]"
00127 << " [List of .rate.root files]" << endl;
00128 cout << " -v: Verbose output up one level\n";
00129 cout << " -q: Quiet output down one level\n";
00130 cout << " -h: Output this usage statement\n";
00131 cout << " -n: Dry Run (not for real, just for play)\n";
00132 cout << " -V [Crate-Varc-Vmm]: Make chip level plots\n";
00133 cout << " -W: Weekly binning convention, zero on Sunday, days on X-axis, 1 hour bins\n";
00134 cout << " -w [DATE]: Weekly binning convention zero day to DATE"
00135 << " (20071022 e.g.)" << endl;
00136 cout << " -M: Monthly binning convention, zero on end of month, days on X-axis, 4 hour bins\n";
00137 cout << " -m DATE: Monthly binning convention for month of DATE"
00138 << " (200710 e.g.)" << endl;
00139 cout << " -T \"title\": Title to go atop all plots\n";
00140 cout << " -X [S,M,H,D]: X-axis on seconds, minutes, hours, or days ("
00141 << time_str << ")" << endl;
00142 cout << " -B BinWidth[S,M,H,D]: Bin by BinWidth seconds, minutes, hours, or days ("
00143 << bin_width << bin_str << ")" << endl;
00144 cout << " -P PlaneLimit: Number of planes on SM activity cuts("
00145 << fPlaneLimit << ")" << endl;
00146 cout << " -s OptRate: Optimal Signal Snarl Rate ("
00147 << fOptSignal << ")" << endl;
00148 cout << " -A [P,S,p,s]: Allow (capital letter) or Disallow (small letter) pulsed (p or P) and shield (s or S)" << endl;
00149 }
|
|
|
Definition at line 116 of file rate_plot.cc. Referenced by main(), tp_crate_plot(), and tp_plot(). |
|
|
Definition at line 117 of file rate_plot.cc. Referenced by main(). |
|
|
Definition at line 69 of file rate_plot.cc. Referenced by ds_plot(), and time_range(). |
|
|
Definition at line 68 of file rate_plot.cc. Referenced by AlgFitTrackCam::NDStripBegTime(), and time_range(). |
|
|
Definition at line 71 of file rate_plot.cc. Referenced by ds_plot(), main(), and time_range(). |
|
|
Definition at line 78 of file rate_plot.cc. Referenced by main(), and time_range(). |
|
|
Definition at line 79 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), main(), tp_crate_plot(), tp_plot(), tp_vmm_plot(), and usage(). |
|
|
Definition at line 80 of file rate_plot.cc. Referenced by main(), time_range(), and usage(). |
|
|
Definition at line 92 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), main(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 53 of file rate_plot.cc. |
|
|
Definition at line 69 of file rate_plot.cc. Referenced by ds_plot(), and time_range(). |
|
|
Definition at line 68 of file rate_plot.cc. Referenced by time_range(). |
|
|
Definition at line 86 of file rate_plot.cc. |
|
|
Definition at line 67 of file rate_plot.cc. Referenced by ds_plot(), run_time(), and time_range(). |
|
|
Definition at line 89 of file rate_plot.cc. |
|
|
Definition at line 90 of file rate_plot.cc. |
|
|
Definition at line 88 of file rate_plot.cc. |
|
|
Definition at line 87 of file rate_plot.cc. |
|
|
Definition at line 83 of file rate_plot.cc. Referenced by RunFileModule::RunFileModule(), and RunSummary::RunSummary(). |
|
|
Definition at line 84 of file rate_plot.cc. |
|
|
Definition at line 85 of file rate_plot.cc. |
|
|
Definition at line 61 of file rate_plot.cc. Referenced by ds_plot(), time_range(), and tp_plot(). |
|
|
Definition at line 62 of file rate_plot.cc. Referenced by ds_plot(), time_range(), and tp_plot(). |
|
|
Definition at line 52 of file rate_plot.cc. Referenced by cfgtest(), crate2_disp(), crate4_disp(), ds_crate_plot(), ds_plot(), ds_vmm_plot(), isetup(), main(), other_run(), ptrig_run(), run_time(), sepruns(), set_style(), PlotMan::SetLoud(), single_disp(), time_range(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 67 of file rate_plot.cc. Referenced by CoilTools::Distill(), ds_plot(), run_time(), and time_range(). |
|
|
Definition at line 66 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), time_range(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 67 of file rate_plot.cc. Referenced by ds_plot(), run_time(), and time_range(). |
|
|
Definition at line 66 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), run_time(), time_range(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 93 of file rate_plot.cc. Referenced by main(). |
|
|
Definition at line 81 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), UtilHist::FOMCutLow(), run_time(), UtilHist::SFOMCutLow(), time_range(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 54 of file rate_plot.cc. |
|
|
Definition at line 56 of file rate_plot.cc. Referenced by ds_plot(), main(), run_time(), and time_range(). |
|
|
Definition at line 57 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), main(), tp_crate_plot(), tp_plot(), tp_vmm_plot(), and usage(). |
|
|
Definition at line 77 of file rate_plot.cc. Referenced by main(), and time_range(). |
|
|
Definition at line 69 of file rate_plot.cc. Referenced by ds_plot(), time_range(), and tp_crate_plot(). |
|
|
Definition at line 68 of file rate_plot.cc. Referenced by ds_plot(), ds_vmm_plot(), time_range(), tp_crate_plot(), tp_plot(), and tp_vmm_plot(). |
|
|
Definition at line 58 of file rate_plot.cc. Referenced by main(), and time_range(). |
|
|
Definition at line 59 of file rate_plot.cc. Referenced by main(). |
|
|
Definition at line 60 of file rate_plot.cc. Referenced by main(), and time_range(). |
1.3.9.1