MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / registerInputFile

Method registerInputFile

src/openms/source/METADATA/ID/IdentificationData.cpp:203–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202
203 IdentificationData::InputFileRef
204 IdentificationData::registerInputFile(const InputFile& file)
205 {
206 if (!no_checks_ && file.name.empty()) // key may not be empty
207 {
208 String msg = "input file must have a name";
209 throw Exception::IllegalArgument(__FILE__, __LINE__,
210 OPENMS_PRETTY_FUNCTION, msg);
211 }
212 auto result = input_files_.insert(file);
213 if (!result.second) // existing element - merge in new information
214 {
215 input_files_.modify(result.first, [&file](InputFile& existing)
216 {
217 existing.merge(file);
218 });
219 }
220
221 return result.first;
222 }
223
224
225 IdentificationData::ProcessingSoftwareRef

Callers 8

main_Method · 0.80
main_Method · 0.80
runMethod · 0.80
loadInputFiles_Method · 0.80
importIDsMethod · 0.80
handleFeatureExport_Method · 0.80
exportConsensusIDsMethod · 0.80

Calls 3

emptyMethod · 0.45
insertMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected