Analysis  version 7.0 - august 2014
FilterBaseAnd.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file FilterBaseAnd.hh
3  *
4  * Fichier de déclaration de la classe FilterBaseAnd.
5  */
6 //======================================================================
7 
8 #ifndef FILTER_BASE_AND_HH
9 #define FILTER_BASE_AND_HH
10 
11 #include "FilterBase2Op.hh"
12 #include "FilterList.hh"
13 
14 //======================================================================
15 /*! \class FilterBaseAnd
16  *
17  * Classe des filtres de ET 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  FilterBaseAnd ( const Filter * fp1, const Filter * fp2 );
35 
36  // constructeur de recopie
37  FilterBaseAnd ( const FilterBaseAnd & f );
38 
39  // opérateur d'affectation
41 
42  // destructeur
43  virtual ~FilterBaseAnd ( );
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 FilterBaseAnd * NewBase ( const string &def, const EventManager * mgr );
51 
52 
53 //----------------------------------------------------------------------
54 
55  virtual bool Ok ( ) const;
56  virtual int Type ( ) const;
57  virtual string TypeName ( ) const;
58 
59 
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 FilterBaseAnd::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 FilterBaseAnd::Type ( ) const
81  { return (Filter::typeAnd); }
82 
83 /*! Retourne le type de filtre, sous forme textuelle. */
84 inline string FilterBaseAnd::TypeName ( ) const
85  { return (FILTER_TYPE_TXT_AND); }
86 
87 
88 //======================================================================
89 #endif
Definition: FilterBase2Op.hh:19
virtual bool Ok() const
Definition: FilterBaseAnd.hh:72
Definition: FilterBaseAnd.hh:19
ClassDef(FilterBaseAnd, 0)
const Filter * filter2
Pointeur sur le second filtre opérande.
Definition: FilterBase2Op.hh:28
Definition: Filter.hh:50
virtual string TypeName() const
Definition: FilterBaseAnd.hh:84
FilterBaseAnd & operator=(const FilterBaseAnd &f)
Definition: FilterBaseAnd.cpp:40
const Filter * filter1
Pointeur sur le premier filtre opérande.
Definition: FilterBase2Op.hh:27
FilterBaseAnd(const Filter *fp1, const Filter *fp2)
Definition: FilterBaseAnd.cpp:19
virtual ~FilterBaseAnd()
Definition: FilterBaseAnd.cpp:56
#define FILTER_TYPE_TXT_AND
Nom du type de filtre.
Definition: Filter.hh:21
virtual bool Ok() const
Definition: Filter.hh:152
virtual int Type() const
Definition: FilterBaseAnd.hh:80
static FilterBaseAnd * NewBase(const string &def, const EventManager *mgr)
Definition: FilterBaseAnd.cpp:70
GObject(FilterBaseAnd)
Definition: EventManager.hh:59