ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/DataDiscovery.py
(Generate patch)

Comparing COMP/CRAB/python/DataDiscovery.py (file contents):
Revision 1.32 by ewv, Wed Jul 29 21:41:50 2009 UTC vs.
Revision 1.37.2.1 by ewv, Thu Jan 21 16:13:28 2010 UTC

# Line 1 | Line 1
1   #!/usr/bin/env python
2 +
3 + __revision__ = "$Id$"
4 + __version__ = "$Revision$"
5 +
6   import exceptions
7   import DBSAPI.dbsApi
8   from DBSAPI.dbsApiException import *
# Line 84 | Line 88 | class DataDiscovery:
88          #       Attributes
89          self.datasetPath = datasetPath
90          # Analysis dataset is primary/processed/tier/definition
91 <        self.ads = len(self.datasetPath.split("/")) > 3
91 >        self.ads = len(self.datasetPath.split("/")) > 4 or len(self.datasetPath.split("/")) == 1
92          self.cfg_params = cfg_params
93          self.skipBlocks = skipAnBlocks
94  
# Line 107 | Line 111 | class DataDiscovery:
111          global_url="http://cmsdbsprod.cern.ch/cms_dbs_prod_global/servlet/DBSServlet"
112          caf_url = "http://cmsdbsprod.cern.ch/cms_dbs_caf_analysis_01/servlet/DBSServlet"
113          dbs_url_map  =   {'glite':    global_url,
114 +                          'glite_slc5':global_url,\
115                            'glitecoll':global_url,\
116                            'condor':   global_url,\
117                            'condor_g': global_url,\
118                            'glidein':  global_url,\
119                            'lsf':      global_url,\
120                            'caf':      caf_url,\
121 <                          'sge':      global_url,
122 <                          'arc':      global_url
121 >                          'sge':      global_url,\
122 >                          'arc':      global_url,\
123 >                          'pbs':      global_url
124                            }
125  
126          dbs_url_default = dbs_url_map[(common.scheduler.name()).lower()]
127          dbs_url=  self.cfg_params.get('CMSSW.dbs_url', dbs_url_default)
128 <        common.logger.debug("Accessing DBS at: "+dbs_url)
128 >        common.logger.info("Accessing DBS at: "+dbs_url)
129  
130          ## check if runs are selected
131          runselection = []
# Line 134 | Line 140 | class DataDiscovery:
140          args = {}
141          args['url']     = dbs_url
142          args['level']   = 'CRITICAL'
143 +        args['adshome']   = '$HOME/DBSADS'
144  
145          ## check if has been requested to use the parent info
146          useparent = int(self.cfg_params.get('CMSSW.use_parent',0))
# Line 208 | Line 215 | class DataDiscovery:
215          common.logger.debug("Set of input parameters used for DBS query: %s" % allowedRetriveValue)
216          try:
217              if len(runselection) <=0 :
218 <                if useParent==1 or self.splitByRun==1 :
218 >                if useParent==1 or self.splitByRun==1 or self.ads:
219                      if self.ads:
220                          files = api.listFiles(analysisDataset=path, retriveList=allowedRetriveValue)
221                      else :
# Line 244 | Line 251 | class DataDiscovery:
251          return self.maxEvents
252  
253  
254 +    def getMaxLumis(self):
255 +        """
256 +        Return the number of lumis in the dataset
257 +        """
258 +        return self.maxLumis
259 +
260 +
261      def getEventsPerBlock(self):
262          """
263          list the event collections structure by fileblock

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines