CMS 3D CMS Logo

Functions | Variables

Association Namespace Reference

Functions

def formatCVSLink
 Format CVS link.
def formatPackageDocumentationLink
def generateBranchHTML
 Generates HTML for Subsystem.
def generateLeavesHTML
 Generates HTML for subpackage.
def generateTree
 Fetches information about Subsystems/Packages/Subpackages from TagCollector.
def loadTemplates
 Read template file.
def parseJSON
def preparePackageDocumentationLinks
 Extract links to package documentation.
def prepareRefManFiles
 Prepate dictionary of doxygen generated html files.

Variables

string baseUrl = "/cmsdoxygen/"
 block = indexPageBlockNoTree
 Formating index page's pieces.
tuple branchHTML = generateBranchHTML(SRC_DIR, tree, subsystem)
 Generating treeviews.
list CMSSW_VERSION = sys.argv[1]
string contacts = ""
string cvsBaseUrl = "http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW"
 errorOnImport = False
tuple fileIN = open(SCRIPTS_LOCATION+"/indexPage/indexpage_warning.html", "r")
 Warning page.
string indexPageBlock
string indexPageBlockNoTree
string indexPageHTML = ""
int indexPageRowCounter = 0
tuple indexPageTemplateHTML = fileIN.read()
tuple managers = parseJSON('/cmsdoxygen/tcproxy.php?type=managers')
 Index Page Preparations.
dictionary map = {}
tuple output = open(PROJECT_LOCATION+"/doc/html/index.html", "w")
list packageDocLinks = []
list PROJECT_LOCATION = sys.argv[2]
string reason = "Failed during preparing treeview. "
dictionary refmanfiles = {}
string rowCssClass = "odd"
list SCRIPTS_LOCATION = sys.argv[3]
string SRC_DIR = "/src"
tuple treeHTML = treeTemplateHTML.replace("@TREE@", branchHTML)
tuple users = parseJSON('/cmsdoxygen/tcproxy.php?type=users')

Detailed Description

Created on Aug 29, 2011

@author: MantYdze

Function Documentation

def Association::formatCVSLink (   package,
  subpackage 
)

Format CVS link.

Definition at line 63 of file Association.py.

00064                                       :
00065     cvsLink = "[ <a target=\"_blank\" href=\""+cvsBaseUrl+"/"+package+"/"+subpackage+"\">cvs</a> ]"
00066     return cvsLink

def Association::formatPackageDocumentationLink (   package,
  subpackage 
)

Definition at line 67 of file Association.py.

00067                                                        :    
00068     for link in packageDocLinks:
00069         if (link.find(package+"_"+subpackage+".html") != -1):
00070             return "[ <a target=\"_blank\" href=\"../"+link+"\">packageDoc</a> ]"
00071     
00072     return ""
00073 
def Association::generateBranchHTML (   SRC_DIR,
  tree,
  branch 
)

Generates HTML for Subsystem.

Definition at line 116 of file Association.py.

00116                                              : 
00117     branchHTML = ""
00118     
00119     for package,subpackages in sorted(tree[branch].items()):
00120         branchHTML += "<li><span><strong>"+package+"</strong></span><ul>"
00121         
00122         for subpackage in subpackages:
00123             branchHTML += "<li>"+subpackage + " "+ formatCVSLink(package, subpackage) + " " + formatPackageDocumentationLink(package, subpackage)
00124             branchHTML += generateLeavesHTML(SRC_DIR, package, subpackage)
00125             branchHTML+="</li>"
00126             
00127         branchHTML +="</ul>"
00128     
00129     branchHTML += "</li>"    
00130     return branchHTML
00131 
def Association::generateLeavesHTML (   SRC_DIR,
  package,
  subpackage 
)

Generates HTML for subpackage.

Definition at line 94 of file Association.py.

00095                                                     :
00096     html = ""
00097     try:
00098         dirList=os.listdir(SRC_DIR + "/" + package+"/"+subpackage+"/interface/")
00099         for classfile in dirList:
00100             if classfile.endswith(".h"):
00101                 classfile = classfile.replace(".h", "")
00102                 for key in refmanfiles.keys():
00103                     if (key.find(classfile) != -1):
00104                         classfile = "<a target=\"_blank\" href=\""+refmanfiles[key]+"\">"+classfile+"</a>"
00105                         break
00106                 
00107                 html += "<li>"+classfile+"</li>"
00108     except:
00109         pass
00110     
00111     if html != "":
00112         html = "<ul>"+html+"</ul>"
00113     
00114     return html

