CMS 3D CMS Logo

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

Functions

def makeJobBlock
 

Variables

string comma = ","
 
string commandline = " "
 
string commax = ","
 
tuple comment1RE = re.compile(r'^#.+$')
 
list commentLines = []
 
list copyargs = sys.argv[:]
 
int default = 0
 
string dest = "debug"
 
list eventsFiles = []
 
tuple evtPerJob = int(math.ceil(float(ntotal)/NBLOCKS))
 
tuple fileLineRE = re.compile(r'^.*\'(.*)\'.+# (\d*).*$')
 
tuple fin = open(INFILE, "r")
 
tuple fout = open(OUTFILE, mode="w")
 
string help = "debug verbosity level"
 
list INFILE = sys.argv[2]
 
list jobsBlocks = []
 
tuple lines = fin.readlines()
 
tuple match = comment1RE.match(line)
 
tuple NBLOCKS = int(sys.argv[1])
 
int ntotal = 0
 
list OUTFILE = sys.argv[3]
 
tuple parser = optparse.OptionParser(usage)
 To parse commandline args. More...
 
list prog = sys.argv[0]
 
 temp = eventsFiles
 
int tt = 0
 
string type = "int"
 
string usage = './%(prog)s NBLOCKS INFILE OUTFILE [options]\n'
 

Function Documentation

def groupFilesInBlocks.makeJobBlock (   mylist,
  evtn 
)

Definition at line 44 of file groupFilesInBlocks.py.

44 
45 def makeJobBlock(mylist, evtn):
46  n = mylist[0][0]
47  block = [mylist[0]]
48  choosen = [0]
49  while n<evtn:
50  #print "n,evtn=",n,evtn
51  # find the biggest unused #evt that would give n<evtn
52  for i in range(len(mylist)):
53  # get last not choosen i
54  last_i=len(mylist)-1
55  while last_i in choosen: last_i += -1
56  if i==last_i:
57  #print i,"last element reached"
58  n += mylist[i][0]
59  #print " new last append: ",i, mylist[i][0], n
60  block.append(mylist[i])
61  choosen.append(i)
62  break
63  if i in choosen:
64  #print i," in choosen, continue..."
65  continue
66  if n+mylist[i][0]<evtn:
67  n += mylist[i][0]
68  #print " new append: ",i, mylist[i][0], n
69  block.append(mylist[i])
70  choosen.append(i)
71  break
72  if len(choosen)==len(mylist):
73  #print " got everything"
74  break
75  # pick up unused elements
76  newlist = []
77  for i in range(len(mylist)):
78  if not i in choosen:
79  newlist.append(mylist[i])
80  print "done makeJobBlock n =",n," len =",len(block)
81  return block, newlist, n
82 
83 

Variable Documentation

string groupFilesInBlocks.comma = ","

Definition at line 173 of file groupFilesInBlocks.py.

string groupFilesInBlocks.commandline = " "

Definition at line 12 of file groupFilesInBlocks.py.

string groupFilesInBlocks.commax = ","

Definition at line 170 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.comment1RE = re.compile(r'^#.+$')

Definition at line 84 of file groupFilesInBlocks.py.

list groupFilesInBlocks.commentLines = []

Definition at line 99 of file groupFilesInBlocks.py.

list groupFilesInBlocks.copyargs = sys.argv[:]

Definition at line 6 of file groupFilesInBlocks.py.

int groupFilesInBlocks.default = 0

Definition at line 30 of file groupFilesInBlocks.py.

string groupFilesInBlocks.dest = "debug"

Definition at line 31 of file groupFilesInBlocks.py.

list groupFilesInBlocks.eventsFiles = []

Definition at line 97 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.evtPerJob = int(math.ceil(float(ntotal)/NBLOCKS))

Definition at line 132 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.fileLineRE = re.compile(r'^.*\'(.*)\'.+# (\d*).*$')

Definition at line 85 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.fin = open(INFILE, "r")

Definition at line 92 of file groupFilesInBlocks.py.

Referenced by main(), CSCGasGainCorrectionDBConditions.prefillDBGasGainCorrection(), ErrorCorrelationMgr.readFromReportFile(), AsciiNeutronReader.readNextEvent(), and TPNCor.TPNCor().

tuple groupFilesInBlocks.fout = open(OUTFILE, mode="w")

Definition at line 160 of file groupFilesInBlocks.py.

Referenced by EcalTPGLinearizationConstXMLTranslator.dumpXML(), and G4RegionReporter.ReportRegions().

