00001
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 "Toolbox.hh"
00029 #include "MicroException.hh"
00030
00031
00032 #include <TApplication.h>
00033 #include <TGClient.h>
00034 #include <TGListBox.h>
00035 #include <TList.h>
00036
00037
00038
00039 using namespace std;
00040
00041
00042
00043 int main(int argc, char **argv)
00044
00045 {
00046
00047 FILELog::ReportingLevel() = FILELog::FromString(INFO);
00048
00049
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
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
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 }