Go to the source code of this file.
◆ dumpLutDiff()
void dumpLutDiff |
( |
LutXml & |
xmls1, |
|
|
LutXml & |
xmls2, |
|
|
bool |
testFormat = true , |
|
|
int |
detail = 0 |
|
) |
| |
Definition at line 22 of file hcalLUT.cc.
24 const char *DET[ndet] = {
"HB",
"HE",
"HO",
"HF",
"HT"};
25 const int dtype[ndet] = {0, 1, 2, 3, 4};
30 std::array<int, nvar>
n[ndet];
38 for (
auto &
x1 : xmls1) {
40 auto x2 = xmls2.
find(
id.rawId());
41 auto subdet =
id.genericSubdet();
42 if (subdet == 0
or subdet == 6)
45 auto &
m =
n[subdet - 1];
48 if (
x2 == xmls2.
end()) {
51 cout <<
"Extra detId: " <<
id << endl;
56 const auto &lut1 =
x1.second;
57 size_t size = lut1.size();
60 for (
auto &
i : lut1) {
68 if (
detail == 1 and testFormat) {
69 cout <<
"Zero LUT: " <<
id << endl;
76 const auto &lut2 =
x2->second;
79 if (lut1[
i] != lut2[
i]) {
82 cout << Form(
"Mismatach in index=%3d, %4d!=%4d, ",
int(
i), lut1[
i], lut2[
i]) <<
id << endl;
91 cout << Form(
"%3s: %8s %8s %8s",
"Det",
"total",
"zeroes",
"extra") << endl;
93 cout << Form(
"%3s: %8d %8d %8d", DET[
i],
n[
i][
total],
n[
i][zeros],
n[
i][extra]) << endl;
94 cout <<
"--------------------------------------------" << endl;
102 cout << Form(
"%3s: %8s %8s %8s",
"Det",
"total",
"match",
"mismatch") << endl;
105 cout <<
"--------------------------------------------" << endl;
106 cout << (
good ?
"PASS!" :
"FAIL!") << endl;
References gather_cfg::cout, ztail::d, runTauDisplay::dtype, LutXml::end(), LutXml::find(), good, mps_fire::i, triggerObjects_cff::id, visualization-live-secondInstance_cfg::m, match(), dqmiodumpmetadata::n, or, findQualityFiles::size, dqmMemoryStats::total, findQualityFiles::v, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, and SiPixelPI::zero.
Referenced by main().
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 110 of file hcalLUT.cc.
114 std::cerr <<
"runTest: missing input command" << std::endl;
115 }
else if (strcmp(
argv[1],
"merge") == 0) {
119 }
else if (strcmp(
argv[1],
"diff") == 0) {
126 xmls1.create_lut_map();
127 xmls2.create_lut_map();
135 cout <<
"Comparison" << endl;
137 }
else if (strcmp(
argv[1],
"create-lut-loader") == 0) {
145 manager.
create_lut_loader(_file_list, _prefix, _tag, _comment, _tag, _subversion);
147 throw std::invalid_argument(Form(
"Unknown command: %s",
argv[1]));
References dir2webdir::argc, cmsBatch::argv, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, HcalLutManager::create_lut_loader(), LutXml::create_lut_map(), dumpLutDiff(), submitPVResolutionJobs::files, contentValuesFiles::fullPath, mergeLUTs(), writedatasetfile::parser, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ mergeLUTs()
void mergeLUTs |
( |
const char * |
flist, |
|
|
const char * |
out |
|
) |
| |
int create_lut_loader(std::string file_list, std::string _prefix, std::string tag_name, std::string comment="default comment", std::string version="V00-01-01", int subversion=1)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or