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

◆ delLines()

def cppFunctionSkipper.delLines (   string,
  startPosition,
  endPosition 
)

Definition at line 79 of file cppFunctionSkipper.py.

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

References str.

Referenced by filterFile().

◆ filterFile()

def cppFunctionSkipper.filterFile (   file)

Definition at line 30 of file cppFunctionSkipper.py.

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 

References delLines(), print(), and readEcalDQMStatus.read.

Referenced by filterFiles().

◆ filterFiles()

def cppFunctionSkipper.filterFiles (   fileList)

Definition at line 16 of file cppFunctionSkipper.py.

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 

References filterFile(), and FastTimerService_cff.range.

Variable Documentation

◆ __author__

cppFunctionSkipper.__author__
private

Definition at line 3 of file cppFunctionSkipper.py.

◆ __date__

cppFunctionSkipper.__date__
private

Definition at line 4 of file cppFunctionSkipper.py.

◆ cv_decl

cppFunctionSkipper.cv_decl

Definition at line 9 of file cppFunctionSkipper.py.

◆ decl_param

cppFunctionSkipper.decl_param

Definition at line 11 of file cppFunctionSkipper.py.

◆ declarator

cppFunctionSkipper.declarator

Definition at line 8 of file cppFunctionSkipper.py.

◆ dm_init

cppFunctionSkipper.dm_init

Definition at line 13 of file cppFunctionSkipper.py.

◆ exception

cppFunctionSkipper.exception

Definition at line 10 of file cppFunctionSkipper.py.

