CMS 3D CMS Logo

Classes | Functions
tier0 Namespace Reference

Classes

class  ResponseError
 
class  Tier0Error
 
class  Tier0Handler
 

Functions

def _raise_http_error (curl, response, proxy, timeout)
 
def test (url)
 
def unique (seq, keepstr=True)
 

Function Documentation

def tier0._raise_http_error (   curl,
  response,
  proxy,
  timeout 
)
private

Definition at line 62 of file tier0.py.

62 def _raise_http_error( curl, response, proxy, timeout ):
63  raise ResponseError( curl, response, proxy, timeout )
64 
def _raise_http_error(curl, response, proxy, timeout)
Definition: tier0.py:62
def tier0.test (   url)

Definition at line 178 of file tier0.py.

178 def test( url ):
179  t0 = Tier0Handler( url, 1, 1, 1, None, debug=False)
180 
181  print ' fcsr = %s (%s)' % (t0.getFirstSafeRun(), type(t0.getFirstSafeRun()) )
182  print ' reco_config = %s' % t0.getGlobalTag('reco_config')
183  print ' express_config = %s' % t0.getGlobalTag('express_config')
184  print '\n'
185 
186 
def test(url)
Definition: tier0.py:178
def tier0.unique (   seq,
  keepstr = True 
)

Definition at line 24 of file tier0.py.

References GetRecoTauVFromDQM_MC_cff.next, and lumiQTWidget.t.

Referenced by BeamHaloNavigationSchool.addInward(), edm.addToMissingDictionariesException(), SiStripLatency.allLatencies(), SiStripLatency.allModes(), SiStripLatency.allUniqueLatencyAndModes(), RPCTwinMuxDigiToRaw.beginRun(), SiStripThreshold.compact(), TriggerRatesMonitor.dqmBeginRun(), CSCSegmentValidation.fillEfficiencyPlots(), FWGeoMaterialValidator.fillOptions(), FWDetailViewManager.findViewersFor(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >.getBestCombination(), tier0.Tier0Handler.getGlobalTag(), ESElectronicsMapper.GetListofFEDs(), SiStripFEDMonitorPlugin.getMajority(), TTUTrackingAlg.ghostBuster(), TTClusterAssociationMap< T >.isCombinatoric(), TTClusterAssociationMap< T >.isGenuine(), TTClusterAssociationMap< T >.isUnknown(), fireworks::OptionNode.options(), MagGeoBuilderFromDDD::volumeHandle.printUniqueNames(), TTUEmulator.processTtu(), TTTrackAssociator< T >.produce(), TTClusterAssociator< T >.produce(), TTStubAssociator< T >.produce(), ReducedRecHitCollectionProducer.produce(), EgammaIsoESDetIdCollectionProducer.produce(), HLTJetCollForElePlusJets< T >.produce(), EgammaIsoHcalDetIdCollectionProducer.produce(), InterestingDetIdFromSuperClusterProducer.produce(), InterestingDetIdCollectionProducer.produce(), pat::PATPhotonProducer.produce(), pat::PATElectronProducer.produce(), SiStripElectronAlgo.projectPhiBand(), SiStripPsuDetIdMap.RemoveDuplicateDetIDs(), SiStripDetVOffBuilder.removeDuplicates(), edm::eventsetup::EventSetupProvider.resetRecordPlusDependentRecords(), SiStripPsuDetIdMap.retrieveDcuDeviceAddresses(), CSCMotherboardME11GEM.run(), L1TForest.saveSplitValues(), FWExpressionValidator.setType(), ClusterTPAssociation.sortAndUnique(), Phase2TrackerCabling.summaryDescription(), edm.throwMissingDictionariesException(), and ProvenanceDumper.work_().

24 def unique(seq, keepstr=True):
25  t = type(seq)
26  if t in (unicode, str):
27  t = (list, t('').join)[bool(keepstr)]
28  try:
29  remaining = set(seq)
30  seen = set()
31  return t(c for c in seq if (c in remaining and not remaining.remove(c)))
32  except TypeError: # hashing didn't work, see if seq is sortable
33  try:
34  from itertools import groupby
35  s = sorted(enumerate(seq),key=lambda i_v1:(i_v1[1],i_v1[0]))
36  return t(next(g) for k,g in groupby(s, lambda i_v: i_v[1]))
37  except: # not sortable, use brute force
38  seen = []
39  return t(c for c in seq if not (c in seen or seen.append(c)))
40 
def unique(seq, keepstr=True)
Definition: tier0.py:24