/Users/jacquem/NetBeansProjects/MicromegasFramework/trunk/src/analyse/rootCoordonate.C File Reference

#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 <TreeClass.hh>
#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 "HardRockChamber6.hh"
#include "XMLTool.hh"
#include "MicroException.hh"
#include <TApplication.h>
#include <TGClient.h>
#include <TGListBox.h>
#include <TList.h>

Include dependency graph for rootCoordonate.C:

Go to the source code of this file.

Functions

int main (int argc, char **argv)


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 42 of file rootCoordonate.C.

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 << "," << yLength << ")" ;
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("  << 0 << "," << 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("  << xLength << "," << 0 << ")" ;
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("  << xLength << "," << yLength << ")" ;
00101      pl1= new TPaveLabel(xLength - padXlength,0 ,xLength, padYlength,label.str().c_str()); // x1 x2 y1 y2
00102      pl1->Draw();
00103    }
00104 
00105 
00106    theApp->Run();
00107    delete theApp;
00108      // run ROOT application
00109    return 0;
00110 }


Generated on Thu Jul 9 09:49:38 2009 for MicromegasFramework by  doxygen 1.5.8