Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-10 01:02:42

0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include "FWCore/PluginManager/interface/PluginManager.h"
0006 #include "FWCore/PluginManager/interface/standard.h"
0007 #include "FWCore/PluginManager/interface/SharedLibrary.h"
0008 #include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
0009 #include "CondFormats/PPSObjects/interface/PPSTimingCalibration.h"
0010 #include "CondCore/CTPPSPlugins/interface/PPSTimingCalibrationPayloadInspectorHelper.h"
0011 
0012 int main(int argc, char** argv) {
0013   Py_Initialize();
0014 
0015   edmplugin::PluginManager::Config config;
0016   edmplugin::PluginManager::configure(edmplugin::standard::config());
0017 
0018   std::vector<edm::ParameterSet> psets;
0019   edm::ParameterSet pSet;
0020   pSet.addParameter("@service_type", std::string("SiteLocalConfigService"));
0021   psets.push_back(pSet);
0022   edm::ServiceToken servToken(edm::ServiceRegistry::createSet(psets));
0023   edm::ServiceRegistry::Operate operate(servToken);
0024 
0025   std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS");
0026 
0027   std::string tag = "CTPPPSTimingCalibration_HPTDC_byPCL_v0_prompt";
0028   cond::Time_t start = static_cast<unsigned long long>(355892);
0029   cond::Time_t end = static_cast<unsigned long long>(357079);
0030 
0031   edm::LogPrint("testPPSCalibrationPI") << "## Exercising TimingCalibration plots ";
0032 
0033   ParametersPerChannel<PPSTimingCalibrationPI::db0,
0034                        PPSTimingCalibrationPI::plane0,
0035                        PPSTimingCalibrationPI::parameter0,
0036                        PPSTimingCalibration>
0037       test;
0038   test.process(connectionString, PI::mk_input(tag, start, end));
0039   edm::LogPrint("testparametersPerChannel") << test.data();
0040   Py_Finalize();
0041 }