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 79 of file cppFunctionSkipper.py.

References str.

Referenced by filterFile().

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

Definition at line 30 of file cppFunctionSkipper.py.

References delLines(), and edm.print().

Referenced by filterFiles().

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

Definition at line 16 of file cppFunctionSkipper.py.

References filterFile().

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

Variable Documentation

cppFunctionSkipper.__author__
private

Definition at line 3 of file cppFunctionSkipper.py.

cppFunctionSkipper.__date__
private

Definition at line 4 of file cppFunctionSkipper.py.

cppFunctionSkipper.cv_decl

Definition at line 9 of file cppFunctionSkipper.py.

cppFunctionSkipper.decl_param

Definition at line 11 of file cppFunctionSkipper.py.

cppFunctionSkipper.declarator

Definition at line 8 of file cppFunctionSkipper.py.

cppFunctionSkipper.dm_init

Definition at line 13 of file cppFunctionSkipper.py.

cppFunctionSkipper.exception

Definition at line 10 of file cppFunctionSkipper.py.

Referenced by TrackingTruthAccumulator.accumulateEvent(), edm::service::Timing.accumulateTimeEnd(), MatrixMeschach.AddData(), FWRecoGeometryESProducer.addGEMGeometry(), FWTGeoRecoGeometryESProducer.addGEMGeometry(), FWRecoGeometryESProducer.addME0Geometry(), FWTGeoRecoGeometryESProducer.addME0Geometry(), SiStripHitEffFromCalibTree.algoAnalyze(), EcalStatusAnalyzer.analyze(), EcalMatacqAnalyzer.analyze(), SiStripDetVOffFakeBuilder.analyze(), EcalPerEvtMatacqAnalyzer.analyze(), KVFTrackUpdate.analyze(), EcalBarrelMonitorDbModule.analyze(), AlcaBeamMonitor.analyze(), MonitorElementsDb.analyze(), EcalPedHists.analyze(), EcalABAnalyzer.analyze(), EcalPerEvtLaserAnalyzer.analyze(), KineExample.analyze(), EcalTestPulseAnalyzer.analyze(), HLTBTagPerformanceAnalyzer.analyze(), EcalLaserAnalyzer2.analyze(), EcalLaserAnalyzer.analyze(), calcTopMass.analyze(), EcalLaserAnalyzerYousi.analyze(), EcnaAnalyzer.analyze(), CmsShowNavigator.appendFile(), cond::service::PoolDBOutputService.appendSinceTime(), AlcaBeamMonitor.beginLuminosityBlock(), FWFFLooper.beginRun(), FWTrackingParticleProxyBuilderFullFramework.build(), FWTrackProxyBuilderFullFramework.build(), Model.BuildMeasurementsFromOA(), FWPFTauProxyBuilder.buildViewType(), FWCaloTauProxyBuilder.buildViewType(), MeasurementDistancemeter.calculateSimulatedValue(), MeasurementDistancemeter3dim.calculateSimulatedValue(), MeasurementDiffEntry.calculateSimulatedValue(), Herwig7Interface.callHerwigGenerator(), ConfigurationDBHandler.characters(), DTUserKeyedConfigHandler.chkConfigList(), DTKeyedConfigHandler.chkConfigList(), edm::InputFile.Close(), CmsShowMain.CmsShowMain(), CocoaBestUnit.CocoaBestUnit(), CocoaDaqReaderRoot.CocoaDaqReaderRoot(), dqmservices::DQMFileIterator.collect(), MEtoMEComparitor.compare(), EcalDccWeightBuilder.computeAllWeights(), evf::EvFDaqDirector.contactFileBroker(), 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(), Herwig7Hadronizer.generatePartonsAndHadronize(), DTKeyedConfigCache.get(), pos::PixelConfigFile.get(), HcalQLPlotHistoMgr.GetAHistogramImpl(), TestHistoMgr.getHisto1(), TestHistoMgr.getHisto1FromSecondFile(), TestHistoMgr.getHisto2(), TestHistoMgr.getHistoProf1(), TestHistoMgr.getHistoProf2(), popcon::EcalSRPHandler.getNewObjects(), popcon::EcalTPGWeightIdMapHandler.getNewObjects(), popcon::EcalTPGWeightGroupHandler.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::EcalTPGFineGrainStripEEHandler.getNewObjects(), popcon::EcalTPGPedestalsHandler.getNewObjects(), popcon::EcalTPGSlidingWindowHandler.getNewObjects(), popcon::EcalTPGLutGroupHandler.getNewObjects(), popcon::EcalTPGSpikeThresholdHandler.getNewObjects(), edm::RootDelayedReader.getProduct_(), DDLSAX2Handler.getSpaceCount(), dqm::RamdiskMonitor.globalBeginLuminosityBlock(), evf::EvFDaqDirector.grabNextJsonFile(), evf::EvFDaqDirector.grabNextJsonFileAndUnlock(), 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(), load_dddefinition(), DTCCablingMapProducer.LoadModulesToDTCCablingMapFromCSV(), 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(), popcon::EcalTPGWeightIdMapHandler.readtxtFile(), popcon::EcalTPGWeightGroupHandler.readtxtFile(), XrdFile.readv(), popcon::EcalTPGWeightIdMapHandler.readxmlFile(), popcon::EcalTPGWeightGroupHandler.readxmlFile(), AdaptiveVertexFitter.reLinearizeTracks(), AdaptiveVertexFitter.reWeightTracks(), cond::Utilities.run(), FWEventItem.runFilter(), FWPathsPopup.scheduleReloadEvent(), cond.serialize(), ALIRmDataFromFile.setAngle(), MeasurementDistancemeter.setConversionFactor(), MeasurementDistancemeter3dim.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 14 of file cppFunctionSkipper.py.

cppFunctionSkipper.operator

Definition at line 12 of file cppFunctionSkipper.py.