string groupFilesInBlocks.help = "debug verbosity level"

Definition at line 28 of file groupFilesInBlocks.py.

list groupFilesInBlocks.INFILE = sys.argv[2]

Definition at line 39 of file groupFilesInBlocks.py.

list groupFilesInBlocks.jobsBlocks = []

Definition at line 139 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.lines = fin.readlines()

Definition at line 93 of file groupFilesInBlocks.py.

Referenced by HcalChannelIterator.addListFromLmapAscii(), FWConversionProxyBuilder.buildViewType(), HcalEmap.read_map(), and L1TTwinMuxRawToDigi.readline().

tuple groupFilesInBlocks.match = comment1RE.match(line)

Definition at line 105 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.NBLOCKS = int(sys.argv[1])

Definition at line 38 of file groupFilesInBlocks.py.

int groupFilesInBlocks.ntotal = 0

Definition at line 98 of file groupFilesInBlocks.py.

Referenced by cms::FastSimDataFilter.beginJob(), cms::FastSimDataFilter.endJob(), and cms::FastSimDataFilter.filter().

list groupFilesInBlocks.OUTFILE = sys.argv[3]

Definition at line 40 of file groupFilesInBlocks.py.

tuple groupFilesInBlocks.parser = optparse.OptionParser(usage)

To parse commandline args.

Definition at line 25 of file groupFilesInBlocks.py.

list groupFilesInBlocks.prog = sys.argv[0]

Definition at line 14 of file groupFilesInBlocks.py.

groupFilesInBlocks.temp = eventsFiles

Definition at line 140 of file groupFilesInBlocks.py.

