Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:50

0001 # -----------------------------------------------------------------------------
0002 # o2o-template_cfg.py : cmsRun configuration file for o2o DCS extraction
0003 #
0004 # Author  : Jo Cole
0005 # Changes : Marco DeMattia
0006 #           Dave Schudel
0007 # -----------------------------------------------------------------------------
0008 
0009 # -----------------------------------------------------------------------------
0010 # Import configuration information & define our process
0011 # -----------------------------------------------------------------------------
0012 import FWCore.ParameterSet.Config as cms
0013 
0014 process = cms.Process("test")
0015 
0016 # -----------------------------------------------------------------------------
0017 # Load our message logger
0018 # -----------------------------------------------------------------------------
0019 process.load("CalibTracker.SiStripDCS.MessLogger_cfi")
0020 # -----------------------------------------------------------------------------
0021 # Define our configuration database service.  
0022 #
0023 # Parameters:
0024 #   ConfDB
0025 #   TNS_ADMIN
0026 #   UsingDb
0027 #   Partitions
0028 # -----------------------------------------------------------------------------
0029 
0030 process.SiStripConfigDb = cms.Service("SiStripConfigDb",
0031     ConfDb = cms.untracked.string('cms_trk_tkcc/PASSWORD@cms_omds_lb'),
0032     TNS_ADMIN = cms.untracked.string('/opt/cmssw/shifter/o2o_dcs/connection_files'),
0033     # TNS_ADMIN = cms.untracked.string('/exports/slc4/CMSSW/Development/Users/DeMattia/connection_files'),
0034     UsingDb = cms.untracked.bool(True),
0035     Partitions = cms.untracked.PSet(
0036         PartTIBD = cms.untracked.PSet(
0037                 PartitionName = cms.untracked.string("TI_13-JUN-2009_1"),
0038                 ForceCurrentState = cms.untracked.bool(False),
0039                 ForceVersions = cms.untracked.bool(True), 
0040                 DcuPsuMapVersion = cms.untracked.vuint32(265,1)
0041                 ),
0042         PartTOB = cms.untracked.PSet(
0043                 PartitionName = cms.untracked.string("TO_30-JUN-2009_1"),
0044                 ForceCurrentState = cms.untracked.bool(False),
0045                 ForceVersions = cms.untracked.bool(True), 
0046                 DcuPsuMapVersion = cms.untracked.vuint32(268,2)
0047                 ),
0048         PartTECP = cms.untracked.PSet(
0049                 PartitionName = cms.untracked.string("TP_09-JUN-2009_1"),
0050                 ForceCurrentState = cms.untracked.bool(False),
0051                 ForceVersions = cms.untracked.bool(True), 
0052                 DcuPsuMapVersion = cms.untracked.vuint32(266,1)
0053                 ),
0054          PartTECM = cms.untracked.PSet(
0055                 PartitionName = cms.untracked.string("TM_09-JUN-2009_1"),
0056                 ForceCurrentState = cms.untracked.bool(False),
0057                 ForceVersions = cms.untracked.bool(True), 
0058                 DcuPsuMapVersion = cms.untracked.vuint32(267,1)
0059                 )
0060         )
0061 )
0062 # -----------------------------------------------------------------------------
0063 # These lines are needed to run an EDAnalyzer without events.  We need to
0064 #   specify an "EmptySource" so it doesn't try to load analysis data when it
0065 #   starts up.  The maxEvents is set to 1 here - this tells the program how
0066 #   many times to call the analyze() method in the EDAnalyzer.
0067 # -----------------------------------------------------------------------------
0068 process.maxEvents = cms.untracked.PSet(
0069     input = cms.untracked.int32(1)
0070 )
0071 process.source = cms.Source("EmptySource",
0072     numberEventsInRun = cms.untracked.uint32(1),
0073     firstRun = cms.untracked.uint32(1)
0074 )
0075 
0076 
0077 # -----------------------------------------------------------------------------
0078 # Database Setup
0079 # -----------------------------------------------------------------------------
0080 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0081 
0082 process.CondDBCommon.connect = cms.string('oracle://cms_omds_nolb/CMS_TRK_DCS_PVSS_COND')
0083 
0084 # -----------------------------------------------------------------------------
0085 # Define our SiStripDetVOffBuilder process.  
0086 #
0087 # Parameters:
0088 #   onlineDB            : the connection string for the database.  In  
0089 #                           o2o-template_cfg.py, we save it as 'oracle://cms_omds_nolb/CMS_TRK_DCS_PVSS_COND' - it's
0090 #                           converted to the correct value from the script
0091 #                           run_o2o.sh (so we don't save connection info here)
0092 #   authPath            : <unknown>
0093 #   Tmin                : start date & time to extract data
0094 #   Tmax                : end date & time to extract data
0095 #   TSetMin             : <unknown>
0096 #   queryType           : not needed any more - used to specify LASTVALUE or
0097 #                           STATUSCHANGE query.  We use STATUSCHANGE now.
0098 #   lastValueFile       : not needed
0099 #   lastValueFromFile   : 
0100 #   debugModeOn         : sets debug flag
0101 # -----------------------------------------------------------------------------
0102 
0103 process.SiStripDetVOffBuilder = cms.Service(
0104     "SiStripDetVOffBuilder",
0105     onlineDB = cms.string('oracle://cms_omds_nolb/CMS_TRK_DCS_PVSS_COND'),
0106     # authPath = cms.string('/exports/slc4/CMSSW/Development/Users/DeMattia/connection_files'),
0107     authPath = cms.string('/opt/cmssw/shifter/o2o_dcs/connection_files'),
0108     
0109     # Format for date/time vector:  year, month, day, hour, minute, second, nanosecond      
0110     #     Tmin = cms.untracked.vint32(2009, 11, 23,  4,  0, 0, 000),
0111     #     Tmax = cms.untracked.vint32(2009, 11, 23,  8,  0, 0, 000),
0112     
0113     Tmin = cms.vint32(2009, 12, 12,  00,  0, 0, 000),
0114     Tmax = cms.vint32(2009, 12, 12,  15,  0, 0, 000),
0115 
0116     # Do NOT change this unless you know what you are doing!
0117     TSetMin = cms.vint32(2007, 11, 26, 0, 0, 0, 0),                                             
0118     
0119     # queryType can be either STATUSCHANGE or LASTVALUE                                
0120     queryType = cms.string('STATUSCHANGE'),
0121     
0122     # if reading lastValue from file put insert file name here                              
0123     lastValueFile = cms.string(''),
0124     
0125     # flag to show if you are reading from file for lastValue or not                              
0126     lastValueFromFile = cms.bool(False),
0127     
0128     # flag to toggle debug output
0129     debugModeOn = cms.bool(False),
0130     
0131     # DetIdFile
0132     DetIdListFile = cms.string('CalibTracker/SiStripCommon/data/SiStripDetInfo.dat'),
0133     ExcludedDetIdListFile = cms.string('CalibTracker/SiStripCommon/data/ExcludedSiStripDetInfo.dat'),
0134 
0135     # Threshold to consider an HV channel on
0136     HighVoltageOnThreshold = cms.double(0.97)
0137 
0138     # Leave empty if you want to use the db
0139     PsuDetIdMapFile = cms.string("CalibTracker/SiStripDCS/data/PsuDetIdMap.dat")
0140 )
0141 
0142 # -----------------------------------------------------------------------------
0143 # Service to write our data to the sqlite db (or Oracle).  This service is 
0144 #   called from the endJob() method of the PopConAnalyzer class (which we have 
0145 #   as SiStripPopConDetVOff) - that's why you won't find a call to it in the
0146 #   DCS code.
0147 #
0148 # Parameters: (need to document..)
0149 #   messageLevel
0150 #   authenticationPath
0151 #   timetype
0152 #   connect
0153 #   toPut
0154 #     record
0155 #     tag
0156 #   logconnect
0157 # -----------------------------------------------------------------------------
0158 
0159 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0160     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0161     DBParameters = cms.PSet(
0162         messageLevel = cms.untracked.int32(0),
0163         authenticationPath = cms.untracked.string('/nfshome0/popcondev/conddb')
0164         # authenticationPath = cms.untracked.string('/exports/slc4/CMSSW/Development/Users/DeMattia/connection_files')
0165     ),
0166     timetype = cms.untracked.string('timestamp'),
0167     connect = cms.string('sqlite_file:dbfile.db'),
0168     toPut = cms.VPSet(cms.PSet(
0169         record = cms.string('SiStripDetVOffRcd'),
0170         tag = cms.string('SiStripDetVOff_Fake_31X')
0171     )),
0172     logconnect = cms.untracked.string('sqlite_file:logfile.db')
0173 )
0174 
0175 # -----------------------------------------------------------------------------
0176 # Define a process: Here, we use a descendent of an EDAnalyzer
0177 #   (a PopConAnalyzer)
0178 #
0179 # Parameters:
0180 #   record
0181 #   loggingOn
0182 #   SinceAppendMode
0183 #   Source
0184 #     name
0185 # -----------------------------------------------------------------------------
0186 
0187 process.siStripPopConDetVOff = cms.EDAnalyzer("SiStripPopConDetVOff",
0188     record = cms.string('SiStripDetVOffRcd'),
0189     loggingOn= cms.untracked.bool(True),
0190     SinceAppendMode=cms.bool(True),
0191     Source = cms.PSet(
0192         DeltaTmin = cms.uint32(15),
0193         MaxIOVlength = cms.uint32(120)
0194     )                                        
0195 )
0196 
0197 
0198 
0199 # -----------------------------------------------------------------------------
0200 # Specify the processes to be run.  Here, we only run one.
0201 # -----------------------------------------------------------------------------
0202 
0203 process.p = cms.Path(process.siStripPopConDetVOff)
0204