Definition at line 436 of file o2olib.py.
References cond::persistency::ITagTable.create(), cond::persistency::GLOBAL_TAG::Table.create(), cond::CoralServiceFactory.create(), cond::persistency::TAG::Table.create(), converter::helper::ConcreteCreator.create(), cond::persistency::IPayloadTable.create(), converter::helper::PolymorphicCreator.create(), cond::persistency::IIOVTable.create(), cond::persistency::RUN_INFO::Table.create(), cond::persistency::GLOBAL_TAG_MAP::Table.create(), cond::persistency::PAYLOAD::Table.create(), cond::persistency::ITagMigrationTable.create(), cond::persistency::GTSchema.create(), cond::persistency::RunInfoSchema.create(), cond::persistency::IPayloadMigrationTable.create(), cond::persistency::ITagLogTable.create(), cond::persistency::IIOVSchema.create(), mps_create_file_lists.FileListCreator.create(), cond::persistency::IGTTable.create(), cond::persistency::IGTMapTable.create(), cond::persistency::IOV::Table.create(), cond::persistency::IGTSchema.create(), cond::persistency::IRunInfoTable.create(), cond::persistency::TAG_LOG::Table.create(), cond::persistency::IRunInfoSchema.create(), cond::persistency::IOVSchema.create(), o2olib.O2OTool.create(), o2olib.O2OTool.disable(), o2olib.O2OTool.dumpConf(), core.PileUpAnalyzer.PileUpAnalyzer.enable, o2olib.O2OTool.enable(), o2olib.O2OTool.listConf(), o2olib.O2OJobMgr.listJobs(), o2olib.O2OTool.listJobs(), o2olib.O2OTool.migrate(), splitter.FileObj.run, uploader.FileObj.run, uploadPayloads.FileObj.run, RPCRunIOV::RunIOV_Item.run, beamspot::BeamSpotContainer.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, MultiEventFilter::Event.run, DTCalibrationWorker.DTCalibrationWorker.run(), cond::Utilities.run(), L1Analysis::L1AnalysisEventDataFormat.run, PFEGammaToCandidateRemapper.run(), TrackInfoProducerAlgorithm.run(), generateEDF.LumiInfo.run, lumi::Lumi2DB::LumiSource.run, MuonMillepedeAlgorithm.run(), SurveyAlignmentAlgorithm.run(), Type1PFMET.run(), SeedGeneratorForLaserBeams.run(), EfficiencyPlotter.run, WZInterestingEventSelector::event.run, crabWrapper.CrabWrapper.run(), LaserHitPairGenerator.run(), MuonDTLocalMillepedeAlgorithm.run(), HIPAlignmentAlgorithm.run(), DTWorkflow.DTWorkflow.run(), MuonRecoTest.run, options.ConnectionHLTMenu.run, DTResolutionAnalysisTest.run, BeamSpotRcdReader::theBSfromDB.run, CSCOverlapsAlignmentAlgorithm.run(), MatacqProducer::MatacqEventId.run, DTBlockedROChannelsTest.run, DTDataIntegrityTest.run, DTChamberEfficiencyTest.run, ApeSettingAlgorithm.run(), DTResolutionTest.run, ME::Header.run, ConstantStepOdeSolver.run(), DTEfficiencyTest.run, MillePedeAlignmentAlgorithm.run(), MuonAlignmentFromReference.run(), personalPlayback.Playback.run, DQMNet::CoreObject.run, MatrixUtil.InputInfo.run, DTLocalTriggerBaseTest.run, HitEff.run, EcalDeadCellDeltaRFilter.run, QIE8Simulator.run(), AlignmentAlgorithmBase.run(), cond::RunInfo_t.run, SiPixelErrorEstimation.run, personalPlayback.FrameworkJob.run, SiPixelTrackingRecHitsValid.run, o2olib.O2OTool.run(), dqm_interfaces.DirWalkerFile.run, JsonOutputProducer::JsonEvent.run, SummaryOutputProducer.run, SummaryOutputProducer::Event.run, o2olib.O2OJobMgr.setConfig(), o2olib.O2OTool.setConfig(), o2olib.O2OJobMgr.setInterval(), o2olib.O2OTool.setInterval(), HBHERecalibration.setup(), event.Event.setup, EcalGeomPhiSymHelper.setup(), HcalTPGScale.setup(), EcalTPGScale.setup(), CaloTPGTranscoderULUT.setup(), HcalPedestalAnalysis.setup(), CastorPedestalAnalysis.setup(), CandCombinerBase< OutputCollection, CandPtr >.setup(), mps_alisetup.SetupAlignment.setup(), querying.connection.setup(), NamedCandCombinerBase.setup(), NamedCandCombiner< Selector, PairSelector, Cloner, Setup >.setup(), looper.Looper.setup, CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup >.setup(), options.HLTProcessOptions.setup, o2olib.O2OTool.setup(), and HcalObjRepresent::ADataRepr.setup().
437 parser = argparse.ArgumentParser(description=
'CMS o2o command-line tool. For general help (manual page), use the help subcommand.')
438 parser.add_argument(
'--db', type=str, help=
'The target database: pro ( for prod ) or dev ( for prep ). default=pro')
439 parser.add_argument(
"--auth",
"-a", type=str, help=
"The path of the authentication file")
440 parser.add_argument(
'--verbose',
'-v', action=
'count', help=
'The verbosity level')
441 parser_subparsers = parser.add_subparsers(title=
'Available subcommands')
442 parser_create = parser_subparsers.add_parser(
'create', description=
'Create a new O2O job')
443 parser_create.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
444 parser_create.add_argument(
'--configFile',
'-c', type=str, help=
'the JSON configuration file path',required=
True)
445 parser_create.add_argument(
'--interval',
'-i', type=int, help=
'the chron job interval',default=0)
446 parser_create.set_defaults(func=self.
create)
447 parser_setConfig = parser_subparsers.add_parser(
'setConfig', description=
'Set a new configuration for the specified job. The configuration is expected as a list of entries "param": "value" (dictionary). The "param" labels will be used to inject the values in the command to execute. The dictionary is stored in JSON format.')
448 parser_setConfig.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
449 parser_setConfig.add_argument(
'--configFile',
'-c', type=str, help=
'the JSON configuration file path',required=
True)
450 parser_setConfig.set_defaults(func=self.
setConfig)
451 parser_setInterval = parser_subparsers.add_parser(
'setInterval',description=
'Set a new execution interval for the specified job')
452 parser_setInterval.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
453 parser_setInterval.add_argument(
'--interval',
'-i', type=int, help=
'the chron job interval',required=
True)
454 parser_setInterval.set_defaults(func=self.
setInterval)
455 parser_enable = parser_subparsers.add_parser(
'enable',description=
'enable the O2O job')
456 parser_enable.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
457 parser_enable.set_defaults(func=self.
enable)
458 parser_disable = parser_subparsers.add_parser(
'disable',description=
'disable the O2O job')
459 parser_disable.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
460 parser_disable.set_defaults(func=self.
disable)
461 parser_migrateConf = parser_subparsers.add_parser(
'migrateConfig',description=
'migrate the tag info for the jobs in configuration entries')
462 parser_migrateConf.set_defaults(func=self.
migrate)
463 parser_listJobs = parser_subparsers.add_parser(
'listJobs', description=
'list the registered jobs')
464 parser_listJobs.set_defaults(func=self.
listJobs)
465 parser_listConf = parser_subparsers.add_parser(
'listConfig', description=
'shows the configurations for the specified job')
466 parser_listConf.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
467 parser_listConf.add_argument(
'--dump', type=int, help=
'Dump the specified config.',default=0)
468 parser_listConf.set_defaults(func=self.
listConf)
469 parser_dumpConf = parser_subparsers.add_parser(
'dumpConfig', description=
'dumps a specific job configuration version')
470 parser_dumpConf.add_argument(
'versionIndex', type=str,help=
'the version to dump')
471 parser_dumpConf.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
472 parser_dumpConf.add_argument(
'--configFile',
'-c', type=str, help=
'the JSON configuration file name - default:[jobname]_[version].json')
473 parser_dumpConf.set_defaults(func=self.
dumpConf)
474 parser_run = parser_subparsers.add_parser(
'run', description=
'Wrapper for O2O jobs execution. Supports input parameter injection from the configuration file associated to the job. The formatting syntax supported are the python ones: "command -paramName {paramLabel}" or "command -paramName %(paramLabel)s". where [paramName] is the name of the parameter required for the command, and [paramLabel] is the key of the parameter entry in the config dictionary (recommended to be equal for clarity!"')
475 parser_run.add_argument(
'executable', type=str,help=
'command to execute')
476 parser_run.add_argument(
'--name',
'-n', type=str, help=
'The o2o job name',required=
True)
477 parser_run.set_defaults(func=self.
run)
479 args = parser.parse_args()
487 sys.exit( args.func())
488 except Exception
as e: