Analysis  version 7.0 - august 2014
FilterBaseOr.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file FilterBaseOr.hh
3  *
4  * Fichier de déclaration de la classe FilterBaseOr.
5  */
6 //======================================================================
7 
8 #ifndef FILTER_BASE_OR_HH
9 #define FILTER_BASE_OR_HH
10 
11 #include "FilterBase2Op.hh"
12 #include "FilterList.hh"
13 
14 //======================================================================
15 /*! \class FilterBaseOr
16  *
17  * Classe des filtres de OU logique (de 2 autres filtres).
18  */
20 {
21 //----------------------------------------------------------------------
22  /*! \object_doc */
24 //----------------------------------------------------------------------
25 
26  protected:
27 
28  public:
29 
30 //----------------------------------------------------------------------
31 // CONSTRUCTEUR / AFFECTATION / DESTRUCTEUR
32 
33  // constructeur
34  FilterBaseOr ( const Filter * fp1, const Filter * fp2 );
35 
36  // constructeur de recopie
37  FilterBaseOr ( const FilterBaseOr & f );
38 
39  // opérateur d'affectation
40  FilterBaseOr & operator = ( const FilterBaseOr & f );
41 
42  // destructeur
43  virtual ~FilterBaseOr ( );
44 
45 //----------------------------------------------------------------------
46 
47  // Fonction statique de lecture d'un nouveau filtre.
48  // il faut passer une liste en argument, dans laquelle doit
49  // se trouver le filtre dont on veut la négation
50  static FilterBaseOr * NewBase ( const string &def, const EventManager * mgr );
51 
52 //----------------------------------------------------------------------
53 
54  virtual bool Ok ( ) const;
55  virtual int Type ( ) const;
56  virtual string TypeName ( ) const;
57 
58 //----------------------------------------------------------------------
59 // pour ROOT...
60 
61  public:
62  /*! Définition à usage de ROOT... */
64 };
65 
66 
67 //======================================================================
68 // METHODES INLINE
69 
70 /*! Test de validité du filtre.
71  */
72 inline bool FilterBaseOr::Ok ( ) const
73  {
74  bool f1 = (filter1 != NULL) ? filter1->Ok() : false;
75  bool f2 = (filter2 != NULL) ? filter2->Ok() : false;
76  return ( f1 || f2 );
77  }
78 
79 /*! Retourne le type de filtre. */
80 inline int FilterBaseOr::Type ( ) const
81  { return (Filter::typeOr); }
82 
83 /*! Retourne le type de filtre, sous forme textuelle. */
84 inline string FilterBaseOr::TypeName ( ) const
85  { return (FILTER_TYPE_TXT_OR); }
86 
87 
88 //======================================================================
89 #endif
Definition: FilterBase2Op.hh:19
const Filter * filter2
Pointeur sur le second filtre opérande.
Definition: FilterBase2Op.hh:28
Definition: Filter.hh:50
#define FILTER_TYPE_TXT_OR
Nom du type de filtre.
Definition: Filter.hh:22
virtual bool Ok() const
Definition: FilterBaseOr.hh:72
static FilterBaseOr * NewBase(const string &def, const EventManager *mgr)
Definition: FilterBaseOr.cpp:68
const Filter * filter1
Pointeur sur le premier filtre opérande.
Definition: FilterBase2Op.hh:27
FilterBaseOr & operator=(const FilterBaseOr &f)
Definition: FilterBaseOr.cpp:38
FilterBaseOr(const Filter *fp1, const Filter *fp2)
Definition: FilterBaseOr.cpp:19
GObject(FilterBaseOr)
Definition: FilterBaseOr.hh:19
virtual int Type() const
Definition: FilterBaseOr.hh:80
virtual ~FilterBaseOr()
Definition: FilterBaseOr.cpp:54
virtual bool Ok() const
Definition: Filter.hh:152
Definition: EventManager.hh:59
ClassDef(FilterBaseOr, 0)
virtual string TypeName() const
Definition: FilterBaseOr.hh:84