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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 338 of file dataset.py.

338  def __init__(self, name, dbsInstance=None):
339  super(PrivateDataset, self).__init__(name, 'PRIVATE', dbsInstance=dbsInstance)
340 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ buildListOfFiles()

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

Definition at line 355 of file dataset.py.

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

◆ buildListOfFilesDBS()

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

Definition at line 341 of file dataset.py.

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

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

◆ findPrimaryDatasetEntries()

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

Definition at line 360 of file dataset.py.

References dataset.int, and print().

Referenced by dataset.PrivateDataset.getPrimaryDatasetEntries().

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

◆ findPrimaryDatasetNumFiles()

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

Definition at line 384 of file dataset.py.

References dataset.int, and print().

Referenced by dataset.PrivateDataset.buildListOfFilesDBS().

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

◆ getPrimaryDatasetEntries()

def dataset.PrivateDataset.getPrimaryDatasetEntries (   self)

Definition at line 406 of file dataset.py.

References dataset.BaseDataset.dbsInstance, dataset.CMSDataset.findPrimaryDatasetEntries(), dataset.PrivateDataset.findPrimaryDatasetEntries(), ElectronMVAID.ElectronMVAID.name, AlignableObjectId::entry.name, average.Average.name, counter.Counter.name, histograms.Histograms.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, TmModule.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, core.autovars.NTupleVariable.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, ParameterSet.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, OutputMEPSet.name, AlignmentConstraint.name, PixelDCSObject< T >::Item.name, dataset.BaseDataset.name, cms::dd::ValuePair< T, U >.name, personalPlayback.Applet.name, Types._Untracked.name, MagCylinder.name, analyzer.Analyzer.name, heppy::ParSet.name, DQMRivetClient::LumiOption.name, o2olib.O2OJob.name, cond::persistency::GTProxyData.name, SingleObjectCondition.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, cms::DDAlgoArguments.name, EgHLTOfflineSummaryClient::SumHistBinData.name, Barrel.name, perftools::EdmEventSize::BranchRecord.name, core.autovars.NTupleObjectType.name, cond::TimeTypeSpecs.name, edm::PathSummary.name, EcalLogicID.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, TreeCrawler.Package.name, Supermodule.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, cond::Tag_t.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, magneticfield::BaseVolumeHandle.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, FastHFShowerLibrary.name, emtf::Node.name, h4DSegm.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, DQMGenericClient::CDOption.name, CounterChecker.name, cond::TagInfo_t.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::Calibration::Variable.name, EDMtoMEConverter.name, cond::persistency::PAYLOAD::HASH.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, classes.MonitorData.name, HistogramManager.name, classes.OutputData.name, BPHDecayToResResBuilderBase::DZSelect.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, DQMNet::WaitObject.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, SiStripMonitorDigi.name, config.Service.name, BulkSilicon.name, APD.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, lutNN::LutNeuronLayerFixedPoint< input_I, input_F, inputSize, lut_I, lut_F, neurons, output_I >.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.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, lutNN::LutNetworkFixedPointRegression2Outputs< input_I, input_F, inputSize, layer1_lut_I, layer1_lut_F, layer1_neurons, layer1_output_I, layer2_input_I, layer2_lut_I, layer2_lut_F, layer2_neurons, layer3_input_I, layer3_0_inputCnt, layer3_0_lut_I, layer3_0_lut_F, output0_I, output0_F, layer3_1_inputCnt, layer3_1_lut_I, layer3_1_lut_F, output1_I, output1_F >.name, personalPlayback.FrameworkJob.name, Grid.name, trklet::TrackletConfigBuilder::DTCinfo.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, SummaryOutputProducer::GenericSummary.name, and dataset.BaseDataset.run_range.

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

Member Data Documentation

◆ files

dataset.PrivateDataset.files

Definition at line 356 of file dataset.py.