Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-04 03:24:30

0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "CondCore/PhysicsToolsPlugins/plugins/DropBoxMetadata_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 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 
0011 int main(int argc, char** argv) {
0012   Py_Initialize();
0013   edmplugin::PluginManager::Config config;
0014   edmplugin::PluginManager::configure(edmplugin::standard::config());
0015 
0016   std::vector<edm::ParameterSet> psets;
0017   edm::ParameterSet pSet;
0018   pSet.addParameter("@service_type", std::string("SiteLocalConfigService"));
0019   psets.push_back(pSet);
0020   edm::ServiceToken servToken(edm::ServiceRegistry::createSet(psets));
0021   edm::ServiceRegistry::Operate operate(servToken);
0022 
0023   std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS");
0024 
0025   std::string tag = "DropBoxMetadata_v5.1_express";
0026   cond::Time_t start = static_cast<unsigned long long>(1);
0027   cond::Time_t end = static_cast<unsigned long long>(346361);
0028 
0029   edm::LogPrint("test_DropBoxMetadata_PayloadInspector") << "## test Display" << std::endl;
0030 
0031   DropBoxMetadata_Display histo1;
0032   histo1.process(connectionString, PI::mk_input(tag, start, start));
0033   edm::LogPrint("test_DropBoxMetadata_PayloadInspector") << histo1.data() << std::endl;
0034 
0035   edm::LogPrint("test_DropBoxMetadata_PayloadInspector") << "## test Compare" << std::endl;
0036 
0037   DropBoxMetadata_Compare histo2;
0038   histo2.process(connectionString, PI::mk_input(tag, start, end));
0039   edm::LogPrint("test_DropBoxMetadata_PayloadInspector") << histo2.data() << std::endl;
0040 
0041   Py_Finalize();
0042 }