Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:00

0001 #include "TMath.h"
0002 #include "TRint.h"
0003 #include "TGClient.h"
0004 #include "MusEcalGUI.hh"
0005 #include "../../interface/MEGeom.h"
0006 
0007 #include <iostream>
0008 
0009 using namespace std;
0010 
0011 int main(int argc, char **argv)
0012 {
0013   int type_   = ME::iLaser;
0014   int color_  = ME::iBlue; 
0015   bool useEN_ = false;
0016   int first_  = MusEcal::firstRun;
0017   int last_   = MusEcal::lastRun;
0018   bool debug_ = false;
0019 
0020   int c;
0021   while ( (c = getopt( argc, argv, "t:c:f:l:ed" ) ) != EOF ) 
0022     {
0023       switch (c) 
0024     {
0025     case 't': type_     = atoi( optarg );    break;
0026     case 'c': color_    = atoi(optarg);      break;
0027     case 'f': first_    = atoi(optarg);      break;
0028     case 'l': last_     = atoi(optarg);      break;
0029     case 'e': useEN_    = true;              break;
0030     case 'd': debug_    = true;              break;
0031     }
0032     }
0033 
0034   cout << endl;
0035   cout << "  ------------------------------------------" << endl; 
0036   cout << "  ---------  Welcome to MusEcal ------------" << endl; 
0037   cout << "  ------------------------------------------" << endl; 
0038   cout << "  -- Monitoring and Useful Survey of Ecal --" << endl;
0039   cout << "  -------- Clever Analysis of Laser --------" << endl;
0040   cout << "  ------------------------------------------" << endl; 
0041   cout << endl;
0042 
0043   ME::useElectronicNumbering = useEN_;
0044   MusEcal::verbose=debug_;
0045   MusEcal::firstRun=first_;
0046   MusEcal::lastRun =last_;
0047 
0048   UInt_t w, h;
0049   Double_t h1, h2;
0050 
0051   MusEcalGUI* me;
0052   TRint *theApp = new TRint("App", &argc, argv, NULL, 0);
0053 
0054   w  = gClient->GetDisplayWidth();
0055   h  = gClient->GetDisplayHeight();
0056 
0057   w -= 4;
0058 
0059   h1 = h;
0060   h1 -= 60;
0061   h2 = ((TMath::Sqrt(5.0) - 1.0)/2.0)*w;
0062   h  = (UInt_t)TMath::Min(h1,h2);
0063 
0064   me = new MusEcalGUI(  gClient->GetRoot(), w, h,
0065             type_, color_ );
0066 
0067   // test

0068   //  int ix_=0; int iy_=0;

0069   //  me->setChannel( MEGeom::iCrystal, ix_, iy_, false );

0070   //  me->curMgr()->fillMaps();

0071 
0072   theApp->Run();
0073 
0074   return(0);
0075 }