#include <TROOT.h>
#include <TPaveLabel.h>
#include <TRint.h>
#include <TCanvas.h>
#include <TTree.h>
#include <TFile.h>
#include <TSystem.h>
#include <TGeoManager.h>
#include <TGeoMatrix.h>
#include <iostream>
#include <sstream>
#include "Log.hh"
#include "Run.hh"
#include "Board.hh"
#include "Chip.hh"
#include "Dif.hh"
#include "Chamber.hh"
#include "Event.hh"
#include "Detector.hh"
#include "Centaure.hh"
#include "GassiplexChamber1.hh"
#include "GassiplexChamber4.hh"
#include "Hardroc1Chamber.hh"
#include "XMLTool.hh"
#include "MicroException.hh"
#include <TApplication.h>
#include <TGClient.h>
#include <TGListBox.h>
#include <TList.h>
Include dependency graph for rootCoordonate.cpp:
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 42 of file rootCoordonate.cpp.
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 }