Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:24

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TestCocoa")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.debugModules = cms.untracked.vstring('cocoa')
0007 process.MessageLogger.cout = cms.untracked.PSet(
0008     threshold = cms.untracked.string('DEBUG')
0009 )
0010 
0011 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0012 
0013 # A data source must always be defined. We don't need it, so here's a dummy one.
0014 process.source = cms.Source("EmptyIOVSource",
0015     timetype = cms.string('runnumber'),
0016     firstValue = cms.uint64(1),
0017     lastValue = cms.uint64(1),
0018     interval = cms.uint64(1)
0019 )
0020 
0021 
0022 # dd4hep-based geometry
0023 process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
0024                                             confGeomXMLFiles = cms.FileInPath('Alignment/CocoaApplication/test/cmsCocoaTable2DWithMirror.xml'),
0025                                             appendToDataLabel = cms.string('')
0026                                             )
0027                                             
0028 process.DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
0029                                                  appendToDataLabel = cms.string('')
0030                                                 )
0031 
0032                                                                   
0033 process.load("CondCore.CondDB.CondDB_cfi")
0034 process.CondDB.connect = 'sqlite_file:OpticalAlignments.db'
0035 
0036 
0037 # Read DB: this is used to correct internal geometry with geo from DB.
0038 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0039     process.CondDB,
0040     DumpStat=cms.untracked.bool(True),
0041     toGet = cms.VPSet(cms.PSet(
0042         record = cms.string('OpticalAlignmentsRcd'),
0043         tag = cms.string("OpticalAlignmentsRcdInput")
0044     )),
0045 )
0046 
0047 
0048 # Write COCOA output to DB ('Output tag')
0049 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0050     process.CondDB,
0051     timetype = cms.untracked.string('runnumber'),
0052     toPut = cms.VPSet(
0053         cms.PSet(
0054             record = cms.string('OpticalAlignmentsRcd'),
0055             tag = cms.string('OpticalAlignmentsRcdOutput')
0056         ), 
0057         cms.PSet(
0058             record = cms.string('DTAlignmentRcd'),
0059             tag = cms.string('DTAlignmentRcdOutput')
0060         ),
0061         cms.PSet(
0062             record = cms.string('DTAlignmentErrorExtendedRcd'),
0063             tag = cms.string('DTAlignmentErrorExtendedRcdOutput')
0064         ),
0065         cms.PSet(
0066             record = cms.string('CSCAlignmentRcd'),
0067             tag = cms.string('CSCAlignmentRcdOutput')
0068         ),
0069         cms.PSet(
0070             record = cms.string('CSCAlignmentErrorExtendedRcd'),
0071             tag = cms.string('CSCAlignmentErrorExtendedRcdOutput')
0072         ),
0073     )
0074 )
0075 
0076 
0077 # Run COCOA                                                
0078 process.cocoa = cms.EDAnalyzer('CocoaAnalyzer',
0079                 maxEvents = cms.int32(1),
0080                 cocoaDaqRootFile = cms.string("cocoaDaqTest.root")
0081                               )
0082 
0083 process.p = cms.Path(process.cocoa)
0084