File indexing completed on 2024-08-21 04:46:12
0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "CondCore/L1TPlugins/plugins/L1TUtmTriggerMenu_PayloadInspector.cc"
0005 #include "CondCore/L1TPlugins/plugins/L1TMuonGlobalParams_PayloadInspector.cc"
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 #include "FWCore/PluginManager/interface/PluginManager.h"
0008 #include "FWCore/PluginManager/interface/standard.h"
0009 #include "FWCore/PluginManager/interface/SharedLibrary.h"
0010 #include "FWCore/ServiceRegistry/interface/ServiceRegistry.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
0028 std::string tag = "L1Menu_CollisionsHeavyIons2023_v1_1_5_xml";
0029 cond::Time_t start = static_cast<unsigned long long>(1);
0030 cond::Time_t end = static_cast<unsigned long long>(1);
0031
0032 edm::LogPrint("testL1TObjectsPayloadInspector") << "## Exercising L1UtmTriggerMenu tests" << std::endl;
0033
0034 L1TUtmTriggerMenuDisplayAlgos test1;
0035 test1.process(connectionString, PI::mk_input(tag, start, end));
0036 edm::LogPrint("testL1TObjectsPayloadInspector") << test1.data() << std::endl;
0037
0038 tag = "L1TUtmTriggerMenu_Stage2v0_hlt";
0039 start = static_cast<unsigned long long>(375649);
0040 end = static_cast<unsigned long long>(375650);
0041
0042 L1TUtmTriggerMenu_CompareAlgos test2;
0043 test2.process(connectionString, PI::mk_input(tag, start, end));
0044 edm::LogPrint("testL1TObjectsPayloadInspector") << test2.data() << std::endl;
0045
0046 L1TUtmTriggerMenu_CompareConditions test3;
0047 test3.process(connectionString, PI::mk_input(tag, start, end));
0048 edm::LogPrint("testL1TObjectsPayloadInspector") << test3.data() << std::endl;
0049
0050 tag = "L1Menu_CollisionsHeavyIons2023_v1_1_4_xml";
0051 std::string tag2 = "L1Menu_CollisionsHeavyIons2023_v1_1_5_xml";
0052 start = static_cast<unsigned long long>(1);
0053 end = static_cast<unsigned long long>(1);
0054
0055 L1TUtmTriggerMenu_CompareAlgosTwoTags test4;
0056 test4.process(connectionString, PI::mk_input(tag, start, end, tag2, start, end));
0057 edm::LogPrint("testL1TObjectsPayloadInspector") << test4.data() << std::endl;
0058
0059 L1TUtmTriggerMenu_CompareConditionsTwoTags test5;
0060 test5.process(connectionString, PI::mk_input(tag, start, end, tag2, start, end));
0061 edm::LogPrint("testL1TObjectsPayloadInspector") << test5.data() << std::endl;
0062
0063 edm::LogPrint("testL1TObjectsPayloadInspector") << "## Exercising L1TMuonGlobalParams_ tests" << std::endl;
0064
0065 L1TMuonGlobalParamsInputBits test6;
0066 tag = "L1TMuonGlobalParams_Stage2v0_2024_mc_v1";
0067 test6.process(connectionString, PI::mk_input(tag, start, end));
0068 edm::LogPrint("testL1TObjectsPayloadInspector") << test6.data() << std::endl;
0069
0070 Py_Finalize();
0071 }