Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:42

0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "CondCore/PCLConfigPlugins/plugins/AlignPCLThresholds_PayloadInspector.cc"
0005 #include "CondCore/PCLConfigPlugins/plugins/AlignPCLThresholdsHG_PayloadInspector.cc"
0006 
0007 #include "FWCore/PluginManager/interface/PluginManager.h"
0008 #include "FWCore/PluginManager/interface/standard.h"
0009 #include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
0010 
0011 int main(int argc, char** argv) {
0012   Py_Initialize();
0013 
0014   edmplugin::PluginManager::Config config;
0015   edmplugin::PluginManager::configure(edmplugin::standard::config());
0016 
0017   std::vector<edm::ParameterSet> psets;
0018   edm::ParameterSet pSet;
0019   pSet.addParameter("@service_type", std::string("SiteLocalConfigService"));
0020   psets.push_back(pSet);
0021   edm::ServiceToken servToken(edm::ServiceRegistry::createSet(psets));
0022   edm::ServiceRegistry::Operate operate(servToken);
0023 
0024   std::string connectionString("frontier://FrontierProd/CMS_CONDITIONS");
0025 
0026   // AlignPCLThresholds
0027   std::string tag = "SiPixelAliThresholds_offline_v0";
0028   cond::Time_t start = static_cast<unsigned long long>(1);
0029   cond::Time_t end = static_cast<unsigned long long>(359659);
0030 
0031   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << "## Exercising AlignPCLThresholds plots " << std::endl;
0032 
0033   AlignPCLThresholds_Display histo1;
0034   histo1.process(connectionString, PI::mk_input(tag, start, start));
0035   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << histo1.data() << std::endl;
0036 
0037   std::string tag2 = "SiPixelAliThresholds_express_v0";
0038 
0039   AlignPCLThresholds_CompareTwoTags histo2;
0040   histo2.process(connectionString, PI::mk_input(tag, start, start, tag2, start, start));
0041   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << histo2.data() << std::endl;
0042 
0043   // AlignPCLThresholdsHG
0044   tag = "SiPixelAliThresholdsHG_express_v0";
0045   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << "## Exercising AlignPCLThresholdsHG plots " << std::endl;
0046 
0047   AlignPCLThresholdsHG_Display histo3;
0048   histo3.process(connectionString, PI::mk_input(tag, start, start));
0049   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << histo3.data() << std::endl;
0050 
0051   AlignPCLThresholdsHG_Compare histo4;
0052   histo4.process(connectionString, PI::mk_input(tag, start, end));
0053   edm::LogPrint("testAlignPCLThresholdsPayloadInspector") << histo4.data() << std::endl;
0054 
0055   Py_Finalize();
0056 }