File indexing completed on 2024-04-06 12:01:23
0001 #include <iostream>
0002 #include <sstream>
0003 #include "CondCore/Utilities/interface/PayloadInspector.h"
0004 #include "CondCore/AlignmentPlugins/plugins/TrackerAlignment_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 = "TrackerAlignment_v21_offline";
0025 cond::Time_t start = static_cast<unsigned long long>(294034);
0026 cond::Time_t end = static_cast<unsigned long long>(305898);
0027
0028 edm::LogPrint("testTrackerAlignmentPayloadInspector") << "## Alignment Histos";
0029
0030 TrackerAlignmentCompareX histo1;
0031 histo1.process(connectionString, PI::mk_input(tag, start, end));
0032 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo1.data();
0033
0034 TrackerAlignmentSummaryBPix histo2;
0035 histo2.process(connectionString, PI::mk_input(tag, start, end));
0036 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo2.data();
0037
0038 X_BPixBarycenterHistory histo3;
0039 histo3.process(connectionString, PI::mk_input(tag, start, end));
0040 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo3.data();
0041
0042 edm::LogPrint("testTrackerAlignmentPayloadInspector") << "## Testing Two Tag Histos";
0043
0044 TrackerAlignmentBarycentersCompareTwoTags histo4;
0045 histo4.process(
0046 connectionString,
0047 PI::mk_input("TrackerAlignment_2017_ultralegacymc_v2", 1, 1, "TrackerAlignment_Upgrade2017_realistic_v2", 1, 1));
0048 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo4.data();
0049
0050 TrackerAlignmentCompareXTwoTags histo5;
0051 histo5.process(
0052 connectionString,
0053 PI::mk_input("TrackerAlignment_2017_ultralegacymc_v2", 1, 1, "TrackerAlignment_Upgrade2017_realistic_v2", 1, 1));
0054 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo5.data();
0055
0056 edm::LogPrint("testTrackerAlignmentPayloadInspector") << "## Testing Barycenter Histos";
0057
0058 TrackerAlignmentBarycentersCompare histo6;
0059 histo6.process(connectionString, PI::mk_input(tag, start, end));
0060 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo6.data();
0061
0062 PixelBarycentersCompare histo7;
0063 histo7.process(connectionString, PI::mk_input(tag, start, end));
0064 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo7.data();
0065
0066 edm::LogPrint("testTrackerAlignmentPayloadInspector") << "## Testing Comparator Histos";
0067
0068 PixelAlignmentComparatorTwoTags histo8;
0069 histo8.process(
0070 connectionString,
0071 PI::mk_input("TrackerAlignment_2017_ultralegacymc_v2", 1, 1, "TrackerAlignment_Upgrade2017_realistic_v2", 1, 1));
0072 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo8.data();
0073
0074 PixelAlignmentCompareMapX histo9;
0075 histo9.process(connectionString, PI::mk_input(tag, start, end));
0076 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo9.data();
0077
0078 PixelAlignmentCompareMapXTwoTags histo10;
0079 histo10.process(
0080 connectionString,
0081 PI::mk_input("TrackerAlignment_2017_ultralegacymc_v2", 1, 1, "TrackerAlignment_Upgrade2017_realistic_v2", 1, 1));
0082 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo10.data();
0083
0084 TrackerAlignmentCompareRPhiZTwoTags histo11;
0085 histo11.process(
0086 connectionString,
0087 PI::mk_input("TrackerAlignment_2017_ultralegacymc_v2", 1, 1, "TrackerAlignment_Upgrade2017_realistic_v2", 1, 1));
0088 edm::LogPrint("testTrackerAlignmentPayloadInspector") << histo11.data();
0089
0090 Py_Finalize();
0091 }