Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions plugins/dogma/dldprint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ int usage(const char *errstr = nullptr)
}

struct TuStat {
int cnt{0}; // number of stats
int64_t min_diff{0}; // minimal time diff
int64_t max_diff{0}; // maximal time diff
int cnt = 0; // number of stats
int64_t min_diff = 0; // minimal time diff
int64_t max_diff = 0; // maximal time diff
std::map<unsigned, int64_t> trigcnt; // count of found trigger

dogma::DogmaTu *tu{nullptr}; // current tu
};
Expand Down Expand Up @@ -221,15 +222,18 @@ void stat_evnt(dogma::DogmaEvent *evnt)

entry.cnt++;

unsigned tri_type = entry.tu->GetTrigType();

entry.trigcnt[tri_type]++;

if (!ref || (pairs.first == ref_addr))
continue;

int64_t diff = entry.tu->GetTrigTime();
diff -= ref->GetTrigTime();

if (entry.cnt == 1) {
entry.min_diff = diff;
entry.max_diff = diff;
entry.max_diff = entry.min_diff = diff;
} else {
if (entry.min_diff < diff)
entry.min_diff = diff;
Expand All @@ -242,7 +246,14 @@ void stat_evnt(dogma::DogmaEvent *evnt)
void print_stat()
{
for (auto &pairs : tu_stats) {
printf(" addr:%04x cnt:%d min_diff:%ld max_diff:%ld\n", (unsigned) pairs.first, pairs.second.cnt, (long) pairs.second.min_diff, (long) pairs.second.max_diff);
printf(" addr:%04x cnt:%d", (unsigned) pairs.first, pairs.second.cnt);
for (auto &p : pairs.second.trigcnt)
printf(" trig%X:%ld", p.first, (long) p.second);
if (pairs.second.min_diff != 0)
printf(" min_trig_time_diff:%ld", (long) pairs.second.min_diff);
if (pairs.second.max_diff != 0)
printf(" max_trig_time_diff:%ld", (long) pairs.second.max_diff);
printf("\n");
}
}

Expand Down
187,598 changes: 187,543 additions & 55 deletions plugins/http/js/build/jsroot.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions plugins/http/scripts/dabc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1087,17 +1087,18 @@ function afterItemRequest(h, item, obj, option) {
Object.assign(obj, { fName: item._name, fTitle: _title,
fX: x, fY: y, fNpoints: x.length,
fLineColor: 2, fLineWidth: 2 });
const kNotEditable = JSROOT.BIT(18); // bit set if graph is non editable
const kNotEditable = JSROOT.BIT(18), // bit set if graph is non editable
kNoStats = JSROOT.BIT(9); // bit for histogram to disable stats display
obj.InvertBit(kNotEditable);

let xrange = x[x.length-1] - x[0];
obj.fHistogram.fBits |= kNoStats; // no stats box
obj.fHistogram.fTitle = obj.fTitle;
obj.fHistogram.fXaxis.fXmin = x[0] - xrange*0.03;
obj.fHistogram.fXaxis.fXmax = x[x.length-1] + xrange*0.03;

let ymin = Math.min.apply(null,y), ymax = Math.max.apply(null,y);

if (!ymin) ymin = 0; if (!ymax) ymax = 0;
const ymin = Math.min.apply(null,y) || 0,
ymax = Math.max.apply(null,y) || 0;

obj.fHistogram.fYaxis.fXmin = ymin - 0.05 * (ymax-ymin);
obj.fHistogram.fYaxis.fXmax = ymax + 0.05 * (ymax-ymin);
Expand Down