def Association::generateTree (   release)

Fetches information about Subsystems/Packages/Subpackages from TagCollector.

Definition at line 75 of file Association.py.

00076                          :
00077     #data = json.loads(urllib2.urlopen('https://cmstags.cern.ch/tc/CategoriesPackagesJSON?release=' + release).read())
00078     data = parseJSON('/cmsdoxygen/tcproxy.php?type=packages&release=' + release)
00079     
00080     tree = {}
00081     subsystems = sorted(data.keys())
00082     
00083     for subsystem in subsystems:
00084         tree[subsystem] = {}
00085         for packagesub in data[subsystem]:        
00086             (package, subpackage) = packagesub.split("/")
00087             
00088             if not package in tree[subsystem]:
00089                 tree[subsystem][package] = []
00090             tree[subsystem][package].append(subpackage)
00091             
00092     return (tree, subsystems)

def Association::loadTemplates ( )

Read template file.

Definition at line 133 of file Association.py.

00134                    :
00135     templateFile = SCRIPTS_LOCATION+"/indexPage/tree_template.html" 
00136             
00137     fileIN = open(templateFile, "r")
00138     treeTemplateHTML = fileIN.read()
00139     fileIN.close()
00140     
00141     
00142     templateFile = SCRIPTS_LOCATION+"/indexPage/indexpage_template.html"  
00143     fileIN = open(templateFile, "r")
00144     indexPageTemplateHTML = fileIN.read()
00145     fileIN.close()
00146     
00147     
00148     return treeTemplateHTML, indexPageTemplateHTML

def Association::parseJSON (   url)

Definition at line 22 of file Association.py.

00023                   :
00024     return json.loads(urllib2.urlopen(url).read())
00025 #    ret = {}
00026 #    
00027 #    html = os.popen("curl \""+url+"\"")
00028 #    input = html.read()
00029 #    html.close()
00030 #    
00031 #    input = input.replace("{","").replace("}", "")
00032 #    collections = input.split("], ")
00033     
00034 #    for collection in collections:
00035 #        parts = collection.split(": [")
00036 #        title = parts[0].replace('"', '')
00037 #        list = parts[1].replace("]", "").replace('"', '').split(", ")
00038 #        ret[title] = list
00039     
00040 #    return ret
00041 

def Association::preparePackageDocumentationLinks (   DOC_DIR)

Extract links to package documentation.

Definition at line 53 of file Association.py.

00054                                              :
00055     source = open(DOC_DIR+"/pages.html", "r")
00056     lines = source.read().split("\n")
00057     source.close()
00058     
00059     for line in lines:
00060         if (line.find("li><a class=\"el\" href=\"") != -1):
00061             packageDocLinks.append(line.split("\"")[3])

def Association::prepareRefManFiles (   DOC_DIR)

Prepate dictionary of doxygen generated html files.

Definition at line 43 of file Association.py.

00043                                :    
00044     output = os.popen("find "+DOC_DIR+" -wholename '*/class*.html' -not \( -name '*-members.html' \) -print")
00045     lines = output.read().split("\n")
00046     output.close()
00047     
00048     for line in lines:
00049         (head, tail) = os.path.split(line)
00050         refmanfiles[tail.replace("class","").replace(".html","")] = baseUrl+line[line.find(CMSSW_VERSION):]
00051 

Variable Documentation

string Association::baseUrl = "/cmsdoxygen/"

Definition at line 17 of file Association.py.

tuple Association::branchHTML = generateBranchHTML(SRC_DIR, tree, subsystem)

Generating treeviews.

Definition at line 228 of file Association.py.

list Association::CMSSW_VERSION = sys.argv[1]

Definition at line 153 of file Association.py.

string Association::contacts = ""

Definition at line 239 of file Association.py.

string Association::cvsBaseUrl = "http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW"

Definition at line 16 of file Association.py.

Definition at line 7 of file Association.py.

tuple Association::fileIN = open(SCRIPTS_LOCATION+"/indexPage/indexpage_warning.html", "r")

Warning page.

Definition at line 175 of file Association.py.

