00001 #include "OpeSummaryTool.h" 00002 #include "SctData/OpeResult.h" 00003 #include "SummaryWriter.h" 00004 #include "Sct/SctParameters.h" 00005 #include <TH1.h> 00006 00007 #include <iomanip> 00008 00009 namespace SctData { 00010 namespace TestSummary{ 00011 using namespace std; 00012 using namespace Sct; 00013 void OpeSummaryTool::write(const Serializable& t, ostream& out) const 00014 { 00015 const OpeResult& result = dynamic_cast<const OpeResult&>(t); 00016 00017 out << "#\n%OpeTool\n#"<<endl; 00018 out << "#\n# MaxBadness Threshold"<<endl; 00019 for (unsigned ichip=0; ichip<nChipModule; ++ichip){ 00020 const SctData::ChipOpeResult& c = result.getChipResult(ichip); 00021 out << "#"<< SummaryWriter::getChipName(ichip) << endl; 00022 out << "# " 00023 << std::setw(8) << c.badmax << " " 00024 << std::setw(8) << c.threshold << endl; 00025 } 00026 } 00027 } 00028 }