Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Cut.h

Go to the documentation of this file.
00001 // Cut.h: interface for the Cut class.
00002 //
00003 //
00004 // Original author: T. Burnett tburnett@u.washington.edu
00005 // $Header: /nfs/slac/g/glast/ground/cvs/merit/src/Cut.h,v 1.1.1.1 1999/12/20 22:29:12 burnett Exp $
00007 
00008 #if !defined(CUT_H__INCLUDED_)
00009 #define      CUT_H__INCLUDED_
00010 
00011 #if _MSC_VER > 1000
00012 #pragma once
00013 #endif // _MSC_VER > 1000
00014 
00015 #include "Analyze.h"
00016 
00017 
00018 class Cut : public Analyze 
00019 // 
00020 // Purpose: define a simple cut 
00021 {
00022 public:
00023 
00024     enum Comparison{LT,GT,EQ,NE,LE,GE} ;
00025 
00026     Cut(const Tuple&t, std::string item_name, Comparison op, double c, std::string label="");
00027     // specify the tuple, item name in the tuple, operation, value to compare with, and 
00028     // an optional label--if it does not appear, a label is made automatically
00029 
00030     Cut(const Tuple&t, std::string::const_iterator& it, std::string::iterator end);
00031     // the tuple, and a expression to be parsed, of the form "item<99"
00032 
00033     Cut(const Tuple&t, const std::string& expression );
00034     // the tuple, and a expression to be parsed, of the form "item<99"
00035 
00036     virtual bool apply();
00037 
00038 private:
00039     void parse(const Tuple&t, std::string::const_iterator& it,  std::string::const_iterator end);
00040 
00041     double m_cut;
00042     Comparison m_op;
00043 };
00044 
00045 #endif // !defined(AFX_ANALYSISCUT_H__CD2E7DD1_F406_11D2_83A8_000000000000__INCLUDED_)
00046 ;

Generated at Wed Nov 21 12:20:39 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000