Initial value:
00001 """
00002 <tr class=\"@ROW_CLASS@\">
00003     <td width=\"50%\"><a href=\"#@SUBSYSTEM@\" onclick=\"javascript:getIframe('@SUBSYSTEM@')\">@SUBSYSTEM@</a></td>
00004     <td width=\"50%\" class=\"contact\">@CONTACTS@</td>
00005 </tr>
00006 <tr><td colspan=\"2\"><span id=\"@SUBSYSTEM@\"></span></td></tr>
00007 """

Definition at line 189 of file Association.py.

Initial value:
00001 """
00002 <tr class=\"@ROW_CLASS@\">
00003     <td width=\"50%\">@SUBSYSTEM@</td>
00004     <td width=\"50%\" class=\"contact\">@CONTACTS@</td>
00005 </tr>
00006 <tr><td colspan=\"2\"><span id=\"@SUBSYSTEM@\"></span></td></tr>
00007 """

Definition at line 197 of file Association.py.

Definition at line 187 of file Association.py.

Definition at line 188 of file Association.py.

tuple Association::indexPageTemplateHTML = fileIN.read()

Definition at line 176 of file Association.py.

tuple Association::managers = parseJSON('/cmsdoxygen/tcproxy.php?type=managers')

Index Page Preparations.

Definition at line 170 of file Association.py.

dictionary Association::map = {}

Definition at line 206 of file Association.py.

