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 extractFileSizes (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 337 of file dataset.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 339 of file dataset.py.

339  def __init__(self, name, dbsInstance=None):
340  super(PrivateDataset, self).__init__(name, 'PRIVATE', dbsInstance=dbsInstance)
341 

Member Function Documentation

◆ buildListOfFiles()

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

Reimplemented from dataset.BaseDataset.

Definition at line 356 of file dataset.py.

356  def buildListOfFiles(self, pattern='.*root'):
357  self.files = self.buildListOfFilesDBS(self.name, self.dbsInstance)
358 
359 

◆ buildListOfFilesDBS()

def dataset.PrivateDataset.buildListOfFilesDBS (   self,
  name,
  dbsInstance 
)

Definition at line 342 of file dataset.py.

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

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

◆ findPrimaryDatasetEntries()

def dataset.PrivateDataset.findPrimaryDatasetEntries (   dataset,
  dbsInstance,
  runmin,
  runmax 
)
static

Definition at line 361 of file dataset.py.

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

References dataset.int, and edm.print().

Referenced by dataset.PrivateDataset.getPrimaryDatasetEntries().

◆ findPrimaryDatasetNumFiles()

def dataset.PrivateDataset.findPrimaryDatasetNumFiles (   dataset,
  dbsInstance,
  runmin,
  runmax 
)
static

Definition at line 385 of file dataset.py.

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

References dataset.int, and edm.print().

Referenced by dataset.PrivateDataset.buildListOfFilesDBS().

◆ getPrimaryDatasetEntries()

def dataset.PrivateDataset.getPrimaryDatasetEntries (   self)

Reimplemented from dataset.BaseDataset.

Definition at line 407 of file dataset.py.

407  def getPrimaryDatasetEntries(self):
408  runmin = -1
409  runmax = -1
410  if self.run_range is not None:
411  runmin = self.run_range[0]
412  runmax = self.run_range[1]
413  return self.findPrimaryDatasetEntries(self.name, self.dbsInstance, runmin, runmax)

References dataset.BaseDataset.dbsInstance, dataset.CMSDataset.findPrimaryDatasetEntries(), dataset.PrivateDataset.findPrimaryDatasetEntries(), ElectronMVAID.ElectronMVAID.name, DigiComparisonTask.name, TestTask.name, TPComparisonTask.name, HcalOfflineHarvesting.name, HcalOnlineHarvesting.name, HFRaddamTask.name, LaserTask.name, NoCQTask.name, PedestalTask.name, QIE10Task.name, QIE11Task.name, RecHitTask.name, UMNioTask.name, ZDCTask.name, AlignableObjectId::entry.name, RawTask.name, average.Average.name, counter.Counter.name, TPTask.name, DigiTask.name, histograms.Histograms.name, LEDTask.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.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, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cms::dd::NameValuePair< T >.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::TAG::MODIFICATION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, ParameterSet.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, PixelDCSObject< T >::Item.name, cms::DDSpecPar.name, cms::dd::ValuePair< T, U >.name, dataset.BaseDataset.name, personalPlayback.Applet.name, Types._Untracked.name, MagCylinder.name, analyzer.Analyzer.name, ParSet.name, DQMRivetClient::LumiOption.name, cond::persistency::GTProxyData.name, Barrel.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, edm::PathTimingSummary.name, cms::DDAlgoArguments.name, SingleObjectCondition.name, cond::TimeTypeSpecs.name, core.autovars.NTupleObjectType.name, perftools::EdmEventSize::BranchRecord.name, MyWatcher.name, edm::PathSummary.name, EcalLogicID.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, Supermodule.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, TreeCrawler.Package.name, genericValidation.GenericValidation.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, FastHFShowerLibrary.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, magneticfield::BaseVolumeHandle.name, emtf::Node.name, h4DSegm.name, cms::DDParsingContext::CompositeMaterial.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, looper.Looper.name, DQMGenericClient::CDOption.name, PhysicsTools::Calibration::Variable.name, cond::persistency::PAYLOAD::DATA.name, cond::TagInfo_t.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TrackerSectorStruct.name, cond::persistency::PAYLOAD::VERSION.name, MuonGeometrySanityCheckPoint.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::NoFlowOption.name, CounterChecker.name, FCDTask.name, Mapper::definition< ScannerT >.name, EDMtoMEConverter.name, classes.MonitorData.name, HistogramManager.name, classes.OutputData.name, Crystal.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, h2DSegm.name, cond::persistency::IOV::INSERTION_TIME.name, options.HLTProcessOptions.name, DQMNet::WaitObject.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, AlpgenParameterName.name, geometry.Structure.name, config.Analyzer.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, SiStripMonitorDigi.name, BulkSilicon.name, config.Service.name, nanoaod::FlatTable::Column.name, APD.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, cond::payloadInspector::TagReference.name, BPHRecoBuilder::BPHCompSource.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, InnerLayerVolume.name, personalPlayback.FrameworkJob.name, Grid.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, crabFunctions.CrabTask.name, MBCoolTube.name, MBManif.name, cscdqm::ParHistoDef.name, hTMaxCell.name, BeautifulSoup.Tag.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, and dataset.BaseDataset.run_range.

Member Data Documentation

◆ files

dataset.PrivateDataset.files

Definition at line 357 of file dataset.py.

dataset.int
int
Definition: dataset.py:35
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66