CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
haddnano Namespace Reference

Functions

def zeroFill
 

Variables

tuple additionalBranches = list(otherBranches - branchNames)
 
tuple branchNames = set([x.GetName() for x in obj.GetListOfBranches()])
 
tuple cl = ROOT.TClass.GetClass(e.GetClassName())
 
list fileHandles = []
 
list files = sys.argv[2:]
 
 goFast = True
 
tuple inputs = ROOT.TList()
 
tuple isTree = obj.IsA()
 
tuple missingBranches = list(branchNames - otherBranches)
 
tuple name = e.GetName()
 
tuple obj = e.ReadObj()
 
tuple of = ROOT.TFile(ofname, "recreate")
 
list ofname = sys.argv[1]
 
tuple otherBranches
 
tuple otherObj = fh.GetListOfKeys()
 

Function Documentation

def haddnano.zeroFill (   tree,
  brName,
  brObj,
  allowNonBool = False 
)

Definition at line 12 of file haddnano.py.

References print(), and sistrip::SpyUtilities.range().

12 
13 def zeroFill(tree, brName, brObj, allowNonBool=False):
14  # typename: (numpy type code, root type code)
15  branch_type_dict = {'Bool_t': ('?', 'O'), 'Float_t': ('f4', 'F'), 'UInt_t': (
16  'u4', 'i'), 'Long64_t': ('i8', 'L'), 'Double_t': ('f8', 'D')}
17  brType = brObj.GetLeaf(brName).GetTypeName()
18  if (not allowNonBool) and (brType != "Bool_t"):
19  print(("Did not expect to back fill non-boolean branches", tree, brName, brObj.GetLeaf(br).GetTypeName()))
20  else:
21  if brType not in branch_type_dict:
22  raise RuntimeError('Impossible to backfill branch of type %s' % brType)
23  buff = numpy.zeros(1, dtype=numpy.dtype(branch_type_dict[brType][0]))
24  b = tree.Branch(brName, buff, brName + "/" +
25  branch_type_dict[brType][1])
26  # be sure we do not trigger flushing
27  b.SetBasketSize(tree.GetEntries() * 2)
28  for x in range(0, tree.GetEntries()):
29  b.Fill()
30  b.ResetAddress()
31 
const uint16_t range(const Frame &aFrame)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def zeroFill
Definition: haddnano.py:12

Variable Documentation

tuple haddnano.additionalBranches = list(otherBranches - branchNames)

Definition at line 63 of file haddnano.py.

tuple haddnano.branchNames = set([x.GetName() for x in obj.GetListOfBranches()])

Definition at line 54 of file haddnano.py.

Referenced by edm::JobReport.inputFileOpened(), edm::JobReport.outputFileOpened(), and edm::RootOutputFile.RootOutputFile().

tuple haddnano.cl = ROOT.TClass.GetClass(e.GetClassName())

Definition at line 49 of file haddnano.py.

