Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:12:04

0001 
0002 // Copyright 2020, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 
0006 #ifndef JANA2_JTESTEVENTCONTEXTS_H
0007 #define JANA2_JTESTEVENTCONTEXTS_H
0008 
0009 #include <JANA/JObject.h>
0010 #include <memory>
0011 
0012 struct JTestEntangledEventData : public JObject {
0013     std::shared_ptr<std::vector<char>> buffer;
0014 
0015     JOBJECT_PUBLIC(JTestEntangledEventData)
0016 };
0017 
0018 struct JTestEventData : public JObject {
0019     std::vector<char> buffer;
0020 
0021     JOBJECT_PUBLIC(JTestEventData)
0022 
0023     void Summarize(JObjectSummary& summary) const override {
0024         summary.add(buffer.size(), "buffer_size", "%d");
0025     }
0026 };
0027 
0028 struct JTestTrackData : public JObject {
0029     std::vector<char> buffer;
0030 
0031     JOBJECT_PUBLIC(JTestTrackData)
0032 
0033     void Summarize(JObjectSummary& summary) const override {
0034         size_t nitems = std::min(buffer.size(), (size_t) 5);
0035         for (size_t i=0; i<nitems; ++i) {
0036             char varname[20];
0037             snprintf(varname, 20, "x_%ld", i);
0038             summary.add(buffer[i], varname, "%d");
0039         }
0040     }
0041 };
0042 
0043 struct JTestHistogramData : public JObject {
0044     std::vector<char> buffer;
0045     JOBJECT_PUBLIC(JTestHistogramData)
0046 };
0047 
0048 #endif //JANA2_JTESTEVENTCONTEXTS_H