13 stringstream
ss(flist);
24 const char *
DET[ndet] = {
"HB",
"HE",
"HO",
"HF",
"HT"};
25 const int dtype[ndet] = {0, 1, 2, 3, 4};
26 const int HBandHE_fgBits = 0xFC00;
29 enum vtype {
total, extra, zeros, match, fgMatch };
31 std::array<int, nvar>
n[ndet];
39 for (
auto &x1 : xmls1) {
41 auto x2 = xmls2.
find(
id.rawId());
42 auto subdet =
id.genericSubdet();
43 if (subdet == 0
or subdet == 6)
46 auto &
m =
n[subdet - 1];
49 if (x2 == xmls2.
end()) {
52 cout <<
"Extra detId: " <<
id << endl;
57 const auto &lut1 = x1.second;
58 size_t size = lut1.size();
61 for (
auto &
i : lut1) {
69 if (
detail == 1 and testFormat) {
70 cout <<
"Zero LUT: " <<
id << endl;
77 const auto &lut2 = x2->second;
79 bool fgGood =
size == lut2.size();
81 if (lut1[
i] != lut2[
i]) {
84 if (subdet == 1 || subdet == 2) {
85 if ((lut1[
i] & HBandHE_fgBits) != (lut2[
i] & HBandHE_fgBits))
89 cout << Form(
"Mismatach in index=%3d, %4d!=%4d, ",
int(
i), lut1[
i], lut2[
i]) <<
id << endl;
100 cout << Form(
"%3s: %8s %8s %8s",
"Det",
"total",
"zeroes",
"extra") << endl;
103 cout <<
"--------------------------------------------" << endl;
111 cout << Form(
"%3s: %8s %8s %8s %8s %8s",
"Det",
"total",
"match",
"mismatch",
"FG match",
"FG mismatch")
114 cout << Form(
"%3s: %8d %8d %8d %8d %8d",
122 cout <<
"--------------------------------------------" << endl;
123 cout << (
good ?
"PASS!" :
"FAIL!") << endl;
131 std::cerr <<
"runTest: missing input command" << std::endl;
132 }
else if (strcmp(
argv[1],
"merge") == 0) {
136 }
else if (strcmp(
argv[1],
"diff") == 0) {
152 cout <<
"Comparison" << endl;
154 }
else if (strcmp(
argv[1],
"create-lut-loader") == 0) {
162 manager.
create_lut_loader(_file_list, _prefix, _tag, _comment, _tag, _subversion);
164 throw std::invalid_argument(Form(
"Unknown command: %s",
argv[1]));
auto const good
min quality of good
int write(std::string target="stdout")
int main(int argc, char **argv)
Various manipulations with trigger Lookup Tables.
const_iterator find(uint32_t) const
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
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)
const_iterator end() const
void dumpLutDiff(LutXml &xmls1, LutXml &xmls2, bool testFormat=true, int detail=0)
void mergeLUTs(const char *flist, const char *out)