00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <Stiostream.h>
00024 #include <unistd.h>
00025
00026 #include <string>
00027
00028 #include "StTpcSimpleGeometry.hh"
00029 #include "StTpcSimpleSlowControl.hh"
00030 #include "StTpcSimpleElectronics.hh"
00031 #include "StSimpleMagneticField.hh"
00032 #include "StTrsDeDx.hh"
00033
00034 int main (int argc,char* argv[])
00035 {
00036
00037
00038
00039
00040
00041 string geoFile("../run/TPCgeo.conf");
00042 if (access(geoFile.c_str(),R_OK)) {
00043 cerr << "ERROR:\n" << geoFile << " cannot be opened" << endl;
00044
00045 cerr << "Exitting..." << endl;
00046 exit(1);
00047 }
00048
00049 string scFile("../run/sc.conf");
00050 if (access(scFile.c_str(),R_OK)) {
00051 cerr << "ERROR:\n" << scFile << " cannot be opened" << endl;
00052
00053 cerr << "Exitting..." << endl;
00054 exit(1);
00055 }
00056
00057 string magFile("../run/example.conf");
00058 if (access(magFile.c_str(),R_OK)) {
00059 cerr << "ERROR:\n" << magFile << " cannot be opened" << endl;
00060 cerr << "Exitting..." << endl;
00061 exit(1);
00062 }
00063
00064 string electronicsFile("../run/electronics.conf");
00065 if (access(electronicsFile.c_str(),R_OK)) {
00066 cerr << "ERROR:\n" << electronicsFile << " cannot be opened" << endl;
00067 cerr << "Exitting..." << endl;
00068 exit(1);
00069 }
00070
00071
00072
00073
00074
00075 StTpcGeometry *geomDb =
00076 StTpcSimpleGeometry::instance(geoFile.c_str());
00077 geomDb->print();
00078
00079 StTpcElectronics *electronicsDb =
00080 StTpcSimpleElectronics::instance(electronicsFile.c_str());
00081 electronicsDb->print();
00082
00083 StTpcSlowControl *scDb =
00084 StTpcSimpleSlowControl::instance(scFile.c_str());
00085 scDb->print();
00086
00087 StMagneticField *magDb =
00088 StSimpleMagneticField::instance(magFile.c_str());
00089
00090
00091
00092
00093
00094
00095
00096
00097 return 0;
00098 }