#include #include #include using namespace std; namespace RAT { Processor::Result JunkCut::DSEvent(DS::Run&, DS::Entry& ds) { bool pass = true; // If any triggered event fails, they all fail for( size_t iEV = 0; iEV < ds.GetEVCount(); iEV++ ) if( Event(ds, ds.GetEV(iEV)) != OKTRUE ) pass = false; return pass ? OKTRUE : OKFALSE; } Processor::Result JunkCut::Event(DS::Entry&, DS::EV& ev) { int pmtid; std::vector check(DU::Utility::Get()->GetPMTInfo().GetCount(),0); fPassFlag = true; // should fail orphans // should also fail events with ECA bit? set // fail any event that has multiple entries for the same pmt int count = ev.GetUncalPMTs().GetAllCount(); for (int ipmt=0;ipmt= (int) check.size()){ fPassFlag = false; break; }else{ check[pmtid] = 1; } } // now update the mask UpdateMask(ev); return fPassFlag ? OKFALSE : OKTRUE; } } // namespace RAT