From 079974ee30d2f9022e2583937dda5742d026c592 Mon Sep 17 00:00:00 2001 From: Derek Glazier Date: Fri, 19 Jul 2024 17:01:58 +0100 Subject: [PATCH] actually fix rich bug this time, need to set _detector_id_order to 0 so notify and scanindex can be called --- Clas12Banks/particle_detector.h | 2 +- Clas12Banks/rich.cpp | 11 +++++++---- Clas12Banks/rich.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Clas12Banks/particle_detector.h b/Clas12Banks/particle_detector.h index 155c540..0b29255 100644 --- a/Clas12Banks/particle_detector.h +++ b/Clas12Banks/particle_detector.h @@ -70,8 +70,8 @@ namespace clas12 { //////////////////////////////////////////////////////////////// //override header notify, called at start of event void notify() override { - bank::notify(); if(_detector_id_order==-1) return; + bank::notify(); scanIndex(); } diff --git a/Clas12Banks/rich.cpp b/Clas12Banks/rich.cpp index b62ae4f..ccc7c24 100644 --- a/Clas12Banks/rich.cpp +++ b/Clas12Banks/rich.cpp @@ -14,7 +14,9 @@ namespace clas12 { clas12::particle_detector(aschema), _ring{new richring(ringschema)} { - + // std::cout<<"DEBUG "<<"rich::rich()"<< std::endl; + //aschema.show(); + _detector_id_order=0; //dont have a detector bank, but getDetector is fixed _id_order = aschema.getEntryOrder("id"); _hindex_order = aschema.getEntryOrder("hindex"); _pindex_order = aschema.getEntryOrder("pindex"); @@ -40,10 +42,11 @@ namespace clas12 { } rich::rich(hipo::schema aschema): clas12::particle_detector(aschema) { - + + _detector_id_order=0; //dont have a detector bank, but getDetector is fixed _id_order = aschema.getEntryOrder("id"); - _hindex_order = aschema.getEntryOrder("hindex"); - _pindex_order = aschema.getEntryOrder("pindex"); + _hindex_order = aschema.getEntryOrder("hindex"); + _pindex_order = aschema.getEntryOrder("pindex"); _emilay_order = aschema.getEntryOrder("emilay"); _emico_order = aschema.getEntryOrder("emico"); _enico_order = aschema.getEntryOrder("enico"); diff --git a/Clas12Banks/rich.h b/Clas12Banks/rich.h index 7c1df02..9d58e15 100644 --- a/Clas12Banks/rich.h +++ b/Clas12Banks/rich.h @@ -89,7 +89,7 @@ namespace clas12 { return 0; } - + private: friend clas12::rich;