- for(Int_t i = 0; i<fPulseLength.GetSize();i++) {
- if(GetCurrentEvent()>0 && (GetCurrentEvent() % fPulseLength.At(i) == 0))
- fCurrentPulse.AddAt(fCurrentPulse.At(i)+1,i);
-
- if(GetCurrentEvent()>0 && (GetCurrentEvent()) % fEventsPerChannel.At(i) == 0)
- fCurrentPulse.AddAt(0,i);
+ for(UShort_t det=1; det<=3;det++) {
+ UShort_t firstring = (det == 1 ? 1 : 0);
+ for(UShort_t iring = firstring; iring <=1;iring++) {
+ Char_t ring = (iring == 1 ? 'I' : 'O');
+ for(UShort_t board =0 ; board <=1; board++) {
+ Int_t idx = GetHalfringIndex(det,ring,board);
+
+ if( !fPulseLength.At(idx) || !fEventsPerChannel.At(idx))
+ continue;
+ if(GetCurrentEvent()>0 && ((GetCurrentEvent() % fPulseLength.At(idx)) == 0))
+ fCurrentPulse.AddAt(fCurrentPulse.At(idx)+1,idx);
+
+ if(GetCurrentEvent()>0 && ((GetCurrentEvent()) % fEventsPerChannel.At(idx)) == 0)
+ fCurrentPulse.AddAt(0,idx);
+ }
+ }