CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
dataset.PrivateDataset Class Reference
Inheritance diagram for dataset.PrivateDataset:
dataset.BaseDataset

Public Member Functions

def __init__ (self, name, dbsInstance=None)
 
def buildListOfFiles (self, pattern='.*root')
 
def buildListOfFilesDBS (self, name, dbsInstance)
 
def getPrimaryDatasetEntries (self)
 
- Public Member Functions inherited from dataset.BaseDataset
def __init__ (self, name, user, pattern='.*root', run_range=None, dbsInstance=None)
 def init(self, name, user, pattern='. More...
 
def buildListOfBadFiles (self)
 
def buildListOfFiles (self, pattern)
 
def extractFileSizes (self)
 
def getPrimaryDatasetEntries (self)
 
def listOfFiles (self)
 
def listOfGoodFiles (self)
 
def listOfGoodFilesWithPrescale (self, prescale)
 
def printFiles (self, abspath=True, info=True)
 
def printInfo (self)
 

Static Public Member Functions

def findPrimaryDatasetEntries (dataset, dbsInstance, runmin, runmax)
 
def findPrimaryDatasetNumFiles (dataset, dbsInstance, runmin, runmax)
 

Public Attributes

 files
 
- Public Attributes inherited from dataset.BaseDataset
 bad_files
 
 dbsInstance
 MM. More...
 
 files
 
 filesAndSizes
 
 good_files
 
 name
 
 pattern
 
 primaryDatasetEntries
 MM. More...
 
 report
 
 run_range
 
 user
 

Detailed Description

Definition at line 333 of file dataset.py.

Constructor & Destructor Documentation

def dataset.PrivateDataset.__init__ (   self,
  name,
  dbsInstance = None 
)

Definition at line 335 of file dataset.py.

335  def __init__(self, name, dbsInstance=None):
336  super(PrivateDataset, self).__init__(name, 'PRIVATE', dbsInstance=dbsInstance)
337 
def __init__(self, name, dbsInstance=None)
Definition: dataset.py:335

Member Function Documentation

def dataset.PrivateDataset.buildListOfFiles (   self,
  pattern = '.*root' 
)

Definition at line 352 of file dataset.py.

352  def buildListOfFiles(self, pattern='.*root'):
353  self.files = self.buildListOfFilesDBS(self.name, self.dbsInstance)
354 
355 
def buildListOfFiles(self, pattern='.*root')
Definition: dataset.py:352
def buildListOfFilesDBS(self, name, dbsInstance)
Definition: dataset.py:338
def dataset.PrivateDataset.buildListOfFilesDBS (   self,
  name,
  dbsInstance 
)

Definition at line 338 of file dataset.py.

References dataset.CMSDataset.findPrimaryDatasetNumFiles(), and dataset.PrivateDataset.findPrimaryDatasetNumFiles().

338  def buildListOfFilesDBS(self, name, dbsInstance):
339  entries = self.findPrimaryDatasetNumFiles(name, dbsInstance, -1, -1)
340  files = []
341  dbs = 'das_client.py --query="file dataset=%s instance=prod/%s" --limit=%s' % (name, dbsInstance, entries)
342  dbsOut = os.popen(dbs)
343  for line in dbsOut:
344  if line.find('/store')==-1:
345  continue
346  line = line.rstrip()
347  # print 'line',line
348  files.append(line)
349  #return ['root://eoscms//eos/cms%s' % f for f in files]
350  return files
351 
def findPrimaryDatasetNumFiles(dataset, dbsInstance, runmin, runmax)
Definition: dataset.py:381
def buildListOfFilesDBS(self, name, dbsInstance)
Definition: dataset.py:338
def dataset.PrivateDataset.findPrimaryDatasetEntries (   dataset,
  dbsInstance,
  runmin,
  runmax 
)
static

Definition at line 357 of file dataset.py.

References dataset.int.

Referenced by dataset.PrivateDataset.getPrimaryDatasetEntries().

357  def findPrimaryDatasetEntries(dataset, dbsInstance, runmin, runmax):
358 
359  query, qwhat = dataset, "dataset"
360  if "#" in dataset: qwhat = "block"
361  if runmin >0 or runmax > 0:
362  if runmin == runmax:
363  query = "%s run=%d" % (query,runmin)
364  else:
365  print "WARNING: queries with run ranges are slow in DAS"
366  query = "%s run between [%d, %d]" % (query,runmin if runmin > 0 else 1, runmax if runmax > 0 else 999999)
367  dbs='das_client.py --query="summary %s=%s instance=prod/%s"'%(qwhat, query, dbsInstance)
368  dbsOut = os.popen(dbs).readlines()
369 
370  entries = []
371  for line in dbsOut:
372  line = line.replace('\n','')
373  if "nevents" in line:
374  entries.append(int(line.split(":")[1]))
375  if entries:
376  return sum(entries)
377  return -1
378 
379 
def findPrimaryDatasetEntries(dataset, dbsInstance, runmin, runmax)
Definition: dataset.py:357
def dataset.PrivateDataset.findPrimaryDatasetNumFiles (   dataset,
  dbsInstance,
  runmin,
  runmax 
)
static

Definition at line 381 of file dataset.py.

References dataset.int.

Referenced by dataset.PrivateDataset.buildListOfFilesDBS().

381  def findPrimaryDatasetNumFiles(dataset, dbsInstance, runmin, runmax):
382 
383  query, qwhat = dataset, "dataset"
384  if "#" in dataset: qwhat = "block"
385  if runmin >0 or runmax > 0:
386  if runmin == runmax:
387  query = "%s run=%d" % (query,runmin)
388  else:
389  print "WARNING: queries with run ranges are slow in DAS"
390  query = "%s run between [%d, %d]" % (query,runmin if runmin > 0 else 1, runmax if runmax > 0 else 999999)
391  dbs='das_client.py --query="summary %s=%s instance=prod/%s"'%(qwhat, query, dbsInstance)
392  dbsOut = os.popen(dbs).readlines()
393 
394  entries = []
395  for line in dbsOut:
396  line = line.replace('\n','')
397  if "nfiles" in line:
398  entries.append(int(line.split(":")[1]))
399  if entries:
400  return sum(entries)
401  return -1
402 
def findPrimaryDatasetNumFiles(dataset, dbsInstance, runmin, runmax)
Definition: dataset.py:381
def dataset.PrivateDataset.getPrimaryDatasetEntries (   self)

Definition at line 403 of file dataset.py.

References dataset.BaseDataset.dbsInstance, dataset.CMSDataset.findPrimaryDatasetEntries(), dataset.PrivateDataset.findPrimaryDatasetEntries(), ElectronMVAID.ElectronMVAID.name, counter.Counter.name, average.Average.name, AlignableObjectId::entry.name, histograms.Histograms.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GLOBAL_TAG::NAME.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, MEPSet.name, cond::persistency::TAG::END_OF_VALIDITY.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, Types._Untracked.name, cond::persistency::TAG::INSERTION_TIME.name, preexistingValidation.PreexistingValidation.name, cond::persistency::TAG::MODIFICATION_TIME.name, dataset.BaseDataset.name, OutputMEPSet.name, personalPlayback.Applet.name, ParameterSet.name, PixelDCSObject< T >::Item.name, analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, MagCylinder.name, ParSet.name, DQMRivetClient::ScaleFactorOption.name, SingleObjectCondition.name, EgHLTOfflineSummaryClient::SumHistBinData.name, cond::persistency::GTProxyData.name, core.autovars.NTupleObjectType.name, alignment.Alignment.name, MyWatcher.name, Mapper::definition< ScannerT >.name, edm::PathTimingSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, edm::PathSummary.name, PixelEndcapLinkMaker::Item.name, DQMGenericClient::EfficOption.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, FWTableViewManager::TableEntry.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, options.ConnectionHLTMenu.name, DQMGenericClient::ProfileOption.name, emtf::Node.name, DQMGenericClient::NormOption.name, FastHFShowerLibrary.name, h4DSegm.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, CounterChecker.name, cond::TagInfo_t.name, EDMtoMEConverter.name, looper.Looper.name, MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::IOV::TAG_NAME.name, TrackerSectorStruct.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, options.HLTProcessOptions.name, h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, config.Analyzer.name, geometry.Structure.name, core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.name, core.autovars.NTupleObject.name, config.Service.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and dataset.BaseDataset.run_range.

404  runmin = -1
405  runmax = -1
406  if self.run_range is not None:
407  runmin = self.run_range[0]
408  runmax = self.run_range[1]
409  return self.findPrimaryDatasetEntries(self.name, self.dbsInstance, runmin, runmax)
def getPrimaryDatasetEntries(self)
Definition: dataset.py:403
def findPrimaryDatasetEntries(dataset, dbsInstance, runmin, runmax)
Definition: dataset.py:357

Member Data Documentation

dataset.PrivateDataset.files

Definition at line 353 of file dataset.py.