#ifndef EMDR_H_ #define EMDR_H_ #include #include #include #include #include #include "MdEvent.h" #include "MdTrace.h" #include "GapStrategy.h" namespace mdRec { class Emdr { public: /// Kind of possible counting criteria to be used. enum Strategy { eGap, /**< Require strictly a fixed number of gaps in between the 1s. */ eGapRelax, /**< Require at least a number of gaps in between the 1s. */ eAmountInWindow, /**< Only check quantity of 1s in window. */ eConsecutive, /**< Check consecutiveness of 1s. */ eAmountGlobal /**< Count ones and divide by constant. */ }; public: Emdr( md::Event* ); void SetWindow ( unsigned int w ) { fWindowSize = w; }//number of bits (no their time transalation) void SetNOnes ( unsigned int n ) { fNOnes = n; } void SetNGaps ( unsigned int n) { fNGaps = n; } void SetNOnesPerMuon ( double n ) { fNOnesPerMuon = n; } void SetNMinOnes ( unsigned int n ){ fNMinOnes = n; } void SetVerbose ( unsigned int n ){ fVerbose = n; } void SetStrategy ( Strategy s ) { fStrategy = s; } void CreateStrategy(); void ApplyCounting(); private: md::Event * fIoMdEvent; /** * \brief Temporal window size. */ unsigned int fWindowSize; /** * \brief Number of 1s required. */ unsigned int fNOnes; /** * \brief maximum number of gaps in a muon pattern (Gap strategy only). */ unsigned int fNGaps; /** * \brief Number of 1s required. */ double fNOnesPerMuon; /** * \brief Number of 1s required. */ unsigned int fNMinOnes; /** * \brief Counting stategy to be performed. */ unsigned int fVerbose; Strategy fStrategy; /** * \brief Object performing the counting. */ std::auto_ptr fCounter; };//end class Emdr }//end namespace #endif /*#ifndef EMDR_H_*/