pmt_plot.h File Reference

Go to the source code of this file.

Functions

void pmt_plot ()

Function Documentation

void pmt_plot (  ) 

Definition at line 449 of file pmt_plot.cxx.

References PlexPixelSpotId::AsString(), det, Form(), PlexHandle::GetAllTubes(), Calibrator::Instance(), SimFlag::kData, Detector::kFar, PlotPmt(), and server.

00450 {
00451   TCanvas* cpmt = (TCanvas*) gROOT->FindObject("cpmt");
00452   if(cpmt) delete cpmt;
00453   cpmt = new TCanvas("cpmt","cpmt",1000,750);
00454   
00455   TPostScript* ps = 0;
00456   ps = new TPostScript("pmt_drift.ps",112);
00457   gStyle->SetTimeOffset(0);
00458 
00459 
00460   // For some reason, I have to do this before I open the TMySQL interface.
00461   Calibrator::Instance();
00462 
00463   // Load db:
00464   TString host(getenv("ENV_TSQL_URL") );
00465   host.ReplaceAll("odbc:","");
00466   if(!server) {
00467     //server = new TMySQLServer( "mysql://minos-db1.fnal.gov/offline", "reader","minos_db");
00468     server = new TMySQLServer( "mysql://localhost/offline", "reader","numi96");
00469                              // host.Data(),
00470                              //  getenv("ENV_TSQL_USER"),
00471                              //  getenv("ENV_TSQL_PSWD")
00472                               // );
00473   }
00474 
00475   PlexPixelSpotId tube;
00476   
00477   /*
00478   tube = PlexPixelSpotId(2701264895);
00479   if(ps) ps->NewPage();
00480   PlotPmt(server, tube);
00481   Pause();
00482   
00483   tube = PlexPixelSpotId(2701266943);
00484   if(ps) ps->NewPage();
00485   PlotPmt(server, tube);
00486   Pause();
00487   */
00488 
00489   //Detector::Detector_t det = Detector::kNear;
00490   Detector::Detector_t det = Detector::kFar;
00491 
00492   
00493   VldContext cx(det,SimFlag::kData,VldTimeStamp());
00494   PlexHandle plex(cx);
00495   const std::vector<PlexPixelSpotId>& tubes = plex.GetAllTubes();
00496 
00497   //std::vector<PlexPixelSpotId> tubes;
00498   //ElecType::Elec_t elec = ElecType::kVA;
00499   //for(char ew = 'E'; ew<='W'; ew+='W'-'E')
00500   //  for(char ul = 'L'; ul<='U'; ul+='U'-'L') 
00501   //    for(int bay=1;bay<=16;bay++) 
00502   //    for(int inrack=0;inrack<=9;inrack++)
00503   //      for(int t=0;t<3;t++) {
00504   //        tubes.push_back(
00505   //                        PlexPixelSpotId(det,elec,ew,ul,bay,inrack,t,0,0)
00506   //                        );
00507   //      }
00508 
00509   if(ps) ps->NewPage();
00510 
00511   for(UInt_t i=0;i<tubes.size();i++) {
00512     tube = tubes[i];
00513     int res = PlotPmt(server, tube);
00514     if(res) {
00515       ps->NewPage();
00516       cpmt->Print(Form("pmt_drifts/%s.gif",tube.AsString("t")));
00517     }
00518   }
00519   
00520   if(ps) ps->Close();
00521 }


Generated on 8 Jul 2019 for loon by  doxygen 1.6.1