/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/analyse/root/rootCoordonate.cpp

Go to the documentation of this file.
00001 /* @version $Revision: 1566 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2012-03-08 14:00:10 +0100 (Thu, 08 Mar 2012) $ */
00002 #include <TROOT.h>
00003 #include <TPaveLabel.h>
00004 #include <TRint.h>
00005 #include <TCanvas.h>
00006 #include <TTree.h>
00007 #include <TFile.h>
00008 #include <TSystem.h>
00009 #include <TGeoManager.h>
00010 #include <TGeoMatrix.h>
00011 #include <TCanvas.h>
00012 #include <iostream>
00013 #include <sstream>
00014 #include "Log.hh"
00015 
00016 #include "Run.hh"
00017 #include "Board.hh"
00018 #include "Chip.hh"
00019 #include "Dif.hh"
00020 #include "Chamber.hh"
00021 #include "Event.hh"
00022 #include "Detector.hh"
00023 #include "Centaure.hh"
00024 #include "GassiplexChamber1.hh"
00025 #include "GassiplexChamber4.hh"
00026 #include "Hardroc1Chamber.hh"
00027 #include "XMLTool.hh"
00028 #include "MicroException.hh"
00029 
00030 
00031 #include <TApplication.h>
00032 #include <TGClient.h>
00033 #include <TGListBox.h>
00034 #include <TList.h>
00035 
00036 
00037 
00038 using namespace std;
00039 
00040 
00041 //______________________________________________________________________________
00042 int main(int argc, char **argv)
00043 
00044 {  //un-named script to be run in ROOT framework
00045 
00046   FILELog::ReportingLevel() = FILELog::FromString(INFO);
00047 
00048 
00049 
00050   TApplication *theApp;
00051 
00052   argc = 1;
00053   theApp = new TRint("App", &argc, argv);
00054 
00055 
00056   /******************************************/
00057   /******************************************/
00058   /******************************************/
00059 
00060    TCanvas *c1 = new TCanvas("c1","Analyze.mac",620,790);
00061   //----- Control usage and option
00062    int xLength = 100;
00063    int yLength = 100;
00064 
00065    if ( argc == 3 ) {
00066      xLength = atoi(argv[1]);
00067      yLength = atoi(argv[2]);
00068    }
00069 
00070    cout << xLength << "," << yLength << endl;
00071    
00072    int padXlength = xLength / 3;
00073    int padYlength = yLength / 3;
00074 
00075    c1->Range(0,0,xLength,yLength);// (xmin,ymin,xmax,ymax
00076     
00077    stringstream label;
00078    label<< "ROOT("  << 0 << "," << 0 << ")" ;
00079    label<< "MICRO("  << 0 << "," << 0 << ")" ;
00080    TPaveLabel *pl1= new TPaveLabel(0,0 ,padXlength, padYlength,label.str().c_str()); // x1 x2 y1 y2
00081    pl1->Draw();
00082 
00083    {
00084      stringstream label;
00085      label<< "ROOT("  << 0 << "," << yLength << ")" ;
00086      label<< "MICRO("  << yLength << "," << 0 << ")" ;
00087      pl1= new TPaveLabel(0,yLength ,padXlength, yLength-padYlength,label.str().c_str()); // x1 x2 y1 y2
00088      pl1->Draw();
00089    }
00090    {
00091      stringstream label;
00092      label<< "ROOT("  << xLength << "," << yLength << ")" ;
00093      label<< "MICRO("  << yLength << "," << xLength << ")" ;
00094      pl1= new TPaveLabel(xLength,yLength ,xLength-padXlength, yLength-padYlength,label.str().c_str()); // x1 x2 y1 y2
00095      pl1->Draw();
00096    }
00097    {
00098      stringstream label;
00099      label<< "ROOT("  << xLength << "," << 0 << ")" ;
00100      label<< "MICRO("  << 0 << "," << xLength << ")" ;
00101      pl1= new TPaveLabel(xLength - padXlength,0 ,xLength, padYlength,label.str().c_str()); // x1 x2 y1 y2
00102      pl1->Draw();
00103    }
00104 
00105     FILE_LOG(logINFO) << "" << endl;
00106     FILE_LOG(logINFO) << "                                         axe X" << endl;
00107     FILE_LOG(logINFO) << "                                             " << endl;
00108     FILE_LOG(logINFO) << "                                            /\\" << endl;
00109     FILE_LOG(logINFO) << "                                             |" << endl;
00110     FILE_LOG(logINFO) << "                                             |" << endl;
00111     FILE_LOG(logINFO) << "                                             |" << endl;
00112     FILE_LOG(logINFO) << "SYSTEM de COORDONNEES: (0,0) en bas a gauche X--->  axe Y     " << endl;
00113     FILE_LOG(logINFO) << "  Z sortant." << endl;
00114 
00115    theApp->Run();
00116    delete theApp;
00117      // run ROOT application
00118    return 0;
00119 }

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7