pxar
 All Classes Namespaces Functions Variables Typedefs Friends
fullTest.C
1 // -- Invocation:
2 // --------------
3 // ../bin/pXar -d ../data/defaultParametersRocPSI46digV2 -c '../scripts/fullTest.C("fulltest", "fulltest.root")'
4 
5 void fullTest(string testname = "fulltest", string rootfilename = "fulltest.root", string cfgdirectory = "../data/defaultParametersRocPSI46digV2") {
6  ConfigParameters *configParameters = ConfigParameters::Singleton();
7 
8  configParameters->setDirectory(cfgdirectory);
9  string cfgFile = configParameters->getDirectory() + string("/configParameters.dat");
10  configParameters->readConfigParameterFile(cfgFile);
11 
12  string rootfile = rootfilename;
13 
14  PixTestParameters *ptp = new PixTestParameters(configParameters->getDirectory() + "/" + configParameters->getTestParameterFileName());
15 
16  PixSetup *ap = new PixSetup("DEBUG", ptp, configParameters);
17  ap->setDummy(true);
18  ap->setMoreWebCloning(true);
19 
20  cout << "pxar: dumping results into " << rootfile << endl;
21  TFile *rfile = TFile::Open(rootfile.c_str(), "RECREATE");
22 
23  PixTestFactory *factory = PixTestFactory::instance();
24 
25 
26  PixTestAlive *pt = factory->createTest(testname, ap);
27  pt->doTest();
28 
29  delete pt;
30  rfile->Close();
31 
32  ap->killApi();
33 }
void doTest()
function connected to "DoTest" button of PixTab