pxar
 All Classes Namespaces Functions Variables Typedefs Friends
PixUserTestFactory.cc
1 // ----------------------------------------------------------------------------
2 // This file is autogenerated. Do NOT edit. There is no need to edit this file!
3 // Your changes will be lost after the next invocation of cmake -D XXXX ..
4 // ----------------------------------------------------------------------------
5 #include <iostream>
6 #include <algorithm>
7 #include "log.h"
8 
9 #include "PixUserTestFactory.hh"
10 #include "PixTestBarePretest.hh"
11 #include "PixTestCmd.hh"
12 #include "PixTestDacScanCurrent.hh"
13 #include "PixTestDacScanPh.hh"
14 #include "PixTestDacScanPix.hh"
15 #include "PixTestDacScanRoc.hh"
16 #include "PixTestDacScanThr.hh"
17 #include "PixTestMap.hh"
18 #include "PixTestMapPh.hh"
19 #include "PixTestMapThr.hh"
20 #include "PixTestSetCalDel.hh"
21 #include "PixTestSetPh.hh"
22 #include "PixTestSetTrim.hh"
23 #include "PixTestSetVana.hh"
24 #include "PixTestShowIana.hh"
25 #include "PixTestThreshMap.hh"
26 
27 using namespace std;
28 using namespace pxar;
29 
30 
31 PixUserTestFactory* PixUserTestFactory::fInstance = 0;
32 
33 // ----------------------------------------------------------------------
34 PixUserTestFactory* PixUserTestFactory::instance() {
35  if (0 == fInstance) {
36  fInstance = new PixUserTestFactory();
37  }
38  return fInstance;
39 }
40 
41 // ----------------------------------------------------------------------
42 PixTest* PixUserTestFactory::createTest(string name, PixSetup *a) {
43  ::transform(name.begin(), name.end(), name.begin(), ::tolower);
44  if (!name.compare("barepretest")) return new PixTestBarePretest(a, "BarePretest");
45  if (!name.compare("cmd")) return new PixTestCmd(a, "Cmd");
46  if (!name.compare("dacscancurrent")) return new PixTestDacScanCurrent(a, "DacScanCurrent");
47  if (!name.compare("dacscanph")) return new PixTestDacScanPh(a, "DacScanPh");
48  if (!name.compare("dacscanpix")) return new PixTestDacScanPix(a, "DacScanPix");
49  if (!name.compare("dacscanroc")) return new PixTestDacScanRoc(a, "DacScanRoc");
50  if (!name.compare("dacscanthr")) return new PixTestDacScanThr(a, "DacScanThr");
51  if (!name.compare("map")) return new PixTestMap(a, "Map");
52  if (!name.compare("mapph")) return new PixTestMapPh(a, "MapPh");
53  if (!name.compare("mapthr")) return new PixTestMapThr(a, "MapThr");
54  if (!name.compare("setcaldel")) return new PixTestSetCalDel(a, "SetCalDel");
55  if (!name.compare("setph")) return new PixTestSetPh(a, "SetPh");
56  if (!name.compare("settrim")) return new PixTestSetTrim(a, "SetTrim");
57  if (!name.compare("setvana")) return new PixTestSetVana(a, "SetVana");
58  if (!name.compare("showiana")) return new PixTestShowIana(a, "ShowIana");
59  if (!name.compare("threshmap")) return new PixTestThreshMap(a, "ThreshMap");
60  return 0;
61 }
62