GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InfoData.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef GW_INFODATA_H
24 #define GW_INFODATA_H
25 
26 #ifndef ROOT_TObject
27 #include <TObject.h>
28 #endif
29 
30 namespace Gw {
31 
46 class InfoData : public TObject
47 {
48 protected:
49  UShort_t fInfo; // set a flag to a given data
50 
51 public:
55  enum EData { kKnown = 0, kUnknown = 1, kTentative = 2, kTheo = 3, kAbout = 4 } ;
56 
57 public:
58  InfoData();
59  explicit InfoData(InfoData::EData info) { SetInfo(info); }
60  InfoData(const InfoData &);
61  virtual ~InfoData();
62 
64 
67  static EData WhatIs(const char *);
68 
70  virtual bool IsData(UShort_t) const;
71 
73  virtual void SetInfo(InfoData::EData);
74 
76  virtual void Set(const char *st) { fInfo = WhatIs(st) ; }
77 
79  ClassDef(InfoData,1); // InfoData base class
80 };
81 // inline members
82 inline bool InfoData::IsData(UShort_t info) const { return fInfo == info ;}
84 
85 }
86 
87 #endif
static EData WhatIs(const char *)
It deduces from a string the kind of data.
Definition: InfoData.cpp:45
virtual bool IsData(UShort_t) const
to get some information about this data
Definition: InfoData.h:82
virtual ~InfoData()
Definition: InfoData.cpp:41
InfoData(InfoData::EData info)
Definition: InfoData.h:59
virtual void Set(const char *st)
to set some information about this data
Definition: InfoData.h:76
EData
flags that qualify a given data
Definition: InfoData.h:55
UShort_t fInfo
Definition: InfoData.h:49
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
Base class to get/set some flag informations concerning any data.
Definition: InfoData.h:46
virtual void SetInfo(InfoData::EData)
to set some information about this data
Definition: InfoData.h:83
ClassDef(InfoData, 1)
rootcint dictionary