CMS 3D CMS Logo

Functions | Variables
cppFunctionSkipper Namespace Reference

Functions

def delLines (string, startPosition, endPosition)
 
def filterFile (file)
 
def filterFiles (fileList)
 

Variables

 __author__
 
 __date__
 
 cv_decl
 
 decl_param
 
 declarator
 
 dm_init
 
 exception
 
 functStart_re
 
 operator
 

Function Documentation

def cppFunctionSkipper.delLines (   string,
  startPosition,
  endPosition 
)

Definition at line 77 of file cppFunctionSkipper.py.

References harvestTrackValidationPlots.str.

Referenced by filterFile().

77 def delLines(string, startPosition, endPosition):
78  i = startPosition - 1
79  end = startPosition
80  while(True):
81  if i != -1 and string[i] != '\n':
82  i -= 1
83  else:
84  string = string[:i+1] + (end - i - 1)*' ' + string[end:]
85  break
86 
87  i = startPosition
88  start = startPosition
89  while(i != endPosition):
90  if string[i] != '\n':
91  i += 1
92  else:
93  string = string[:start] + (i-start)*str(" ") + string[i:]
94  i = i+1
95  start = i
96  string = string[:start] + (endPosition-start)*str(" ") + string[endPosition:]
97 
98  return string
99 
def delLines(string, startPosition, endPosition)
def cppFunctionSkipper.filterFile (   file)

Definition at line 28 of file cppFunctionSkipper.py.

References delLines().

Referenced by filterFiles().

28 def filterFile(file):
29 
30  lines = ""
31 
32  if type(file).__name__ != 'list':
33  lines = open(file).read()
34  else:
35  for line in file:
36  lines += line
37  fileLines = lines[:]
38  prevEndPosition = 0
39  endPosition = 0
40  while(True):
41  m = functStart_re.search(lines)
42  if m != None:
43  openBracket = 1
44  closeBracket = 0
45  startPosition = m.start()
46  #print "MATCH: " + lines[m.start():m.end()]
47  for i, character in enumerate(lines[m.end():]):
48  if character == "{":
49  openBracket += 1
50  elif character == "}":
51  closeBracket += 1
52  if openBracket == closeBracket :
53  prevEndPosition += endPosition
54  endPosition = m.end() + i + 1
55  break
56  if openBracket != closeBracket:#if there is error in file
57  print "Error in file. To much open brackets. Run commentSkipper before you run functionSkipper."
58  break
59  else:
60  #print "LINES: \n" + lines[startPosition:endPosition]
61  #print "#############################################";
62  lines = delLines(lines, startPosition, endPosition)
63  fileLines = fileLines[:prevEndPosition] + lines
64  lines = lines[endPosition:]
65  else:
66  break
67 
68  listOfLines = []
69  startLine = 0
70  for index, character in enumerate(fileLines):
71  if character == "\n":
72  listOfLines.append(fileLines[startLine:index+1])
73  startLine = index + 1
74  listOfLines.append(fileLines[startLine:])
75  return listOfLines
76 
def delLines(string, startPosition, endPosition)
def cppFunctionSkipper.filterFiles (   fileList)

Definition at line 14 of file cppFunctionSkipper.py.

References filterFile().

14 def filterFiles(fileList):
15  files = []
16 
17  for i in range(len(fileList)):
18  if type(fileList[0]).__name__ != 'tuple':
19  file = fileList[i]
20  fileLines = filterFile(fileList[i])
21  else:
22  file = fileList[i][0]
23  fileLines = filterFile(fileList[i][1])
24 
25  files.append((file, fileLines))
26  return files
27 
def filterFiles(fileList)

Variable Documentation

cppFunctionSkipper.__author__
private

Definition at line 1 of file cppFunctionSkipper.py.

cppFunctionSkipper.__date__
private

Definition at line 2 of file cppFunctionSkipper.py.

cppFunctionSkipper.cv_decl

Definition at line 7 of file cppFunctionSkipper.py.

cppFunctionSkipper.decl_param

Definition at line 9 of file cppFunctionSkipper.py.

cppFunctionSkipper.declarator

Definition at line 6 of file cppFunctionSkipper.py.

cppFunctionSkipper.dm_init

Definition at line 11 of file cppFunctionSkipper.py.

cppFunctionSkipper.exception

