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 334 of file dataset.py.

Constructor & Destructor Documentation

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

Definition at line 336 of file dataset.py.

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

Member Function Documentation

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

Definition at line 353 of file dataset.py.

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

Definition at line 339 of file dataset.py.

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

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

Definition at line 358 of file dataset.py.

References dataset.int.

Referenced by dataset.PrivateDataset.getPrimaryDatasetEntries().

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

Definition at line 382 of file dataset.py.

References dataset.int.

Referenced by dataset.PrivateDataset.buildListOfFilesDBS().

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

Definition at line 404 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::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.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::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, preexistingValidation.PreexistingValidation.name, Types._Untracked.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, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, core.autovars.NTupleObjectType.name, MyWatcher.name, edm::PathTimingSummary.name, cms::DDAlgoArguments.name, alignment.Alignment.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, edm::PathSummary.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, EcalLogicID.name, validateAlignments.ParallelMergeJob.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, TreeCrawler.Package.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, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, h4DSegm.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, PhysicsTools::Calibration::Variable.name, FastHFShowerLibrary.name, DQMGenericClient::CDOption.name, CounterChecker.name, cond::TagInfo_t.name, looper.Looper.name, DQMGenericClient::NoFlowOption.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, TrackerSectorStruct.name, Mapper::definition< ScannerT >.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, nanoaod::FlatTable::Column.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, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and dataset.BaseDataset.run_range.

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

Member Data Documentation

dataset.PrivateDataset.files

Definition at line 354 of file dataset.py.