#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 "Toolbox.hh"#include "MicroException.hh"#include <TApplication.h>#include <TGClient.h>#include <TGListBox.h>#include <TList.h>Include dependency graph for repere.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 43 of file repere.cpp.
00045 { //un-named script to be run in ROOT framework 00046 00047 FILELog::ReportingLevel() = FILELog::FromString(INFO); 00048 00049 //----- Control usage and option 00050 if ( argc != 3 ) { 00051 FILE_LOG(logERROR) << "usage: channelDisplay streeFile chamberId " << endl; 00052 exit(1); 00053 } 00054 00055 string steerName; 00056 steerName.assign(argv[1]); 00057 00058 string chamberId; 00059 chamberId.assign(argv[2]); 00060 ui32 chamId = atoi(chamberId.c_str()); 00061 00062 TApplication *theApp; 00063 00064 argc = 1; 00065 theApp = new TRint("App", &argc, argv); 00066 00067 00068 /******************************************/ 00069 /******************************************/ 00070 /******************************************/ 00071 00072 // test if sterr file exist 00073 FILE *file = fopen(steerName.c_str(), "r"); 00074 if(file == NULL){ 00075 FILE_LOG(logERROR) << "Steer file ["<< steerName.c_str() << "] does not exist" << endl; 00076 exit(0); 00077 fclose(file); 00078 } 00079 // create Run, set detector and steerDesc from steer XML file 00080 SteerDesc steerDesc; 00081 XMLTool xml; 00082 xml.parse(steerDesc, steerName); 00083 00084 Detector detector; 00085 detector.build(steerDesc); 00086 00087 Run run(detector); 00088 00089 steerDesc.setRun(run); 00090 00091 fclose(file); 00092 00093 00094 /******************************************/ 00095 /******************************************/ 00096 /******************************************/ 00097 /******************************************/ 00098 /******************************************/ 00099 /******************************************/ 00100 00101 00102 string txt = ""; 00103 00104 float xLength, yLength = 0.; 00105 00106 const Chamber &chamber = detector.getChamberById(chamId); 00107 xLength = chamber.getXLength() + chamber.getX(); 00108 yLength = chamber.getYLength() + chamber.getY() ; 00109 cout << "chamber xPos[" << chamber.getX() << "]" << endl; 00110 cout << "chamber yPos[" << chamber.getY() << "]" << endl; 00111 cout << "chamber getLeftBottomX[" << chamber.getLeftBottomX() << endl; 00112 cout << "chamber getLeftBottomY[" << chamber.getLeftBottomY() << endl; 00113 cout << "chamber getRightUpperX[" << chamber.getRightUpperX() << endl; 00114 cout << "chamber getRightUpperY[" << chamber.getRightUpperY() << endl; 00115 cout << "chamber getXrotation[" << chamber.getXrotation() << endl;; 00116 cout << "chamber getYrotation[" << chamber.getYrotation() << endl; 00117 cout << "chamber getZrotation[" << chamber.getZrotation() << endl; 00118 getXLength 00119 00120 00121 return 0; 00122 }
1.4.7