Definition at line 8 of file cppFunctionSkipper.py.

Referenced by TrackingTruthAccumulator.accumulateEvent(), MatrixMeschach.AddData(), FWRecoGeometryESProducer.addGEMGeometry(), FWTGeoRecoGeometryESProducer.addGEMGeometry(), FWRecoGeometryESProducer.addME0Geometry(), FWTGeoRecoGeometryESProducer.addME0Geometry(), EcalStatusAnalyzer.analyze(), EcalMatacqAnalyzer.analyze(), SiStripDetVOffFakeBuilder.analyze(), EcalPerEvtMatacqAnalyzer.analyze(), KVFTrackUpdate.analyze(), AlcaBeamMonitor.analyze(), EcalBarrelMonitorDbModule.analyze(), EcalPedHists.analyze(), EcalABAnalyzer.analyze(), MonitorElementsDb.analyze(), EcalPerEvtLaserAnalyzer.analyze(), KineExample.analyze(), EcalTestPulseAnalyzer.analyze(), EcalLaserAnalyzer2.analyze(), EcalLaserAnalyzer.analyze(), calcTopMass.analyze(), EcalLaserAnalyzerYousi.analyze(), EcnaAnalyzer.analyze(), CmsShowNavigator.appendFile(), cond::service::PoolDBOutputService.appendSinceTime(), dqm::RamdiskMonitor.beginLuminosityBlock(), AlcaBeamMonitor.beginLuminosityBlock(), FWFFLooper.beginRun(), FWTrackingParticleProxyBuilderFullFramework.build(), FWTrackProxyBuilderFullFramework.build(), Model.BuildMeasurementsFromOA(), FWPFTauProxyBuilder.buildViewType(), FWCaloTauProxyBuilder.buildViewType(), MeasurementDistancemeter.calculateSimulatedValue(), MeasurementDistancemeter3dim.calculateSimulatedValue(), MeasurementDiffEntry.calculateSimulatedValue(), ConfigurationDBHandler.characters(), DTUserKeyedConfigHandler.chkConfigList(), DTKeyedConfigHandler.chkConfigList(), edm::InputFile.Close(), CmsShowMain.CmsShowMain(), CocoaBestUnit.CocoaBestUnit(), CocoaDaqReaderRoot.CocoaDaqReaderRoot(), dqmservices::DQMFileIterator.collect(), MEtoMEComparitor.compare(), EcalDccWeightBuilder.computeAllWeights(), CocoaAnalyzer.CorrectOaParam(), sistrip::DigiToRaw.createFedBuffers_(), cond::service::PoolDBOutputService.createNewIOV(), FWEventItem.data(), edm::releaseversion::DecomposedReleaseVersion.DecomposedReleaseVersion(), cond.default_deserialize(), FedRawDataInputSource.deleteFile(), DTGeometryParserFromDDD.DTGeometryParserFromDDD(), Pi0FixedMassWindowCalibration.duringLoop(), ZeeCalibration.duringLoop(), EcalCondDBReader.EcalCondDBReader(), ecaldqm::EcalDQMonitor.EcalDQMonitor(), FWModelChangeManager.endChanges(), helper::ScannerBase.eval(), DTMeanTimerFitter.evaluateVDriftAndReso(), ecaldqm::EcalDQMonitor.executeOnWorkers_(), helper::ScannerBase.fill1D(), helper::ScannerBase.fill2D(), helper::ScannerBase.fillGraph(), helper::ScannerBase.fillProf(), NuclearVertexBuilder.FillVertexWithAdaptVtxFitter(), Model.FindOptAlignInfoByType(), CandKinematicVertexFitter.fit(), CandCommonVertexFitter< Fitter >.fit(), PFCandCommonVertexFitter< Fitter >.fit(), FittedEntriesReader.FittedEntriesReader(), DTMeanTimerFitter.fitTMax(), PFDisplacedVertexFinder.fitVertexFromSeed(), FWFFHelper.FWFFHelper(), DTKeyedConfigCache.get(), pos::PixelConfigFile.get(), HcalQLPlotHistoMgr.GetAHistogramImpl(), TestHistoMgr.getHisto1(), TestHistoMgr.getHisto1FromSecondFile(), TestHistoMgr.getHisto2(), TestHistoMgr.getHistoProf1(), TestHistoMgr.getHistoProf2(), popcon::EcalSRPHandler.getNewObjects(), popcon::EcalTPGWeightIdMapHandler.getNewObjects(), popcon::EcalTPGBadStripHandler.getNewObjects(), popcon::EcalTPGBadTTHandler.getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler.getNewObjects(), popcon::EcalTPGLinConstHandler.getNewObjects(), popcon::EcalTPGLutIdMapHandler.getNewObjects(), popcon::EcalTPGPhysicsConstHandler.getNewObjects(), popcon::EcalTPGBadXTHandler.getNewObjects(), popcon::EcalTPGFineGrainEBGroupHandler.getNewObjects(), popcon::EcalTPGFineGrainTowerEEHandler.getNewObjects(), popcon::EcalTPGWeightGroupHandler.getNewObjects(), popcon::EcalTPGFineGrainStripEEHandler.getNewObjects(), popcon::EcalTPGPedestalsHandler.getNewObjects(), popcon::EcalTPGSlidingWindowHandler.getNewObjects(), popcon::EcalTPGSpikeThresholdHandler.getNewObjects(), popcon::EcalTPGLutGroupHandler.getNewObjects(), RivetHarvesting.getPoint2DValsErrs(), edm::RootDelayedReader.getProduct_(), DDLSAX2Handler.getSpaceCount(), FedRawDataInputSource.grabNextJsonFile(), sistrip::RawToDigiUnpacker.handleException(), SiStripConfigDb.handleException(), XrdAdaptor::ClientRequest.HandleResponse(), HLTHcalSimpleRecHitFilter.hltFilter(), PixelToLNKAssociateFromAscii.init(), PixelToFEDAssociateFromAscii.init(), cond::service::PoolDBOutputService.initDB(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.inspect(), EEDetId.ix(), EEDetId.iy(), BPHKinematicFit.kinematicTree(), AdaptiveVertexFitter.linearizeTracks(), main(), edm::PrincipalGetAdapter.makeFailToGetException(), edm.makeNotFoundException(), FWEveViewManager.newItem(), CmsShowNavigator.openFile(), reco.operator<<(), HcalPatternXMLParser.parse(), evf::EvFDaqDirector.preGlobalEndLumi(), helper::ScannerBase.print(), tfwliteselectortest::ThingsWorker.process(), tfwliteselectortest::ThingsTSelector.process(), TFWLiteSelectorBasic.Process(), PhotonConversionTrajectorySeedProducerFromQuadruplets.produce(), Onia2MuMuPAT.produce(), RecoTauPiZeroProducer.produce(), PFRecoTauChargedHadronProducer.produce(), ptomaine(), RunInfoRead.readData(), DQMSummaryReader.readData(), DQMStore.readFile(), ErrorCorrelationMgr.readFromReportFile(), XrdFile.readv(), CocoaAnalyzer.ReadXMLFile(), TrackClassifier.reconstructionInformation(), AdaptiveVertexFitter.reLinearizeTracks(), AdaptiveVertexFitter.reWeightTracks(), cond::Utilities.run(), FWEventItem.runFilter(), FWPathsPopup.scheduleReloadEvent(), cond.serialize(), ALIRmDataFromFile.setAngle(), MeasurementDistancemeter3dim.setConversionFactor(), MeasurementDistancemeter.setConversionFactor(), CocoaDaqReader.SetDaqReader(), HcalQLPlotAnalAlgos.SetEventType(), ecaldqm::DQWorker.setME(), CocoaToDDLMgr.so(), TagProbeFitTreeAnalyzer.TagProbeFitTreeAnalyzer(), helper::ScannerBase.test(), edm.throwAmbiguousException(), edm::PrincipalGetAdapter.throwAmbiguousException(), edm.throwMissingDictionariesException(), edm::DataManagingProductResolver.throwProductDeletedException(), edm.throwProductDeletedException(), MultiVertexFitter.updateSeeds(), reco::GhostTrackVertexFinder.vertexFitter(), edm::convertException.wrap(), MonPulseShapeDat.writeDB(), and DTCalibDBUtils.writeToDB().

cppFunctionSkipper.functStart_re

Definition at line 12 of file cppFunctionSkipper.py.

cppFunctionSkipper.operator

Definition at line 10 of file cppFunctionSkipper.py.