Classes | |
class | Col |
Functions | |
def | readtable |
def | runme |
Variables | |
list | infile = sys.argv[1] |
list | lookupfile = sys.argv[3] |
list | outfile = sys.argv[2] |
int | use_name = 0 |
def EdgesToViz::readtable | ( | flook | ) |
Definition at line 25 of file EdgesToViz.py.
def EdgesToViz::runme | ( | infile, | |
outfile, | |||
lookupfile, | |||
use_name | |||
) |
Definition at line 39 of file EdgesToViz.py.
00040 : 00041 fin = open(infile,'r') 00042 flook = open(lookupfile,'r') 00043 fout = open(outfile,'w') 00044 00045 table,libcols = readtable(flook) 00046 00047 fout.write('digraph prof {') 00048 00049 uni = {} 00050 # d=1 00051 # for i in libcols.items(): 00052 # print >>fout,'lib%d [label="%s",style=filled,color=%s,fontsize=18];' % (d,os.path.basename(i[0].strip('"')),i[1]) 00053 # d += 1 00054 00055 00056 for line in fin.xreadlines(): 00057 count,from_node,to_node = line.split() 00058 uni[from_node] = 1 00059 uni[to_node] = 1 00060 row_to = table[to_node] 00061 row_from = table[from_node] 00062 00063 if row_from[-1] == row_to[-1]: 00064 color="\"#000000\"" 00065 else: 00066 row=table[to_node] 00067 color=row[-1] 00068 00069 print >>fout, '%s -> %s [label="%s",fontsize=18,color=%s];' % (from_node,to_node,count,color) 00070 00071 # print "blob",uni.keys 00072 00073 for function_id in uni.keys(): 00074 function_data = table[function_id] 00075 # print e 00076 node_label = function_data[0] 00077 if use_name: node_label = function_data[-2].strip('"') 00078 leaf_fraction = float(function_data[5]) 00079 recursive_fraction = float(function_data[6]) 00080 if recursive_fraction > .03 and recursive_fraction <.20: shape="box" 00081 else: shape="circle" 00082 print >>fout,'%s [label="ID: %s\\nL: %5.1f%%\\nB: %5.1f%%",style=filled,color=%s,shape=%s,fontsize=18];' % (node_label,node_label,leaf_fraction*100, recursive_fraction*100,function_data[-1],shape) 00083 00084 fout.write('}')
list EdgesToViz::infile = sys.argv[1] |
Definition at line 90 of file EdgesToViz.py.
Referenced by GBRWrapperMaker::analyze(), SiPixelDigiSource::beginJob(), TrackerMap::build(), HcalQIEManager::getHfQieTable(), HcalLutManager::getLutSetFromFile(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripGainFromAsciiFile::getNewObject(), HcalQIEManager::getQIETableFromFile(), HcalTBObjectUnpacker::parseCalib(), EcalTrigPrimESProducer::parseTextFile(), CaloMeanResponse::readResponse(), HCalSD::readWeightFromFile(), SurveyPxbImageReader< T >::SurveyPxbImageReader(), edm::Lumi3DReWeighting::weight3D_init(), and reweight::LumiReWeighting::weight3D_set().
list EdgesToViz::lookupfile = sys.argv[3] |
Definition at line 92 of file EdgesToViz.py.
list EdgesToViz::outfile = sys.argv[2] |
Definition at line 91 of file EdgesToViz.py.
Referenced by MillePedeAlignmentAlgorithm::addPxbSurvey(), TopDiLeptonDQM::analyze(), edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun(), TkAlCaSkimTreeMerger::endJob(), TopDiLeptonDQM::endJob(), ExternalLHEAsciiDumper::endRun(), popcon::EcalSRPHandler::getNewObjects(), popcon::EcalChannelStatusHandler::getNewObjects(), HcalPedestalClient::htmlOutput(), HcalDetDiagLEDClient::htmlOutput(), HcalDetDiagPedestalClient::htmlOutput(), HcalBaseDQClient::htmlOutput(), listbadmodule(), ls_cert(), lsbs_cert(), modulediff(), TopDiLeptonDQM::TopDiLeptonDQM(), edm::Lumi3DReWeighting::weight3D_init(), reweight::LumiReWeighting::weight3D_init(), pos::PixelFEDCard::writeASCII(), and HcalPedestalMCWidths::~HcalPedestalMCWidths().
int EdgesToViz::use_name = 0 |
Definition at line 93 of file EdgesToViz.py.