27 return (
m_defectMap.insert(std::make_pair(moduleId, moduleDefects))).second;
37 CalibConditions::const_iterator iter(
m_defectMap.find(moduleId));
39 ModuleDefects = iter->second;
48 std::ostringstream txt;
50 txt <<
"No modules are in the SCT Calibration defect data map.\n";
52 CalibConditions::const_iterator itr(
m_defectMap.begin());
54 txt << itr->first <<
" " <<
moduleText(itr->first);
64 std::ostringstream txt;
65 std::ostringstream tmp;
68 txt <<
"The SCT module Calibration defect data map is empty for module " << moduleId <<
".\n";
70 txt <<
"\n" << std::left << std::setw(15) <<
"Bad strips" << std::setw(15) <<
"Defect type" << std::setw(15) <<
"Value:" <<
"\n";
71 for (
unsigned int i = 0; i < thisModuleDefects.
begDefects.size(); i++){
73 txt << std::left << std::setw(15) << thisModuleDefects.
begDefects[i];
77 txt << std::left << std::setw(15) << tmp.str();
79 txt << std::left << std::setw(15) << thisModuleDefects.
typeOfDefect[i];
80 txt << std::left << std::setw(15) << thisModuleDefects.
parValue[i] <<
"\n";
header file for data object
std::string str()
Print the map - might be useful.
void clear()
Clear the map.
CalibModuleDefects findModule(const Identifier &moduleId) const
Search the map for a module.
bool addModule(const Identifier &moduleId, const CalibModuleDefects &defects)
Add defects for a module.
bool empty() const
Return whether the map is empty.
std::string moduleText(const Identifier &moduleId) const
Print data for one module.
SCT_CalibDefectData()
Constructor.
unsigned long int size() const
Return the size of the map.
CalibConditions m_defectMap
std::vector< std::string > typeOfDefect
std::vector< unsigned int > begDefects
std::vector< unsigned int > endDefects
std::vector< float > parValue