/////////////////////////////////////////////////////////////////////////////
// Conditional return on a data cleaning flag. Returns OKTRUE if the
// data cleaning flag is applied and set, if the flag is applied and not
// set it returns OKFALSE. If the flag has not been applied the result
// is OK. The current pass will be used unless the user overrides this.
// The processor will FAIL if there is more than one event.
//
// \author: P G Jones
// \contact Rob Knapik
//
// REVISION HISTORY:
// 2014-10-24 : P Jones - New file.
// 2017-03-27 : R. Knapik
// -Checks the dCApplied flags in the current pass,
// if the first applied bit is zero, fPass = fPass -1.
// -Now you can pass in a blindness value to check for
// bitmasks stored in BLINDNESS.ratdb. This will be only
// used by the proccesing group to filter the data set
// into closed and open data sets.
// 2017-01-17 : R Lane
// -Modifying code such that it wont automatically fail a DS:Event
// if it has more than one EV (important if running the processor on MC)
//
/////////////////////////////////////////////////////////////////////////////
#ifndef __RAT_DataCleaningCutProc_hh__
#define __RAT_DataCleaningCutProc_hh__
#include
#include
#include
#include
namespace RAT
{
class DataCleaningCutProc : public Processor
{
public:
// Create a new cut processor, cuts events with the wrong classification
DataCleaningCutProc() : Processor("DataCleaningCutProc"), fPass(-1), fBlindness(0) { }
// Destroy the processor
virtual ~DataCleaningCutProc() { }
// Applies the set integer commands.
//
// param should be pass
// value should be the pass value
// throws ParamUnknown if param is not pass
virtual void SetI( const std::string& param, const int value );
// Applies the set string commands.
//
// param should be flag
// value should be the name of the flag
// throws ParamUnknown if param is not flag
virtual void SetS( const std::string& param, const std::string& value );
// Gets the current pass number
//
// run: Data structure for the run
virtual void BeginOfRun( DS::Run& run );
// Process the event
//
// Conditional on the classifier value
//
// run: Data structure for the run
// ds: Data structure for the event
// returns OKTRUE if the flag has been applied and is set
virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds );
protected:
std::vector fFlags; // The flags to check
std::vector fMasks; // Optional DB defined masks to check
Int_t fPass; // The pass to consider
unsigned int fBlindness; // to check the BLINDNESS.ratdb file instead
};
} // namespace RAT
#endif