CMS 3D CMS Logo

Classes | Functions | Variables
edmPickEvents Namespace Reference

Classes

class  Event
 Event helper class ##. More...
 

Functions

def fullCPMpath ()
 
def getFileNames (event)
 Subroutines ##. More...
 
def guessEmail ()
 
def setupCrabDict (options)
 

Variables

 action
 
 args
 
 colonRE
 
 command
 
 commentRE
 
 crab
 
 crabDict
 
 crabTemplate
 
 dataset
 
 default
 
 description
 
 dest
 
 email
 

Main Program

More...
 
 event
 
 eventFiles
 
 eventList
 
 eventPurgeList
 
 eventsToProcess
 
 files
 Interactive ##. More...
 
 fileSet
 
 help
 
 json
 
 line
 
 lumis
 
 options
 
 parser
 
 runsAndLumis
 CRAB ##. More...
 
 source
 
 target
 
 type
 
 uniqueFiles
 

Function Documentation

def edmPickEvents.fullCPMpath ( )

Definition at line 107 of file edmPickEvents.py.

Referenced by setupCrabDict().

108  base = os.environ.get ('CMSSW_BASE')
109  if not base:
110  raise RuntimeError("CMSSW Environment not set")
111  retval = "%s/src/PhysicsTools/Utilities/configuration/copyPickMerge_cfg.py" \
112  % base
113  if os.path.exists (retval):
114  return retval
115  base = os.environ.get ('CMSSW_RELEASE_BASE')
116  retval = "%s/src/PhysicsTools/Utilities/configuration/copyPickMerge_cfg.py" \
117  % base
118  if os.path.exists (retval):
119  return retval
120  raise RuntimeError("Could not find copyPickMerge_cfg.py")
121 
def edmPickEvents.getFileNames (   event)

Subroutines ##.

Definition at line 84 of file edmPickEvents.py.

84 def getFileNames (event):
85  files = []
86 
87  query = "file dataset=%(dataset)s run=%(run)i lumi=%(lumi)i | grep file.name" % event
88  jsondict = das_client.get_data(query)
89  status = jsondict['status']
90  if status != 'ok':
91  print "DAS query status: %s"%(status)
92  return files
93 
94  mongo_query = jsondict['mongo_query']
95  filters = mongo_query['filters']
96  data = jsondict['data']
97 
98  files = []
99  for row in data:
100  file = [r for r in das_client.get_value(row, filters['grep'])][0]
101  if len(file) > 0 and not file in files:
102  files.append(file)
103 
104  return files
105 
106 
def getFileNames(event)
Subroutines ##.
def edmPickEvents.guessEmail ( )

Definition at line 122 of file edmPickEvents.py.

References join(), and split.

123  return '%s@%s' % (commands.getoutput ('whoami'),
124  '.'.join(commands.getoutput('hostname').split('.')[-2:]))
125 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
double split
Definition: MVATrainer.cc:139
def edmPickEvents.setupCrabDict (   options)

Definition at line 126 of file edmPickEvents.py.

References fullCPMpath().

126 def setupCrabDict (options):
127  date = datetime.now().strftime('%Y%m%d_%H%M%S')
128  crab = {}
129  base = options.base
130  crab['runEvent'] = '%s_runEvents.txt' % base
131  crab['copyPickMerge'] = fullCPMpath()
132  crab['output'] = '%s.root' % base
133  crab['crabcfg'] = '%s_crab.py' % base
134  crab['json'] = '%s.json' % base
135  crab['dataset'] = Event.dataset
136  crab['email'] = options.email
137  crab['WorkArea'] = date
138  if options.crabCondor:
139  crab['scheduler'] = 'condor'
140 # crab['useServer'] = ''
141  else:
142  crab['scheduler'] = 'remoteGlidein'
143 # crab['useServer'] = 'use_server = 1'
144  crab['useServer'] = ''
145  return crab
146 
147 # crab template
def setupCrabDict(options)

Variable Documentation

edmPickEvents.action

Definition at line 206 of file edmPickEvents.py.

edmPickEvents.args

Definition at line 220 of file edmPickEvents.py.

edmPickEvents.colonRE

Definition at line 232 of file edmPickEvents.py.

edmPickEvents.command

Definition at line 316 of file edmPickEvents.py.

edmPickEvents.commentRE

Definition at line 231 of file edmPickEvents.py.

edmPickEvents.crab

Definition at line 260 of file edmPickEvents.py.

edmPickEvents.crabDict

Definition at line 273 of file edmPickEvents.py.

edmPickEvents.crabTemplate

Definition at line 148 of file edmPickEvents.py.

edmPickEvents.dataset

Definition at line 230 of file edmPickEvents.py.

edmPickEvents.default

Definition at line 204 of file edmPickEvents.py.

edmPickEvents.description

Definition at line 200 of file edmPickEvents.py.

edmPickEvents.dest

Definition at line 203 of file edmPickEvents.py.