Referenced by SiStripDetCabling::addActiveDetectorsRawIds(), SiStripDetCabling::addAllDetectorsRawIds(), SiStripFEDErrorsDQM::addErrors(), SiStripDetCabling::addFromSpecificConnection(), HcalLutManager::addLutMap(), CSCMap1Read::analyze(), HLTHiggsSubAnalysis::analyze(), SiStripMonitorCluster::analyze(), SiStripMonitorHLT::analyze(), EcalCosmicsHists::analyze(), SiStripMonitorDigi::analyze(), EcalBarrelSimHitsValidation::analyze(), SimplePi0DiscAnalyzer::analyze(), EcalEndcapSimHitsValidation::analyze(), DTCompactMapWriter::appendROS(), VertexAssociatorByTracks::associateRecoToSim(), VertexAssociatorByTracks::associateSimToReco(), QTestHandle::attachTests(), EEDcsInfoTask::beginLuminosityBlock(), EEDaqInfoTask::beginLuminosityBlock(), MonitorTrackResiduals::beginRun(), RPCGeometryBuilderFromCondDB::build(), ConvertedPhotonProducer::buildCollections(), SiStripDetVOffBuilder::BuildDetVOffObj(), RPCGeometryBuilderFromDDD::buildGeometry(), SiStripDetVOffBuilder::buildPSUdetIdMap(), DTCompactMapWriter::buildSteering(), TagProbeFitTreeAnalyzer::calculateEfficiency(), PFClusterAlgo::cleanRBXAndHPD(), ora::TransactionCache::cleanUpNamedRefCache(), ora::TransactionCache::clear(), DTCompactMapWriter::cloneROS(), MuonMillepedeAlgorithm::collect(), GlobalRecHitsAnalyzer::compute(), GlobalRecHitsProducer::compute(), PhysicsTools::MVATrainer::connectProcessors(), ora::Database::containers(), PFElecTkProducer::createGsfPFRecTrackRef(), ora::Database::drop(), RPCLinkSynchroStat::dumpDelays(), EEDaqInfoTask::endLuminosityBlock(), EEDataCertificationTask::endLuminosityBlock(), EEDcsInfoTask::endLuminosityBlock(), EEDataCertificationTask::endRun(), EEDcsInfoTask::endRun(), EEDaqInfoTask::endRun(), ora::DatabaseUtilitySession::existsContainer(), fwlite::RecordWriter::fill(), CSCChamberIndexValues::fillChamberIndex(), CSCChamberMapValues::fillChamberMap(), CSCCrateMapValues::fillCrateMap(), CSCDDUMapValues::fillDDUMap(), MuonAlignment::fillGapsInSurvey(), ecaldqm::fillME(), DTCompactMapWriter::fillReadOutMap(), RPCRecHitFilter::filter(), CSCDigiValidator::filter(), SiPixelInformationExtractor::findNoisyPixels(), BeamMonitor::FitAndFill(), ora::Database::flush(), EMap::get_map(), HcalEmap::get_map(), HcalLutManager::get_xml_files_from_db(), getCentralityFromFile(), HBHEHitMapOrganizer::getHPDs(), pos::PixelPortcardMap::getName(), popcon::EcalTPGWeightGroupHandler::getNewObjects(), RPCDBPerformanceHandler::getNewObjects(), PVFitter::getNPVsperBX(), HBHEHitMapOrganizer::getRBXs(), FWGeometryTableViewBase::FWViewCombo::HandleButton(), HLTCSCOverlapFilter::hltFilter(), HLTCSCRing2or3Filter::hltFilter(), trigger::HLTPrescaleTable::HLTPrescaleTable(), coral_bridge::AuthenticationCredentialSet::import(), cond::CredentialStore::importForPrincipal(), HcalChannelIterator::init(), SiStripDetCabling::IsInMap(), CSCDigitizer::layersMissing(), RPCFakeCalibration::makeCls(), XMLDocument::makeMaps(), RPCFakeCalibration::makeNoise(), CosmicMuonLinksProducer::mapTracks(), pos::PixelPortcardMap::modules(), MuonProducer::MuonProducer(), edm::operator||(), RPCMonitorDigi::performSourceOperation(), QualityTester::performTests(), cond::PayLoadInspector< DataT >::plot(), SiStripInformationExtractor::plotHistosFromLayout(), pos::PixelPortcardMap::PortCardAndAOHs(), pos::PixelPortcardMap::portcards(), L1GtBoard::print(), edm::service::RandomNumberGeneratorService::print(), EcalTPCondAnalyzer::printEcalTPGFineGrainEBIdMap(), EcalTPCondAnalyzer::printEcalTPGLutIdMap(), SiStripActionExecutor::printShiftHistoParameters(), CkfDebugger::printSimHits(), SiPixelGainCalibrationAnalysis::printSummary(), EcalTPCondAnalyzer::printTOWEREE(), EcalTPCondAnalyzer::printWEIGHT(), magneticfield::AutoMagneticFieldESProducer::produce(), sistrip::FEDEmulatorModule::produce(), DTDigiToRawModule::produce(), MuonProducer::produce(), SecondaryVertexProducer::produce(), DIPLumiProducer::produceDetail(), DIPLumiProducer::produceSummary(), SiStripInformationExtractor::readLayoutNames(), SiStripDaqInfo::readSubdetFedFractions(), coral_bridge::AuthenticationCredentialSet::reset(), CSCOverlapsAlignmentAlgorithm::run(), ConversionTrackPairFinder::run(), PVFitter::runBXFitter(), Selections::Selections(), ora::Database::setAccessPermission(), ecaldqm::setBinContentME(), ecaldqm::setBinEntriesME(), ecaldqm::setBinErrorME(), EcalSelectiveReadout::setElecMap(), HcalBaseSignalGenerator::setParameterMap(), SiStripTrackerMapCreator::setTkMapFromAlarm(), EcalSelectiveReadoutSuppressor::setTriggerMap(), EcalSelectiveReadout::setTriggerMap(), edm::detail::CachedProducts::setup(), AlignmentMonitorBase::startingNewLoop(), evf::FUEventProcessor::subWeb(), cond::PayLoadInspector< DataT >::summary(), EMap_test::test_read_map(), HcalEmap_test::test_read_map(), ZdcTestAnalysis::update(), FWLiteESRecordWriterAnalyzer::update(), HcalLutManager::writeLutXmlFiles(), and HLTHiggsSubAnalysis::~HLTHiggsSubAnalysis().

tuple Association::output = open(PROJECT_LOCATION+"/doc/html/index.html", "w")

Definition at line 181 of file Association.py.

Definition at line 19 of file Association.py.

list Association::PROJECT_LOCATION = sys.argv[2]

Definition at line 154 of file Association.py.

string Association::reason = "Failed during preparing treeview. "

Definition at line 178 of file Association.py.

Referenced by stor::FileHandler::moveFileToClosed().

dictionary Association::refmanfiles = {}

Definition at line 18 of file Association.py.

string Association::rowCssClass = "odd"

Definition at line 247 of file Association.py.

list Association::SCRIPTS_LOCATION = sys.argv[3]

Definition at line 155 of file Association.py.

string Association::SRC_DIR = "/src"

Definition at line 157 of file Association.py.

tuple Association::treeHTML = treeTemplateHTML.replace("@TREE@", branchHTML)

Definition at line 230 of file Association.py.

tuple Association::users = parseJSON('/cmsdoxygen/tcproxy.php?type=users')

Definition at line 171 of file Association.py.