Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:31

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 import sys
0004 
0005 def chooseTrans(index):
0006     d = (
0007          ["Simple", #0
0008     cms.untracked.VPSet(
0009                         cms.PSet(type = cms.untracked.string("IsFile"),
0010                                  id = cms.untracked.EventID(0,0,0)),
0011                         cms.PSet(type = cms.untracked.string("IsRun"),
0012                                  id = cms.untracked.EventID(1,0,0)),
0013                         cms.PSet(type = cms.untracked.string("IsLumi"),
0014                                  id = cms.untracked.EventID(1,1,0)),
0015                         cms.PSet(type = cms.untracked.string("IsEvent"),
0016                                  id = cms.untracked.EventID(1,1,1)),
0017                         cms.PSet(type = cms.untracked.string("IsEvent"),
0018                                  id = cms.untracked.EventID(1,1,2)),
0019                         cms.PSet(type = cms.untracked.string("IsEvent"),
0020                                  id = cms.untracked.EventID(1,1,3)),
0021                         cms.PSet(type = cms.untracked.string("IsEvent"),
0022                                  id = cms.untracked.EventID(1,1,4)),
0023                         cms.PSet(type = cms.untracked.string("IsEvent"),
0024                                  id = cms.untracked.EventID(1,1,5)),
0025                         cms.PSet(type = cms.untracked.string("IsStop"),
0026                                  id = cms.untracked.EventID(0,0,0))
0027                         ) ],
0028          ["Less events than streams", #1
0029     cms.untracked.VPSet(
0030                         cms.PSet(type = cms.untracked.string("IsFile"),
0031                                  id = cms.untracked.EventID(0,0,0)),
0032                         cms.PSet(type = cms.untracked.string("IsRun"),
0033                                  id = cms.untracked.EventID(1,0,0)),
0034                         cms.PSet(type = cms.untracked.string("IsLumi"),
0035                                  id = cms.untracked.EventID(1,1,0)),
0036                         cms.PSet(type = cms.untracked.string("IsEvent"),
0037                                  id = cms.untracked.EventID(1,1,1)),
0038                         cms.PSet(type = cms.untracked.string("IsStop"),
0039                                  id = cms.untracked.EventID(0,0,0))
0040                         ) ],
0041          ["Multiple different Lumis", #2
0042     cms.untracked.VPSet(
0043                         cms.PSet(type = cms.untracked.string("IsFile"),
0044                                  id = cms.untracked.EventID(0,0,0)),
0045                         cms.PSet(type = cms.untracked.string("IsRun"),
0046                                  id = cms.untracked.EventID(1,0,0)),
0047                         cms.PSet(type = cms.untracked.string("IsLumi"),
0048                                  id = cms.untracked.EventID(1,1,0)),
0049                         cms.PSet(type = cms.untracked.string("IsEvent"),
0050                                  id = cms.untracked.EventID(1,1,1)),
0051                         cms.PSet(type = cms.untracked.string("IsEvent"),
0052                                  id = cms.untracked.EventID(1,1,2)),
0053                         cms.PSet(type = cms.untracked.string("IsLumi"),
0054                                  id = cms.untracked.EventID(1,2,0)),
0055                         cms.PSet(type = cms.untracked.string("IsEvent"),
0056                                  id = cms.untracked.EventID(1,2,3)),
0057                         cms.PSet(type = cms.untracked.string("IsEvent"),
0058                                  id = cms.untracked.EventID(1,2,4)),
0059                         cms.PSet(type = cms.untracked.string("IsStop"),
0060                                  id = cms.untracked.EventID(0,0,0))
0061                         ) ],
0062          ["Empty Lumi", #3
0063     cms.untracked.VPSet(
0064                         cms.PSet(type = cms.untracked.string("IsFile"),
0065                                  id = cms.untracked.EventID(0,0,0)),
0066                         cms.PSet(type = cms.untracked.string("IsRun"),
0067                                  id = cms.untracked.EventID(1,0,0)),
0068                         cms.PSet(type = cms.untracked.string("IsLumi"),
0069                                  id = cms.untracked.EventID(1,1,0)),
0070                         cms.PSet(type = cms.untracked.string("IsLumi"),
0071                                  id = cms.untracked.EventID(1,2,0)),
0072                         cms.PSet(type = cms.untracked.string("IsEvent"),
0073                                  id = cms.untracked.EventID(1,2,3)),
0074                         cms.PSet(type = cms.untracked.string("IsEvent"),
0075                                  id = cms.untracked.EventID(1,2,4)),
0076                         cms.PSet(type = cms.untracked.string("IsStop"),
0077                                  id = cms.untracked.EventID(0,0,0))
0078                         ) ],
0079          ["Empty Lumi at end", #4
0080     cms.untracked.VPSet(
0081                         cms.PSet(type = cms.untracked.string("IsFile"),
0082                                  id = cms.untracked.EventID(0,0,0)),
0083                         cms.PSet(type = cms.untracked.string("IsRun"),
0084                                  id = cms.untracked.EventID(1,0,0)),
0085                         cms.PSet(type = cms.untracked.string("IsLumi"),
0086                                  id = cms.untracked.EventID(1,1,0)),
0087                         cms.PSet(type = cms.untracked.string("IsEvent"),
0088                                  id = cms.untracked.EventID(1,1,3)),
0089                         cms.PSet(type = cms.untracked.string("IsEvent"),
0090                                  id = cms.untracked.EventID(1,1,4)),
0091                         cms.PSet(type = cms.untracked.string("IsLumi"),
0092                                  id = cms.untracked.EventID(1,2,0)),
0093                         cms.PSet(type = cms.untracked.string("IsStop"),
0094                                  id = cms.untracked.EventID(0,0,0))
0095                         ) ],
0096          ["Multiple different runs", #5
0097     cms.untracked.VPSet(
0098                         cms.PSet(type = cms.untracked.string("IsFile"),
0099                                  id = cms.untracked.EventID(0,0,0)),
0100                         cms.PSet(type = cms.untracked.string("IsRun"),
0101                                  id = cms.untracked.EventID(1,0,0)),
0102                         cms.PSet(type = cms.untracked.string("IsLumi"),
0103                                  id = cms.untracked.EventID(1,1,0)),
0104                         cms.PSet(type = cms.untracked.string("IsEvent"),
0105                                  id = cms.untracked.EventID(1,1,1)),
0106                         cms.PSet(type = cms.untracked.string("IsEvent"),
0107                                  id = cms.untracked.EventID(1,1,2)),
0108                         cms.PSet(type = cms.untracked.string("IsRun"),
0109                                  id = cms.untracked.EventID(2,0,0)),
0110                         cms.PSet(type = cms.untracked.string("IsLumi"),
0111                                  id = cms.untracked.EventID(2,1,0)),
0112                         cms.PSet(type = cms.untracked.string("IsEvent"),
0113                                  id = cms.untracked.EventID(2,1,1)),
0114                         cms.PSet(type = cms.untracked.string("IsEvent"),
0115                                  id = cms.untracked.EventID(2,1,2)),
0116                         cms.PSet(type = cms.untracked.string("IsStop"),
0117                                  id = cms.untracked.EventID(0,0,0))
0118                         ) ],
0119          ["Empty run", #6
0120     cms.untracked.VPSet(
0121                         cms.PSet(type = cms.untracked.string("IsFile"),
0122                                  id = cms.untracked.EventID(0,0,0)),
0123                         cms.PSet(type = cms.untracked.string("IsRun"),
0124                                  id = cms.untracked.EventID(1,0,0)),
0125                         cms.PSet(type = cms.untracked.string("IsRun"),
0126                                  id = cms.untracked.EventID(2,0,0)),
0127                         cms.PSet(type = cms.untracked.string("IsLumi"),
0128                                  id = cms.untracked.EventID(2,1,0)),
0129                         cms.PSet(type = cms.untracked.string("IsEvent"),
0130                                  id = cms.untracked.EventID(2,1,1)),
0131                         cms.PSet(type = cms.untracked.string("IsEvent"),
0132                                  id = cms.untracked.EventID(2,1,2)),
0133                         cms.PSet(type = cms.untracked.string("IsStop"),
0134                                  id = cms.untracked.EventID(0,0,0))
0135                         ) ],
0136          ["Empty run at end", #7
0137     cms.untracked.VPSet(
0138                         cms.PSet(type = cms.untracked.string("IsFile"),
0139                                  id = cms.untracked.EventID(0,0,0)),
0140                         cms.PSet(type = cms.untracked.string("IsRun"),
0141                                  id = cms.untracked.EventID(1,0,0)),
0142                         cms.PSet(type = cms.untracked.string("IsLumi"),
0143                                  id = cms.untracked.EventID(1,1,0)),
0144                         cms.PSet(type = cms.untracked.string("IsEvent"),
0145                                  id = cms.untracked.EventID(1,1,1)),
0146                         cms.PSet(type = cms.untracked.string("IsEvent"),
0147                                  id = cms.untracked.EventID(1,1,2)),
0148                         cms.PSet(type = cms.untracked.string("IsRun"),
0149                                  id = cms.untracked.EventID(2,0,0)),
0150                         cms.PSet(type = cms.untracked.string("IsStop"),
0151                                  id = cms.untracked.EventID(0,0,0))
0152                         ) ],
0153          ["Empty run no lumi", #8
0154     cms.untracked.VPSet(
0155                         cms.PSet(type = cms.untracked.string("IsFile"),
0156                                  id = cms.untracked.EventID(0,0,0)),
0157                         cms.PSet(type = cms.untracked.string("IsRun"),
0158                                  id = cms.untracked.EventID(1,0,0)),
0159                         cms.PSet(type = cms.untracked.string("IsStop"),
0160                                  id = cms.untracked.EventID(0,0,0))
0161                         ) ],
0162          ["Empty file at end", #9
0163     cms.untracked.VPSet(
0164                         cms.PSet(type = cms.untracked.string("IsFile"),
0165                                  id = cms.untracked.EventID(0,0,0)),
0166                         cms.PSet(type = cms.untracked.string("IsRun"),
0167                                  id = cms.untracked.EventID(1,0,0)),
0168                         cms.PSet(type = cms.untracked.string("IsLumi"),
0169                                  id = cms.untracked.EventID(1,1,0)),
0170                         cms.PSet(type = cms.untracked.string("IsEvent"),
0171                                  id = cms.untracked.EventID(1,1,1)),
0172                         cms.PSet(type = cms.untracked.string("IsEvent"),
0173                                  id = cms.untracked.EventID(1,1,2)),
0174                         cms.PSet(type = cms.untracked.string("IsFile"),
0175                                  id = cms.untracked.EventID(0,0,0)),
0176                         cms.PSet(type = cms.untracked.string("IsStop"),
0177                                  id = cms.untracked.EventID(0,0,0))
0178                         ) ],
0179          ["Empty file", #10
0180     cms.untracked.VPSet(
0181                         cms.PSet(type = cms.untracked.string("IsFile"),
0182                                  id = cms.untracked.EventID(0,0,0)),
0183                         cms.PSet(type = cms.untracked.string("IsFile"),
0184                                  id = cms.untracked.EventID(0,0,0)),
0185                         cms.PSet(type = cms.untracked.string("IsRun"),
0186                                  id = cms.untracked.EventID(1,0,0)),
0187                         cms.PSet(type = cms.untracked.string("IsLumi"),
0188                                  id = cms.untracked.EventID(1,1,0)),
0189                         cms.PSet(type = cms.untracked.string("IsEvent"),
0190                                  id = cms.untracked.EventID(1,1,1)),
0191                         cms.PSet(type = cms.untracked.string("IsEvent"),
0192                                  id = cms.untracked.EventID(1,1,2)),
0193                         cms.PSet(type = cms.untracked.string("IsStop"),
0194                                  id = cms.untracked.EventID(0,0,0))
0195                         ) ],
0196          ["Merge run across files", #11
0197     cms.untracked.VPSet(
0198                         cms.PSet(type = cms.untracked.string("IsFile"),
0199                                  id = cms.untracked.EventID(0,0,0)),
0200                         cms.PSet(type = cms.untracked.string("IsRun"),
0201                                  id = cms.untracked.EventID(1,0,0)),
0202                         cms.PSet(type = cms.untracked.string("IsLumi"),
0203                                  id = cms.untracked.EventID(1,1,0)),
0204                         cms.PSet(type = cms.untracked.string("IsEvent"),
0205                                  id = cms.untracked.EventID(1,1,1)),
0206                         cms.PSet(type = cms.untracked.string("IsEvent"),
0207                                  id = cms.untracked.EventID(1,1,2)),
0208                         cms.PSet(type = cms.untracked.string("IsFile"),
0209                                  id = cms.untracked.EventID(0,0,0)),
0210                         cms.PSet(type = cms.untracked.string("IsRun"),
0211                                  id = cms.untracked.EventID(1,0,0)),
0212                         cms.PSet(type = cms.untracked.string("IsLumi"),
0213                                  id = cms.untracked.EventID(1,2,0)),
0214                         cms.PSet(type = cms.untracked.string("IsEvent"),
0215                                  id = cms.untracked.EventID(1,2,3)),
0216                         cms.PSet(type = cms.untracked.string("IsEvent"),
0217                                  id = cms.untracked.EventID(1,2,4)),
0218                         cms.PSet(type = cms.untracked.string("IsStop"),
0219                                  id = cms.untracked.EventID(0,0,0))
0220                         ) ],
0221          ["Merge run & lumi across files", #12
0222     cms.untracked.VPSet(
0223                         cms.PSet(type = cms.untracked.string("IsFile"),
0224                                  id = cms.untracked.EventID(0,0,0)),
0225                         cms.PSet(type = cms.untracked.string("IsRun"),
0226                                  id = cms.untracked.EventID(1,0,0)),
0227                         cms.PSet(type = cms.untracked.string("IsLumi"),
0228                                  id = cms.untracked.EventID(1,1,0)),
0229                         cms.PSet(type = cms.untracked.string("IsEvent"),
0230                                  id = cms.untracked.EventID(1,1,1)),
0231                         cms.PSet(type = cms.untracked.string("IsEvent"),
0232                                  id = cms.untracked.EventID(1,1,2)),
0233                         cms.PSet(type = cms.untracked.string("IsFile"),
0234                                  id = cms.untracked.EventID(0,0,0)),
0235                         cms.PSet(type = cms.untracked.string("IsRun"),
0236                                  id = cms.untracked.EventID(1,0,0)),
0237                         cms.PSet(type = cms.untracked.string("IsLumi"),
0238                                  id = cms.untracked.EventID(1,1,0)),
0239                         cms.PSet(type = cms.untracked.string("IsEvent"),
0240                                  id = cms.untracked.EventID(1,1,3)),
0241                         cms.PSet(type = cms.untracked.string("IsEvent"),
0242                                  id = cms.untracked.EventID(1,1,4)),
0243                         cms.PSet(type = cms.untracked.string("IsStop"),
0244                                  id = cms.untracked.EventID(0,0,0))
0245                         ) ],
0246          ["Different run across files", #13
0247           cms.untracked.VPSet(
0248                               cms.PSet(type = cms.untracked.string("IsFile"),
0249                                        id = cms.untracked.EventID(0,0,0)),
0250                               cms.PSet(type = cms.untracked.string("IsRun"),
0251                                        id = cms.untracked.EventID(1,0,0)),
0252                               cms.PSet(type = cms.untracked.string("IsLumi"),
0253                                        id = cms.untracked.EventID(1,1,0)),
0254                               cms.PSet(type = cms.untracked.string("IsEvent"),
0255                                        id = cms.untracked.EventID(1,1,1)),
0256                               cms.PSet(type = cms.untracked.string("IsEvent"),
0257                                        id = cms.untracked.EventID(1,1,2)),
0258                               cms.PSet(type = cms.untracked.string("IsFile"),
0259                                        id = cms.untracked.EventID(0,0,0)),
0260                               cms.PSet(type = cms.untracked.string("IsRun"),
0261                                        id = cms.untracked.EventID(2,0,0)),
0262                               cms.PSet(type = cms.untracked.string("IsLumi"),
0263                                        id = cms.untracked.EventID(2,1,0)),
0264                               cms.PSet(type = cms.untracked.string("IsEvent"),
0265                                        id = cms.untracked.EventID(2,1,1)),
0266                               cms.PSet(type = cms.untracked.string("IsEvent"),
0267                                        id = cms.untracked.EventID(2,1,2)),
0268                               cms.PSet(type = cms.untracked.string("IsStop"),
0269                                        id = cms.untracked.EventID(0,0,0))
0270                               ) ],
0271 
0272          ["Delayed lumi merge", #14
0273     cms.untracked.VPSet(
0274                         cms.PSet(type = cms.untracked.string("IsFile"),
0275                                  id = cms.untracked.EventID(0,0,0)),
0276                         cms.PSet(type = cms.untracked.string("IsRun"),
0277                                  id = cms.untracked.EventID(1,0,0)),
0278                         cms.PSet(type = cms.untracked.string("IsLumi"),
0279                                  id = cms.untracked.EventID(1,1,0)),
0280                         cms.PSet(type = cms.untracked.string("IsLumi"), #to merge
0281                                  id = cms.untracked.EventID(1,1,0)),
0282                         cms.PSet(type = cms.untracked.string("IsEvent"),
0283                                  id = cms.untracked.EventID(1,1,1)),
0284                         cms.PSet(type = cms.untracked.string("IsEvent"),
0285                                  id = cms.untracked.EventID(1,1,2)),
0286                         cms.PSet(type = cms.untracked.string("IsLumi"),
0287                                  id = cms.untracked.EventID(1,2,0)),
0288                         cms.PSet(type = cms.untracked.string("IsEvent"),
0289                                  id = cms.untracked.EventID(1,2,3)),
0290                         cms.PSet(type = cms.untracked.string("IsEvent"),
0291                                  id = cms.untracked.EventID(1,2,4)),
0292                         cms.PSet(type = cms.untracked.string("IsStop"),
0293                                  id = cms.untracked.EventID(0,0,0))
0294                         ) ],
0295          ["Delayed lumi merge 2", #15
0296     cms.untracked.VPSet(
0297                         cms.PSet(type = cms.untracked.string("IsFile"),
0298                                  id = cms.untracked.EventID(0,0,0)),
0299                         cms.PSet(type = cms.untracked.string("IsRun"),
0300                                  id = cms.untracked.EventID(1,0,0)),
0301                         cms.PSet(type = cms.untracked.string("IsLumi"),
0302                                  id = cms.untracked.EventID(1,1,0)),
0303                         cms.PSet(type = cms.untracked.string("IsEvent"),
0304                                  id = cms.untracked.EventID(1,1,1)),
0305                         cms.PSet(type = cms.untracked.string("IsEvent"),
0306                                  id = cms.untracked.EventID(1,1,2)),
0307                         cms.PSet(type = cms.untracked.string("IsLumi"),
0308                                  id = cms.untracked.EventID(1,2,0)),
0309                         cms.PSet(type = cms.untracked.string("IsLumi"),
0310                                  id = cms.untracked.EventID(1,2,0)), # to merge
0311                         cms.PSet(type = cms.untracked.string("IsEvent"),
0312                                  id = cms.untracked.EventID(1,2,3)),
0313                         cms.PSet(type = cms.untracked.string("IsEvent"),
0314                                  id = cms.untracked.EventID(1,2,4)),
0315                         cms.PSet(type = cms.untracked.string("IsStop"),
0316                                  id = cms.untracked.EventID(0,0,0))
0317                         ) ],
0318          ["Delayed run merge", #16
0319     cms.untracked.VPSet(
0320                         cms.PSet(type = cms.untracked.string("IsFile"),
0321                                  id = cms.untracked.EventID(0,0,0)),
0322                         cms.PSet(type = cms.untracked.string("IsRun"),
0323                                  id = cms.untracked.EventID(1,0,0)),
0324                         cms.PSet(type = cms.untracked.string("IsRun"), # to merge
0325                                  id = cms.untracked.EventID(1,0,0)),
0326                         cms.PSet(type = cms.untracked.string("IsLumi"),
0327                                  id = cms.untracked.EventID(1,1,0)),
0328                         cms.PSet(type = cms.untracked.string("IsEvent"),
0329                                  id = cms.untracked.EventID(1,1,1)),
0330                         cms.PSet(type = cms.untracked.string("IsEvent"),
0331                                  id = cms.untracked.EventID(1,1,2)),
0332                         cms.PSet(type = cms.untracked.string("IsRun"),
0333                                  id = cms.untracked.EventID(2,0,0)),
0334                         cms.PSet(type = cms.untracked.string("IsLumi"),
0335                                  id = cms.untracked.EventID(2,1,0)),
0336                         cms.PSet(type = cms.untracked.string("IsEvent"),
0337                                  id = cms.untracked.EventID(2,1,1)),
0338                         cms.PSet(type = cms.untracked.string("IsEvent"),
0339                                  id = cms.untracked.EventID(2,1,2)),
0340                         cms.PSet(type = cms.untracked.string("IsStop"),
0341                                  id = cms.untracked.EventID(0,0,0))
0342                         ) ],
0343          ["Delayed run merge 2", #17
0344     cms.untracked.VPSet(
0345                         cms.PSet(type = cms.untracked.string("IsFile"),
0346                                  id = cms.untracked.EventID(0,0,0)),
0347                         cms.PSet(type = cms.untracked.string("IsRun"),
0348                                  id = cms.untracked.EventID(1,0,0)),
0349                         cms.PSet(type = cms.untracked.string("IsLumi"),
0350                                  id = cms.untracked.EventID(1,1,0)),
0351                         cms.PSet(type = cms.untracked.string("IsEvent"),
0352                                  id = cms.untracked.EventID(1,1,1)),
0353                         cms.PSet(type = cms.untracked.string("IsEvent"),
0354                                  id = cms.untracked.EventID(1,1,2)),
0355                         cms.PSet(type = cms.untracked.string("IsRun"),
0356                                  id = cms.untracked.EventID(2,0,0)),
0357                         cms.PSet(type = cms.untracked.string("IsRun"), # to merge
0358                                  id = cms.untracked.EventID(2,0,0)),
0359                         cms.PSet(type = cms.untracked.string("IsLumi"),
0360                                  id = cms.untracked.EventID(2,1,0)),
0361                         cms.PSet(type = cms.untracked.string("IsEvent"),
0362                                  id = cms.untracked.EventID(2,1,1)),
0363                         cms.PSet(type = cms.untracked.string("IsEvent"),
0364                                  id = cms.untracked.EventID(2,1,2)),
0365                         cms.PSet(type = cms.untracked.string("IsStop"),
0366                                  id = cms.untracked.EventID(0,0,0))
0367                         ) ],
0368     )
0369     print('****************************************')
0370     print('Test:', d[index][0])
0371     print('****************************************')
0372     return d[index][1]
0373 
0374 trans = chooseTrans(int(sys.argv[1]))
0375 
0376 process = cms.Process("TEST")
0377 process.source = cms.Source("TestSource", 
0378                             transitions = trans)
0379 #process.add_(cms.Service("Tracer"))
0380 process.add_(cms.Service("CheckTransitions", 
0381                          transitions = trans))
0382 process.options = cms.untracked.PSet(numberOfThreads = cms.untracked.uint32(2),
0383                                      numberOfStreams = cms.untracked.uint32(0))