Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-07 22:41:36

0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "CondCore/RunInfoPlugins/plugins/RunInfo_PayloadInspector.cc"
0005 
0006 #include "FWCore/PluginManager/interface/PluginManager.h"
0007 #include "FWCore/PluginManager/interface/standard.h"
0008 #include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
0009 
0010 int main(int argc, char** argv) {
0011   Py_Initialize();
0012   edmplugin::PluginManager::Config config;
0013   edmplugin::PluginManager::configure(edmplugin::standard::config());
0014 
0015   std::vector<edm::ParameterSet> psets;
0016   edm::ParameterSet pSet;
0017   pSet.addParameter("@service_type", std::string("SiteLocalConfigService"));
0018   psets.push_back(pSet);
0019   edm::ServiceToken servToken(edm::ServiceRegistry::createSet(psets));
0020   edm::ServiceRegistry::Operate operate(servToken);
0021 
0022   std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS");
0023 
0024   std::string tag = "runinfo_31X_hlt";
0025   cond::Time_t start = static_cast<unsigned long long>(311950);
0026   cond::Time_t end = static_cast<unsigned long long>(312237);
0027 
0028   std::cout << "## RunInfo testing" << std::endl;
0029 
0030   RunInfoTest histo0;
0031   histo0.process(connectionString, PI::mk_input(tag, end, end));
0032   std::cout << histo0.data() << std::endl;
0033 
0034   RunInfoParameters histo1;
0035   histo1.process(connectionString, PI::mk_input(tag, end, end));
0036   std::cout << histo1.data() << std::endl;
0037 
0038   RunInfoBFieldHistory histo2;
0039   histo2.process(connectionString, PI::mk_input(tag, start, end));
0040   std::cout << histo2.data() << std::endl;
0041   Py_Finalize();
0042 }