Skip to content

Commit

Permalink
use all.py instead of __init__.py to imoprt everything so that
Browse files Browse the repository at this point in the history
pepople loading only one are not slowed down
  • Loading branch information
gpetruc committed Dec 16, 2014
1 parent 7ac7101 commit 6f20bdf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
9 changes: 1 addition & 8 deletions PhysicsTools/Heppy/python/analyzers/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
from PhysicsTools.Heppy.analyzers.core.AutoFillTreeProducer import AutoFillTreeProducer
from PhysicsTools.Heppy.analyzers.core.EventSelector import EventSelector
from PhysicsTools.Heppy.analyzers.core.JSONAnalyzer import JSONAnalyzer
from PhysicsTools.Heppy.analyzers.core.PileUpAnalyzer import PileUpAnalyzer
from PhysicsTools.Heppy.analyzers.core.SkimAnalyzerCount import SkimAnalyzerCount
from PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy import TreeAnalyzerNumpy
from PhysicsTools.Heppy.analyzers.core.TriggerBitAnalyzer import TriggerBitAnalyzer
from PhysicsTools.Heppy.analyzers.core.TriggerBitFilter import TriggerBitFilter
# empty
8 changes: 8 additions & 0 deletions PhysicsTools/Heppy/python/analyzers/core/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from PhysicsTools.Heppy.analyzers.core.AutoFillTreeProducer import AutoFillTreeProducer
from PhysicsTools.Heppy.analyzers.core.EventSelector import EventSelector
from PhysicsTools.Heppy.analyzers.core.JSONAnalyzer import JSONAnalyzer
from PhysicsTools.Heppy.analyzers.core.PileUpAnalyzer import PileUpAnalyzer
from PhysicsTools.Heppy.analyzers.core.SkimAnalyzerCount import SkimAnalyzerCount
from PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy import TreeAnalyzerNumpy
from PhysicsTools.Heppy.analyzers.core.TriggerBitAnalyzer import TriggerBitAnalyzer
from PhysicsTools.Heppy.analyzers.core.TriggerBitFilter import TriggerBitFilter
5 changes: 1 addition & 4 deletions PhysicsTools/Heppy/python/analyzers/gen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from PhysicsTools.Heppy.analyzers.gen.GeneratorAnalyzer import GeneratorAnalyzer
from PhysicsTools.Heppy.analyzers.gen.GenHeavyFlavourAnalyzer import GenHeavyFlavourAnalyzer
from PhysicsTools.Heppy.analyzers.gen.HiggsDecayModeAnalyzer import HiggsDecayModeAnalyzer
from PhysicsTools.Heppy.analyzers.gen.PDFWeightsAnalyzer import PDFWeightsAnalyzer
# empty
4 changes: 4 additions & 0 deletions PhysicsTools/Heppy/python/analyzers/gen/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from PhysicsTools.Heppy.analyzers.gen.GeneratorAnalyzer import GeneratorAnalyzer
from PhysicsTools.Heppy.analyzers.gen.GenHeavyFlavourAnalyzer import GenHeavyFlavourAnalyzer
from PhysicsTools.Heppy.analyzers.gen.HiggsDecayModeAnalyzer import HiggsDecayModeAnalyzer
from PhysicsTools.Heppy.analyzers.gen.PDFWeightsAnalyzer import PDFWeightsAnalyzer
9 changes: 1 addition & 8 deletions PhysicsTools/Heppy/python/analyzers/objects/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
from PhysicsTools.Heppy.analyzers.objects.GeneratorAnalyzer import GeneratorAnalyzer
from PhysicsTools.Heppy.analyzers.objects.JetAnalyzer import JetAnalyzer
from PhysicsTools.Heppy.analyzers.objects.LeptonAnalyzer import LeptonAnalyzer
from PhysicsTools.Heppy.analyzers.objects.METAnalyzer import METAnalyzer
from PhysicsTools.Heppy.analyzers.objects.PhotonAnalyzer import PhotonAnalyzer
from PhysicsTools.Heppy.analyzers.objects.TauAnalyzer import TauAnalyzer
from PhysicsTools.Heppy.analyzers.objects.IsoTrackAnalyzer import IsoTrackAnalyzer
from PhysicsTools.Heppy.analyzers.objects.VertexAnalyzer import VertexAnalyzer
# empty
8 changes: 8 additions & 0 deletions PhysicsTools/Heppy/python/analyzers/objects/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from PhysicsTools.Heppy.analyzers.objects.GeneratorAnalyzer import GeneratorAnalyzer
from PhysicsTools.Heppy.analyzers.objects.JetAnalyzer import JetAnalyzer
from PhysicsTools.Heppy.analyzers.objects.LeptonAnalyzer import LeptonAnalyzer
from PhysicsTools.Heppy.analyzers.objects.METAnalyzer import METAnalyzer
from PhysicsTools.Heppy.analyzers.objects.PhotonAnalyzer import PhotonAnalyzer
from PhysicsTools.Heppy.analyzers.objects.TauAnalyzer import TauAnalyzer
from PhysicsTools.Heppy.analyzers.objects.IsoTrackAnalyzer import IsoTrackAnalyzer
from PhysicsTools.Heppy.analyzers.objects.VertexAnalyzer import VertexAnalyzer

3 comments on commit 6f20bdf

@cbernet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we simply remove these init files so that they get created automatically by scram instead of writing inside

# empty 

Last time we did a PR to the official CMSSW software, people got worried about the presence of the init files, and I had to remove them to have the PR accepted.

@gpetruc
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left them in since we might want to get the __all__ solution working eventually which would be cleaner

@cbernet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well they could always be re-added easily.
But as you wish, if people tell us anything I'll let you answer.

Please sign in to comment.