30 #ifdef PWIZ_READER_THERMO
38 return bal::to_lower_copy(
BFS_STRING(bfs::path(rawpath).extension())) ==
".raw";
42 int main(
int argc,
char* argv[])
46 #if defined(PWIZ_READER_THERMO) && !defined(PWIZ_READER_THERMO_TEST_ACCEPT_ONLY)
47 const bool testAcceptOnly =
false;
49 const bool testAcceptOnly =
true;
54 #ifdef PWIZ_READER_THERMO
56 using namespace pwiz::msdata;
57 using namespace pwiz::msdata::detail;
59 using namespace pwiz::util;
62 bool allInstrumentTestsPassed =
true;
63 for (
int i=0; i < (int) InstrumentModelType_Count; ++i)
65 InstrumentModelType model = (InstrumentModelType) i;
76 case InstrumentModelType_Tempus_TOF:
77 case InstrumentModelType_Element_2:
78 case InstrumentModelType_Element_XR:
79 case InstrumentModelType_Element_GD:
80 case InstrumentModelType_Delta_Plus_Advantage:
81 case InstrumentModelType_Delta_Plus_XP:
82 case InstrumentModelType_Neptune:
83 case InstrumentModelType_Triton:
93 vector<IonizationType> ionizationTypes = getIonSourcesForInstrumentModel(model);
97 case InstrumentModelType_Element_XR:
98 case InstrumentModelType_Element_2:
99 case InstrumentModelType_Delta_Plus_Advantage:
100 case InstrumentModelType_Delta_Plus_XP:
101 case InstrumentModelType_Neptune:
102 case InstrumentModelType_Tempus_TOF:
103 case InstrumentModelType_Triton:
104 case InstrumentModelType_MAT253:
105 case InstrumentModelType_MAT900XP:
106 case InstrumentModelType_MAT900XP_Trap:
107 case InstrumentModelType_MAT95XP:
108 case InstrumentModelType_MAT95XP_Trap:
109 case InstrumentModelType_Surveyor_PDA:
110 case InstrumentModelType_Accela_PDA:
120 vector<MassAnalyzerType> massAnalyzerTypes = getMassAnalyzersForInstrumentModel(model);
124 case InstrumentModelType_Element_XR:
125 case InstrumentModelType_Element_2:
126 case InstrumentModelType_Element_GD:
127 case InstrumentModelType_Delta_Plus_Advantage:
128 case InstrumentModelType_Delta_Plus_XP:
129 case InstrumentModelType_Neptune:
130 case InstrumentModelType_Triton:
131 case InstrumentModelType_Surveyor_PDA:
132 case InstrumentModelType_Accela_PDA:
142 vector<DetectorType> detectorTypes = getDetectorsForInstrumentModel(model);
146 case InstrumentModelType_Element_GD:
147 case InstrumentModelType_Element_XR:
148 case InstrumentModelType_Element_2:
149 case InstrumentModelType_Delta_Plus_Advantage:
150 case InstrumentModelType_Delta_Plus_XP:
151 case InstrumentModelType_Neptune:
152 case InstrumentModelType_Tempus_TOF:
153 case InstrumentModelType_Triton:
154 case InstrumentModelType_MAT253:
155 case InstrumentModelType_MAT900XP:
156 case InstrumentModelType_MAT900XP_Trap:
157 case InstrumentModelType_MAT95XP:
158 case InstrumentModelType_MAT95XP_Trap:
168 BOOST_FOREACH(MassAnalyzerType realType, massAnalyzerTypes)
170 bool hasCorrespondingScanFilterType =
false;
171 for (
int j=0; j < (int) ScanFilterMassAnalyzerType_Count; ++j)
172 if (convertScanFilterMassAnalyzer((ScanFilterMassAnalyzerType) j, model) == realType)
173 hasCorrespondingScanFilterType =
true;
177 catch (runtime_error&
e)
179 cerr <<
"Unit test failed for instrument model " <<
lexical_cast<
string>(model) <<
":\n" << e.what() << endl;
180 allInstrumentTestsPassed =
false;