Interactive web-based visualization tool for exploring CMSSW (CMS Software) module dependencies and configurations.
This tool combines graph topology from Graphviz DOT files with detailed module configuration data to provide an intuitive, interactive interface for understanding complex CMSSW workflows.
Key Capabilities:
- Visualize 1,300+ module dependencies in an interactive graph
- Click modules to see detailed configuration (type, plugin, parameters, InputTags)
- Navigate between modules by clicking InputTag references
- Search for specific modules
- Focus on subgraphs with configurable radius (ego graph)
- Explore dependencies (upstream/downstream) with configurable depth
- Filter by category (Reco/Analysis/PAT/HLT, Producer/Filter/Analyzer)
- Full keyboard navigation support
- Breadcrumb navigation history
-
Python 3.6 or higher
- Check version:
python3 --version - Install if needed:
- Ubuntu/Debian:
sudo apt install python3 python3-pip python3-venv - CentOS/RHEL:
sudo yum install python3 python3-pip - macOS:
brew install python3
- Ubuntu/Debian:
- Check version:
-
pip (Python package installer)
- Usually comes with Python 3.6+
- Check:
pip --versionorpip3 --version
-
graphviz (system package for pydot)
- Ubuntu/Debian:
sudo apt install graphviz - CentOS/RHEL:
sudo yum install graphviz - macOS:
brew install graphviz
- Ubuntu/Debian:
pydot>=1.4.2- Graphviz DOT file parsingnetworkx>=2.5- Graph data structures and algorithms
These are automatically installed when you run ./run.sh for the first time.
Place these files in the project root directory:
-
dependency.gv- Graphviz DOT file with module dependencies- Format: Graphviz digraph or graph
- Nodes should have
labelattribute matching module names
-
dumpConfig.py- CMSSW configuration dump- Generate with:
cmsRun yourconfig.py --dump > dumpConfig.py - Contains full module definitions with parameters
- Generate with:
Note: If you already have data/bundle.json, these files are optional (the app will use the existing bundle).
Just open the HTML file in your browser - no installation needed!
# One-time setup
python preprocess/build_bundle.py
# Then simply open the file
open app/index.html # macOS
xdg-open app/index.html # Linux
start app/index.html # Windows
# Or just double-click app/index.htmlPerfect for: Quick viewing, sharing with colleagues, presentations
See STATIC_MODE.md for details
Run with a local server to enable file upload functionality.
# Navigate to the project directory
cd /path/to/CMSSWGraph
# Make the script executable (first time only)
chmod +x run.sh
# Run the application (handles everything automatically)
./run.shThe script automatically handles the complete setup:
-
β Creates virtual environment (if
venv/doesn't exist)- Creates an isolated Python environment
-
β Activates virtual environment
- Ensures packages are installed in the project venv
-
β Installs Python dependencies (if not already installed)
- Checks for
pydotandnetworkx - Runs
pip install -r preprocess/requirements.txtif needed
- Checks for
-
β Generates data bundle (if
data/bundle.jsondoesn't exist)- Runs
python preprocess/build_bundle.py - Parses
dependency.gvanddumpConfig.py - Creates
data/bundle.json(~22 MB)
- Runs
-
β Starts web server
- Runs on
http://localhost:8000 - Serves the application at
/app/
- Runs on
Then open your browser to: http://localhost:8000/app/
Before running ./run.sh, ensure you have:
- β
Python 3.6+ installed (
python3 --version) - β
pip available (
pip --versionorpip3 --version) - β graphviz system package installed (for pydot)
- β
Input files in project root (only if bundle.json doesn't exist):
dependency.gvdumpConfig.py
That's it! The script handles everything else.
For detailed platform-specific installation instructions, see INSTALL.md
chmod +x run.sh
./run.sh# 1. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# 2. Install Python dependencies
pip install -r preprocess/requirements.txt
# 3. Generate data bundle
python preprocess/build_bundle.py
# 4. Start web server
python server.pyCMSSWGraph/
βββ preprocess/ # Data preprocessing scripts
β βββ parse_graph.py # Parse Graphviz DOT file
β βββ parse_config.py # Parse CMSSW config dump
β βββ build_bundle.py # Generate JSON bundle
β βββ requirements.txt # Python dependencies
βββ data/
β βββ bundle.json # Generated graph + module data
βββ app/ # Web application
β βββ index.html # Main page
β βββ css/style.css # Styling
β βββ js/ # Application logic
β βββ main.js # Initialization
β βββ graph.js # Cytoscape graph
β βββ panel.js # Side panel
β βββ search.js # Search functionality
β βββ ego.js # Focus radius
β βββ dependency.js # Dependency explorer
β βββ keyboard.js # Keyboard navigation
β βββ filter.js # Category filters
β βββ utils.js # Helper functions
βββ server.py # Local HTTP server
βββ run.sh # Quick start script
βββ README.md # This file
Graph Interaction:
- Pan: Click and drag on the background
- Zoom: Mouse wheel or pinch gesture
- Select node: Click on any module box
- View details: Click opens the side panel with full module info
Node Colors:
- π’ Green: Reconstruction modules (reco workflow)
- βͺ Gray: Analysis modules (PAT/analysis workflow)
Node Shapes:
- β Diamond: EDFilter modules
- β Rectangle: EDProducer and EDAnalyzer modules
- Enter module name in the Search field (top left)
- Click Find or press Enter
- Single match: Opens panel and zooms to node
- Multiple matches: Highlights all matching nodes
- Click Clear to reset view
Example: Search for "hgcalMergeLayerClusters"
Module Information:
- Type: EDProducer, EDFilter, or EDAnalyzer
- Plugin: C++ plugin class name
- Input Tags: Clickable links to producer modules
- Click any InputTag to navigate to that module
- VInputTag groups are shown with expandable lists
- Parameters: All module parameters with types and values
- Raw Configuration: Full Python config snippet
Resizable Panel:
- Drag the left edge to resize
- Width is saved automatically
Breadcrumb Navigation:
- Shows your navigation path
- Click any previous module to go back
- Close button (Γ) closes panel and clears highlights
Show only nodes within N hops of the selected module:
- Select a module (click it to open the panel)
- Set Focus Radius (1-5 hops)
- Click Apply
- Click Reset View to see the full graph again
Use case: Isolate a module's immediate neighborhood to reduce clutter
Explore upstream/downstream dependencies with configurable depth:
- Select a module
- Set Depth (1-10 levels)
- Choose:
- Show Dependencies: Both upstream and downstream
- Upstream Only: Modules this module depends on
- Downstream Only: Modules that depend on this module
Use case: Trace the full dependency chain for a specific module
Filter nodes by stage, specificity, or type:
Stage Filters:
- β Reco: Show reconstruction modules (green)
- β Analysis: Show analysis modules (gray)
Specific Filters:
- β PAT: Show/hide PAT modules
- β HLT: Show/hide HLT modules
Type Filters:
- β Producer: EDProducer modules
- β Filter: EDFilter modules
- β Analyzer: EDAnalyzer modules
Quick Actions:
- All: Select all filters
- None: Deselect all filters
The filter stats show how many nodes are visible.
Press ? to see the help overlay.
| Key | Action |
|---|---|
| β β β β | Navigate to adjacent nodes |
| Tab | Cycle to next node |
| Enter | Open details panel for selected node |
| Esc | Close panel |
| R | Reset view (show all nodes, fit to screen) |
| ? | Toggle keyboard shortcuts help |
Navigation behavior:
- Arrow keys move to the nearest node in that direction
- Selected nodes have an orange border
- Press Enter to open the panel for the selected node
The tool automatically resolves InputTag references to their producer modules:
- InputTag format:
"module:instance:process"(or shortened forms) - Clickable tags: Green background = found in graph
- Not found tags: Red background = module not in graph
- VInputTag groups: Multiple inputs displayed as expandable groups
- ESInputTag: Event Setup input tags also supported
The breadcrumb trail at the top of the side panel shows your path:
ModuleA βΊ ModuleB βΊ ModuleC
Click any previous module to jump back in the history.
The graph uses a force-directed layout (COSE algorithm) optimized for readability:
- Large node spacing (50Γ35px nodes, 250px ideal edge length)
- High repulsion force (800,000) to minimize overlap
- Node labels visible by default with semi-transparent backgrounds
Error: FileNotFoundError: dependency.gv or dumpConfig.py not found
Solution: Ensure your input files are in the project root or update paths in build_bundle.py
Error: Failed to load bundle.json
Solution:
# Regenerate the bundle
python preprocess/build_bundle.pySolution:
# Use a different port
python server.py 8080
# Then open: http://localhost:8080/app/If you have >5,000 nodes, the initial layout may be slow. Solutions:
- Use filters to reduce visible nodes
- Use focus radius or dependency explorer for targeted views
- Consider sampling the input graph for exploration
If many InputTags show "not found":
- The producer module may not be in the
dependency.gvfile - The module name may differ between config and DOT file
- Check the console for warnings during bundle generation
Edit app/js/filter.js and add your filter logic in shouldShowNode().
Edit app/js/graph.js and change the layout configuration:
layout: {
name: 'cose', // Try: 'dagre', 'breadthfirst', 'concentric'
// ... other options
}Edit preprocess/parse_config.py to extract more fields from the config dump, then update panel.js to display them.
Add export buttons in index.html and implement export logic (e.g., to PNG, PDF, or filtered DOT file).
-
dependency.gv - Graphviz DOT file
- Format:
digraphorgraph - Nodes should have
labelattribute matching config module names
- Format:
-
dumpConfig.py - CMSSW config dump
- Generated with:
cmsRun yourconfig.py --dump > dumpConfig.py - Contains full module definitions with parameters
- Generated with:
data/bundle.json (21+ MB)
- Combined graph + module data
- Regenerated automatically by
run.shif missing - Can be regenerated with:
python preprocess/build_bundle.py
Structure:
{
"nodes": [{id, label, shape, color, fillcolor, tooltip}],
"edges": [{source, target, color, style}],
"modules": {
"ModuleName": {
"type": "EDProducer",
"plugin": "PluginClass",
"parameters": {...},
"inputTags": [{field, module, instance, process, found, targetId}],
"rawSnippet": "..."
}
},
"labelToId": {"ModuleName": "nodeId"}
}Preprocessing:
Frontend:
- Cytoscape.js - Graph visualization
- Vanilla JavaScript (ES6+)
- HTML5 + CSS3
Server:
- Python built-in
http.server
- Graph size: Tested with 1,316 nodes and 3,427 edges
- Rendering time: ~2-3 seconds for initial layout
- Memory usage: ~50-100 MB in browser
- Supported browsers: Chrome, Firefox, Safari, Edge (latest versions)
MIT License - feel free to use, modify, and distribute.
Contributions welcome! Areas for improvement:
- Additional layout algorithms
- Path finding between modules
- Export to various formats
- Module execution time overlay
- Subgraph grouping by CMSSW paths
- Progressive rendering for larger graphs
For issues or questions:
- Check the Troubleshooting section above
- Review browser console for error messages
- Verify input files are correctly formatted
- Regenerate bundle.json if data seems stale
Built for CMSSW workflow exploration | Powered by Cytoscape.js