Referenced by gpuPixelRecHits.__attribute__(), CaloParticleDebugger.analyze(), Rivet::RivetAnalysis.analyze(), EgammaSCEnergyCorrectionAlgo.applyCorrection(), EgammaSCEnergyCorrectionAlgo.applyCrackCorrection(), EgammaSCEnergyCorrectionAlgo.applyLocalContCorrection(), GEMPadDigiClusterProducer.buildClusters(), edm.checkClassDictionaries(), TrackingRecHit.cloneForFit(), TkPixelMeasurementDet.compHits(), GsfMultipleScatteringUpdator.compute(), PixelCPEGenericBase.createClusterParam(), PixelCPETemplateReco.createClusterParam(), PixelCPEClusterRepair.createClusterParam(), GsfElectronAlgo.createElectron(), edm::TypeWithDict.dataMemberByName(), edm::ObjectWithDict.destruct(), GEMMaskReClusterizer.doAction(), RPCClusterizer.doAction(), CPPFClusterizer.doAction(), GEMClusterizer.doAction(), RPCMaskReClusterizer.doAction(), CPPFMaskReClusterizer.doAction(), ticl::ClusterFilterByAlgo.filter(), ticl::ClusterFilterBySize.filter(), ticl::ClusterFilterByAlgoAndSize.filter(), ticl::ClusterFilterByAlgoAndSizeAndLayerRange.filter(), CSCDigiValidator.filter(), JetCoreClusterSplitter.fittingSplit(), SimG4HcalHitJetFinder.getClusters(), GEMClusterProcessor.getClusters(), HGCalCLUEAlgoT< TILE >.getClusters(), GEMClusterProcessor.getCoincidenceClusters(), edm::productholderindexhelper.getContainedTypeFromWrapper(), CommonAnalyzer.getList(), RPCDqmClient.getMonitorElements(), DTTPGParametersHandler.getNewObjects(), XrdAdaptor::Source.handle(), edm::TypeWithDict.hasBase(), gen::PomwigHadronizer.initializeDPDF(), CovarianceParameterization.load(), CSCGEMMatcher.matchingClustersBX(), CSCGEMMatcher.matchingClustersLoc(), oldMUcompute(), TrackerDpgAnalysis.onTrack(), TrackerDpgAnalysis.onTrackAngles(), l1t::HGCalClusterT< l1t::HGCalCluster >.operator<(), l1t::HGCalClusterT< l1t::HGCalCluster >.operator<=(), RecHitProcessor.process(), RecHitProcessor.processLook(), Phase2TrackerClusterizer.produce(), LegacyIOHelper.readdir(), edm::storage::XrdFile.readv(), RPCRecHitBaseAlgo.reconstruct(), GEMRecHitBaseAlgo.reconstruct(), HGCalCLUEAlgoT< TILE >.reset(), Phase2TrackerModule.setCoolingLoop(), FW3DViewGeometry.showMuonEndcap(), RPCSimParam.simulate(), RPCSimAverage.simulate(), RPCSimAverageNoise.simulate(), RPCSimAverageNoiseEffCls.simulate(), RPCSimAverageNoiseEff.simulate(), RPCSimAsymmetricCls.simulate(), RPCSimModelTiming.simulate(), DTTPGParameters.totalTime(), and TrackProducerFP420.trackFinderSophisticated().

list haddnano.fileHandles = []

Definition at line 32 of file haddnano.py.

list haddnano.files = sys.argv[2:]

Definition at line 9 of file haddnano.py.

haddnano.goFast = True

Definition at line 33 of file haddnano.py.

tuple haddnano.inputs = ROOT.TList()

Definition at line 50 of file haddnano.py.

tuple haddnano.isTree = obj.IsA()

Definition at line 51 of file haddnano.py.

tuple haddnano.missingBranches = list(branchNames - otherBranches)

Definition at line 62 of file haddnano.py.

tuple haddnano.name = e.GetName()

Definition at line 46 of file haddnano.py.

tuple haddnano.obj = e.ReadObj()

Definition at line 48 of file haddnano.py.

tuple haddnano.of = ROOT.TFile(ofname, "recreate")

Definition at line 40 of file haddnano.py.

Referenced by WriteL1TriggerObjectsTxt.analyze(), BoostIODBReader< DataType, RecordType >.analyze(), FFTJetCorrectorDBReader.analyze(), FWSiPixelClusterProxyBuilder.build(), L1GctJetFinderBase.calcHfSums(), HtrXmlPatternTool.createHists(), L1GctJetFinderBase.doEtSums(), L1GctJetFinderBase.doHtSums(), L1MuGMTConfig.dumpRegs(), CTPPSOpticalFunctionsESSource.fillDescriptions(), CTPPSCompositeESSource.fillDescriptions(), L1GctRegion.makeJfInputRegion(), L1MuGMTLUT.MakeSubClass(), L1MuGMTLUT.Save(), RctRawToDigi.unpackCTP7(), CTPPSProtonReconstructionEfficiencyEstimatorData::ArmData.UpdateOptics(), gs.writeCompressedStringArchive(), gs.writeStringArchive(), and HtrXmlPatternTool.writeXML().

list haddnano.ofname = sys.argv[1]

Definition at line 8 of file haddnano.py.

Referenced by TrackerMap.printall(), and TrackerMap.printonline().

tuple haddnano.otherBranches
Initial value:
1 = set([x.GetName()
2  for x in otherObj.GetListOfBranches()])

Definition at line 60 of file haddnano.py.

tuple haddnano.otherObj = fh.GetListOfKeys()

Definition at line 56 of file haddnano.py.