Referenced by FWItemValueGetter.addEntry(), APVShotFinder.addShots(), PhysicsPerformanceDBWriterFromFile_WPandPayload.beginJob(), PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV.beginJob(), Basic2DGenericTopoClusterizer.buildClusters(), CmsDetConstruction.buildSmallDetsforGlued(), CmsDetConstruction.buildSmallDetsforStack(), RazorVarProducer.CalcMR(), razor.CalcMR(), razor.CalcMTR(), CalibrationHistograms.CalibrationHistograms(), SensitiveDetectorCatalog.className(), SensitiveDetectorCatalog.classNames(), CSCSegAlgoPreClustering.clusterHits(), edm::hash_detail.compactForm_(), RazorComputer.compute(), l1t.convertVariable(), AttachSD.create(), TT6ApvMask.defineNoisy(), CocoaDaqRootEvent.DumpIt(), edm::EmptyESSource.EmptyESSource(), edm::eventsetup.eventSetupGetImplementation(), NoiseSummaryFactory.extract(), PedsOnlySummaryFactory.extract(), PedestalsSummaryFactory.extract(), SummaryGeneratorControlView.fill(), SummaryGeneratorReadoutView.fill(), HLTHcalSimpleRecHitFilter.fillDescriptions(), HLTHcalCalibTypeFilter.fillDescriptions(), DivisiveVertexFinder.findVertexesAlt(), edm::hash_detail.fixup_(), GammaLn(), DTRecoConditions.get(), SimG4HcalHitJetFinder.getClusters(), MuonDDDNumbering.getInt(), SensitiveDetector.getNames(), TouchableToHistory.getNavStory(), PhysicsPerformancePayload.getRow(), ExtractStringFromDDD.getString(), DDG4SensitiveConverter.getString(), pfEGHelpers::HeavyObjectCache.HeavyObjectCache(), GSFTrackImporter.importToBlock(), DDAngular.initialize(), PerformancePayloadFromBinnedTFormula.initialize(), PerformancePayloadFromTFormula.initialize(), edm::eventsetup::EventSetupProvider.insert(), reco::helper::VirtualJetProducerHelper.intersection(), CmsTrackerDetIdBuilder.iterate(), HcalDQMDbInterface.itoa(), edm::eventsetup::DataProxyProvider.keyedProxies(), edm::es.l(), LocalCacheFile.LocalCacheFile(), SensitiveDetectorCatalog.logicalNamesFromClassName(), SequentialCombinationGenerator< T >.next_combination(), GsiFTPStorageMaker.open(), HttpStorageMaker.open(), MakePtrFromCollection< reco::MuonCollection >.operator()(), MakeVersionedSelector< reco::Muon >.operator()(), edm::es::Label.operator()(), L1GctJetCount< nBits >.operator+(), L1GctUnsignedInt< nBits >.operator+(), L1GctJetCount< nBits >.operator++(), operator<<(), edm::reftobase::Holder< T, REF >.operator=(), edm::EDCollection< T >.operator=(), edm::reftobase::IndirectHolder< T >.operator=(), L1GctHfBitCountsLut.operator=(), edm::CloningPtr< T, P >.operator=(), edm::HepMCProduct.operator=(), edm::RefVectorBase< key_type >.operator=(), L1GctHtMissLut.operator=(), edm::reftobase::VectorHolder< reco::Candidate, reco::GsfElectronRefVector >.operator=(), L1GctHfEtSumsLut.operator=(), edm::OrphanHandleBase.operator=(), edm::eventsetup::DataKey.operator=(), edm::HandleBase.operator=(), edm::Association< reco::FFTJPTJetCollection >.operator=(), edm::TriggerResults.operator=(), edm::OutputHandle.operator=(), edm::HLTGlobalStatus.operator=(), edm::BasicHandle.operator=(), edm::Exception.operator=(), edm::Handle< GenericObject >.operator=(), edm::Handle< FWGenericObject >.operator=(), edm::MapOfVectors< std::string, AnalysisDescription * >.operator=(), edm::hash_detail.print_(), L1GctElectronFinalSort.process(), Phase2TrackerCablingESProducer.produce(), SiPixelFakeGenErrorDBObjectESSource.produce(), SiPixelFakeTemplateDBObjectESSource.produce(), SiStripFedCablingESProducer.produce(), SensitiveDetectorCatalog.readoutNames(), edm::ProductProvenanceRetriever.readProvenance(), edm::ESProxyFactoryProducer.registerFactory(), edm::ESProxyFactoryProducer.registerFactoryWithKey(), FWEvePtr< T >.reset(), FWModelExpressionSelector.select(), DCUCapsuleTempDat.setCapsuleTemp(), DCUCCSDat.setCCSTempHigh(), DCUCCSDat.setCCSTempLow(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >.setData(), edm::Path.setEarlyDeleteHelpers(), FWExpressionEvaluator.setExpression(), FWModelFilter.setExpression(), DCUCCSDat.setM1DCUTemp(), DCUCCSDat.setM1Vcc(), DCUCCSDat.setM1VDD1(), DCUCCSDat.setM1VDD2(), DCUCCSDat.setM1Vinj(), DCUCCSDat.setM2DCUTemp(), DCUCCSDat.setM2Vcc(), DCUCCSDat.setM2VDD1(), DCUCCSDat.setM2VDD2(), DCUCCSDat.setM2Vinj(), DCUIDarkPedDat.setPed(), DDG4ProductionCuts.setProdCuts(), DCULVRTempsDat.setT1(), DCULVRBTempsDat.setT1(), DCULVRTempsDat.setT2(), DCULVRBTempsDat.setT2(), DCULVRBTempsDat.setT3(), DCULVRTempsDat.setT3(), DCSPTMTemp.setTemperature(), L1GctJet.setupJet(), convbremhelpers::HeavyObjectCache.setupMVA(), L1GctElectronSorter.setupObjects(), DCUVFETempDat.setVFETemp(), CmsTrackerRingBuilder.sortNS(), CmsTrackerLayerBuilder.sortNS(), CmsTrackerWheelBuilder.sortNS(), CmsTrackerOTDiscBuilder.sortNS(), CmsTrackerDiskBuilder.sortNS(), CmsTrackerPhase1DiskBuilder.sortNS(), CmsTrackerBuilder.sortNS(), SortSect(), SortSector(), edm::hash_detail.toDigest_(), edm::hash_detail.toString_(), TouchableToHistory.touchableToNavStory(), TkCommonMode.toVector(), metsig::SignPFSpecificAlgo.useOriginalPtrs(), edm::VParameterSetEntry.VParameterSetEntry(), and edm::Wrapper< T >.Wrapper().

int groupFilesInBlocks.tt = 0

Definition at line 142 of file groupFilesInBlocks.py.

Referenced by pat::helper::VertexingHelper.associate(), EcalCommon.crystalToTriggerTower(), EcalTPGStripStatusXMLTranslator.dumpXML(), spr.eECALmatrix(), CaloTowerGeometry.getSummary(), and PerformancePayloadFromBinnedTFormula.initialize().

string groupFilesInBlocks.type = "int"

Definition at line 29 of file groupFilesInBlocks.py.

string groupFilesInBlocks.usage = './%(prog)s NBLOCKS INFILE OUTFILE [options]\n'

Definition at line 16 of file groupFilesInBlocks.py.