13 stringstream
ss(flist);
24 const char *
DET[ndet] = {
"HB",
"HE",
"HO",
"HF",
"HT"};
25 const int dtype[ndet] = {0, 1, 2, 3, 4};
28 enum vtype {
total, extra, zeros, match };
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;
94 cout <<
"--------------------------------------------" << endl;
102 cout << Form(
"%3s: %8s %8s %8s",
"Det",
"total",
"match",
"mismatch") << endl;
105 cout <<
"--------------------------------------------" << endl;
106 cout << (
good ?
"PASS!" :
"FAIL!") << endl;
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) {
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]));
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
auto const good
min quality of good
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)