Referenced by TrackingTruthAccumulator.accumulateEvent(), edm::service::Timing.accumulateTimeEnd(), MatrixMeschach.AddData(), edm::ExceptionCollector.addException(), FWRecoGeometryESProducer.addGEMGeometry(), FWTGeoRecoGeometryESProducer.addGEMGeometry(), FWRecoGeometryESProducer.addME0Geometry(), FWTGeoRecoGeometryESProducer.addME0Geometry(), edm.addToMissingDictionariesException(), SiStripHitEffFromCalibTree.algoAnalyze(), EcalStatusAnalyzer.analyze(), EcalPerEvtMatacqAnalyzer.analyze(), EcalMatacqAnalyzer.analyze(), SiStripDetVOffFakeBuilder.analyze(), KVFTrackUpdate.analyze(), EcalBarrelMonitorDbModule.analyze(), EcalPerEvtLaserAnalyzer.analyze(), EcalPedHists.analyze(), EcalABAnalyzer.analyze(), MonitorElementsDb.analyze(), EcalTestPulseAnalyzer.analyze(), AlcaBeamMonitor.analyze(), KineExample.analyze(), EcalLaserAnalyzer2.analyze(), HLTBTagPerformanceAnalyzer.analyze(), EcalLaserAnalyzer.analyze(), calcTopMass.analyze(), EcalLaserAnalyzerYousi.analyze(), EcnaAnalyzer.analyze(), CmsShowNavigator.appendFile(), cond::service::PoolDBOutputService.appendSinceTime(), FWFFLooper.beginRun(), FWTrackingParticleProxyBuilderFullFramework.build(), FWTrackProxyBuilderFullFramework.build(), Model.BuildMeasurementsFromOA(), FWPFTauProxyBuilder.buildViewType(), MeasurementDistancemeter.calculateSimulatedValue(), MeasurementDistancemeter3dim.calculateSimulatedValue(), MeasurementDiffEntry.calculateSimulatedValue(), Herwig7Interface.callHerwigGenerator(), trackerDTC::Setup.checkDTCId(), trackerDTC::Setup.checkGeometry(), trackerDTC::Setup.checkTFPIdentifier(), trackerDTC::Setup.checkTKLayoutId(), DTUserKeyedConfigHandler.chkConfigList(), DTKeyedConfigHandler.chkConfigList(), edm::InputFile.Close(), cond::service::PoolDBOutputService.closeIOV(), CmsShowMain.CmsShowMain(), CocoaBestUnit.CocoaBestUnit(), CocoaDaqReaderRoot.CocoaDaqReaderRoot(), dqmservices::DQMFileIterator.collect(), EcalDccWeightBuilder.computeAllWeights(), evf::EvFDaqDirector.contactFileBroker(), sistrip::DigiToRaw.createFedBuffers_(), cond::service::PoolDBOutputService.createNewIOV(), FWEventItem.data(), edm::releaseversion::DecomposedReleaseVersion.DecomposedReleaseVersion(), cond.default_deserialize(), DTGeometryParserFromDDD.DTGeometryParserFromDDD(), Pi0FixedMassWindowCalibration.duringLoop(), ZeeCalibration.duringLoop(), EcalCondDBReader.EcalCondDBReader(), ecaldqm::EcalDQMonitor.EcalDQMonitor(), trackerDTC::Setup.encodeLayerId(), FWModelChangeManager.endChanges(), cond::service::PoolDBOutputService.eraseSinceTime(), helper::ScannerBase.eval(), DTMeanTimerFitter.evaluateVDriftAndReso(), ecaldqm::EcalDQMonitor.executeOnWorkers_(), LMFUnique.fetchAll(), helper::ScannerBase.fill1D(), helper::ScannerBase.fill2D(), helper::ScannerBase.fillGraph(), helper::ScannerBase.fillProf(), Model.FindOptAlignInfoByType(), CandKinematicVertexFitter.fit(), CandCommonVertexFitter< Fitter >.fit(), BeamMonitor.FitAndFill(), FakeBeamMonitor.FitAndFill(), FittedEntriesReader.FittedEntriesReader(), DTMeanTimerFitter.fitTMax(), BPHDecayVertex.fitVertex(), PFDisplacedVertexFinder.fitVertexFromSeed(), cond::service::PoolDBOutputService.forceInit(), 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::EcalTPGPhysicsConstHandler.getNewObjects(), popcon::EcalTPGWeightIdMapHandler.getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler.getNewObjects(), popcon::EcalTPGBadStripHandler.getNewObjects(), popcon::EcalTPGBadTTHandler.getNewObjects(), popcon::EcalTPGLinConstHandler.getNewObjects(), popcon::EcalTPGLutIdMapHandler.getNewObjects(), popcon::EcalTPGBadXTHandler.getNewObjects(), popcon::EcalTPGFineGrainEBGroupHandler.getNewObjects(), popcon::EcalTPGFineGrainTowerEEHandler.getNewObjects(), popcon::EcalTPGSlidingWindowHandler.getNewObjects(), popcon::EcalTPGWeightGroupHandler.getNewObjects(), popcon::EcalTPGPedestalsHandler.getNewObjects(), popcon::EcalTPGFineGrainStripEEHandler.getNewObjects(), popcon::EcalTPGSpikeThresholdHandler.getNewObjects(), popcon::EcalTPGLutGroupHandler.getNewObjects(), edm::RootDelayedReader.getProduct_(), cond::service::PoolDBOutputService.getTagInfo(), dqm::RamdiskMonitor.globalBeginLuminosityBlock(), AlcaBeamMonitor.globalBeginLuminosityBlock(), evf::EvFDaqDirector.grabNextJsonFile(), evf::EvFDaqDirector.grabNextJsonFileAndUnlock(), SiStripConfigDb.handleException(), XrdAdaptor::ClientRequest.HandleResponse(), HLTHcalSimpleRecHitFilter.hltFilter(), PixelToLNKAssociateFromAscii.init(), PixelToFEDAssociateFromAscii.init(), 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(), helper::ScannerBase.print(), tfwliteselectortest::ThingsWorker.process(), tfwliteselectortest::ThingsTSelector.process(), TFWLiteSelectorBasic.Process(), PhotonConversionTrajectorySeedProducerFromQuadruplets.produce(), Onia2MuMuPAT.produce(), RecoTauPiZeroProducer.produce(), PFRecoTauChargedHadronProducer.produce(), trackerDTC::Setup.produceSensorModules(), ptomaine(), RunInfoRead.readData(), DQMSummaryReader.readData(), 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(), cond::persistency::Logger.saveOnDb(), FWPathsPopup.scheduleReloadEvent(), trackerDTC::Setup.sensorModule(), cond.serialize(), ALIRmDataFromFile.setAngle(), MeasurementDistancemeter.setConversionFactor(), MeasurementDistancemeter3dim.setConversionFactor(), CocoaDaqReader.SetDaqReader(), HcalQLPlotAnalAlgos.SetEventType(), ecaldqm::DQWorker.setME(), TTDTC.setStream(), CocoaToDDLMgr.so(), TTDTC.stream(), TagProbeFitTreeAnalyzer.TagProbeFitTreeAnalyzer(), helper::ScannerBase.test(), edm.throwAmbiguousException(), edm::PrincipalGetAdapter.throwAmbiguousException(), edm.throwMissingDictionariesException(), edm::DataManagingProductResolver.throwProductDeletedException(), edm.throwProductDeletedException(), MultiVertexFitter.updateSeeds(), edm::convertException.wrap(), MonPulseShapeDat.writeDB(), cond::service::PoolDBOutputService.writeOne(), DTCalibDBUtils.writeToDB(), and InputFile.~InputFile().

◆ functStart_re

cppFunctionSkipper.functStart_re

Definition at line 14 of file cppFunctionSkipper.py.

◆ operator

cppFunctionSkipper.operator

Definition at line 12 of file cppFunctionSkipper.py.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
cppFunctionSkipper.filterFile
def filterFile(file)
Definition: cppFunctionSkipper.py:30
cppFunctionSkipper.delLines
def delLines(string, startPosition, endPosition)
Definition: cppFunctionSkipper.py:79
str
#define str(s)
Definition: TestProcessor.cc:51
cppFunctionSkipper.filterFiles
def filterFiles(fileList)
Definition: cppFunctionSkipper.py:16
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
readEcalDQMStatus.read
read
Definition: readEcalDQMStatus.py:38