File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
DataFormats/L1TParticleFlow/interface Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 55#include " DataFormats/L1TParticleFlow/interface/gt_datatypes.h"
66#include " DataFormats/L1TParticleFlow/interface/bit_encoding.h"
77#include < array>
8+ #include < algorithm>
89#include < cstdint>
910#include < vector>
1011#include < unordered_map>
@@ -33,6 +34,15 @@ namespace l1ct {
3334 JetTagClassValue value_;
3435 static const std::unordered_map<std::string, JetTagClassValue> labels_;
3536
37+ friend std::ostream &operator <<(std::ostream &ost, const l1ct::JetTagClass &jtc) {
38+ auto it = std::find_if (
39+ std::begin (jtc.labels_ ), std::end (jtc.labels_ ), [&jtc](auto &&p) { return p.second == jtc.value_ ; });
40+ if (it != std::end (jtc.labels_ )) {
41+ ost << it->first ;
42+ }
43+ return ost;
44+ }
45+
3646 }; // JetTagClass
3747
3848 // Define a separate class/struct for jet tag handling
You can’t perform that action at this time.
0 commit comments