edmPickEvents.email

Main Program

Definition at line 199 of file edmPickEvents.py.

edmPickEvents.event

Definition at line 238 of file edmPickEvents.py.

edmPickEvents.eventFiles

Definition at line 296 of file edmPickEvents.py.

edmPickEvents.eventList

Definition at line 233 of file edmPickEvents.py.

edmPickEvents.eventPurgeList

Definition at line 294 of file edmPickEvents.py.

edmPickEvents.eventsToProcess

Definition at line 271 of file edmPickEvents.py.

edmPickEvents.files

Interactive ##.

Definition at line 293 of file edmPickEvents.py.

edmPickEvents.fileSet

Definition at line 306 of file edmPickEvents.py.

Referenced by TauDQMFileLoader.endRun(), and TauDQMFileLoader.TauDQMFileLoader().

edmPickEvents.help

Definition at line 19 of file edmPickEvents.py.

edmPickEvents.json
edmPickEvents.line

Definition at line 246 of file edmPickEvents.py.

edmPickEvents.lumis

Definition at line 270 of file edmPickEvents.py.

edmPickEvents.options

Definition at line 220 of file edmPickEvents.py.

edmPickEvents.parser

Definition at line 200 of file edmPickEvents.py.

edmPickEvents.runsAndLumis

CRAB ##.

Definition at line 269 of file edmPickEvents.py.

edmPickEvents.source

Definition at line 244 of file edmPickEvents.py.

edmPickEvents.target

Definition at line 275 of file edmPickEvents.py.

Referenced by GroupedCkfTrajectoryBuilder.advanceOneLayer(), emtf::Node.calcOptimumSplit(), DeepFlavourJetTagsProducer.DeepFlavourJetTagsProducer(), edm::PathsAndConsumesOfModules.doModuleDescription(), PhysicsTools::TrainProcessor.doTrainData(), edm::service::EnableFloatingPointExceptions.enableAndDisableExcept(), KDTreeLinkerBase.fieldType(), edm::RootFile.fillEventHistory(), PhysicsTools::MVATrainer.fillInputVars(), TopDecaySubset.fillListing(), find(), cond::persistency::RunInfoProxy.find(), BinomialNoncentralInterval< FeldmanCousinsSorter >.find_rho_set(), HcalDcsMap.findByDcsId(), HcalFrontEndMap.findById(), CastorElectronicsMap.findById(), HcalElectronicsMap.findById(), HcalDcsMap.findById(), HcalObjectAddons.findByT(), CastorElectronicsMap.findByTrigId(), HcalElectronicsMap.findByTrigId(), HcalSiPMCharacteristics.findByType(), GraphPath< N, E >.fromTo(), PhysicsTools::TrainProcessor.getCalibration(), CastorCalibrationsSet.getCalibrations(), CastorCalibrationWidthsSet.getCalibrationWidths(), edm::service::RandomNumberGeneratorService.getEngine(), XMLProcessor.getInstance(), CastorRawGains.getValues(), HcalRawGains.getValues(), CachedTrajectory.getWideTrajectory(), DDHtmlFormatter.h3(), fwlite::Event.history(), dqmstorepb::ROOTFilePB_Histo.InternalSerializeWithCachedSizesToArray(), dqmstorepb::ROOTFilePB.InternalSerializeWithCachedSizesToArray(), DDHtmlFormatter.lnk(), HcalFrontEndMapAddons::Helper.loadObject(), HcalSiPMCharacteristicsAddons::Helper.loadObject(), PlotCompareUtility.makeHTML(), HcalDcsMapAddons::Helper.mapGeomId2DcsId(), MatcherUsingTracksAlgorithm.match(), edm::PathsAndConsumesOfModules.moduleIndex(), LStoreFile::MutexWrapper.MutexWrapper(), dqmstorepb::ROOTFilePB_Histo.New(), dqmstorepb::ROOTFilePB.New(), GenericTriggerEventFlag.off(), edm::ThinnedAssociationsHelper.parentBegin(), edm::ThinnedAssociationsHelper.parentEnd(), cond::persistency::BasePayloadProxy.payloadId(), edm::service::RandomNumberGeneratorService.postModuleStreamCheck(), edm::service::RandomNumberGeneratorService.preModuleStreamCheck(), TopDecaySubset.produce(), CachedTrajectory.propagateForward(), L1MuBMSEU.run(), L1MuDTSEU.run(), PhysicsTools.stdStringPrintf(), edm::EDConsumerBase.throwConsumesCallAfterFrozen(), L1MuDTExtrapolationUnit.which_ext(), L1MuBMExtrapolationUnit.which_ext(), cond::Iov_t.~Iov_t(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >.~MVAModuleHelper(), and XMLDocument.~XMLDocument().

edmPickEvents.type

Definition at line 203 of file edmPickEvents.py.

edmPickEvents.uniqueFiles

Definition at line 307 of file edmPickEvents.py.