ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/DBS/Clients/Tests/testGetDatasetBlocks.py
Revision: 1.3
Committed: Fri Feb 10 19:58:38 2006 UTC (19 years, 2 months ago) by sekhri
Content type: text/x-python
Branch: MAIN
CVS Tags: AfterJan2006SchemaChanges_v01_00_01
Branch point for: BranchForCPPWebServiceTesting
Changes since 1.2: +4 -2 lines
Log Message:
New schme incorporated and Ale's issues fixed

File Contents

# Content
1 import dbsException
2 import dbsApplication
3 import dbsProcessingPath
4 import dbsProcessedDataset
5 import testCaseInterface
6 # Unit testing.
7
8 class testGetDatasetBlocks(testCaseInterface.testCaseInterface) :
9
10 def __init__(self):
11 testCaseInterface.testCaseInterface.__init__(self)
12 self.addTestCase(self.getDatasetBlocks)
13
14 datasetPath = "/ThisIsATestDataset/Digi/ThisIsATestProcDataset"
15 app = dbsApplication.DbsApplication(
16 family="CMSAppFam",
17 executable="cmsRun",
18 version="CMSSW_XYZ",
19 parameterSet="pSetDummy")
20
21 processingPath = dbsProcessingPath.DbsProcessingPath(
22 dataTier="Digi",
23 application=app)
24
25 self.dataset = dbsProcessedDataset.DbsProcessedDataset(
26 primaryDatasetName="ThisIsATestDataset",
27 isDatasetOpen="y",
28 datasetName="ThisIsATestProcDataset",
29 processingPath=processingPath)
30
31 def getDatasetBlocks(self):
32 funcName = "%s.%s" % (self.__class__.__name__, "getDatasetBlocks : Get a list of File Blocks in a Dataset")
33 print "Now executing ", funcName
34
35 try:
36
37 fileBlockList = self.api.getDatasetFileBlocks(self.dataset)
38 for fileBlock in fileBlockList:
39 print "File block name/id: %s/%s" % (fileBlock.getBlockName(),fileBlock.getBlockId())
40 for eventCollection in fileBlock.getEventCollectionList():
41 print " %s" % eventCollection
42
43 except dbsException.DbsException, ex:
44 return 1
45
46 return 0
47
48