Class Reference for E1039 Core & Analysis Software
FlagSavev1.h
Go to the documentation of this file.
1 #ifndef FLAGSAVEV1_H
2 #define FLAGSAVEV1_H
3 
4 #include "FlagSave.h"
5 #include <iostream>
6 #include <map>
7 #include <string>
8 
9 class PHFlag;
10 
12 class FlagSavev1: public FlagSave
13 {
14  public:
15 
19  virtual ~FlagSavev1() {}
20 
21  FlagSavev1 * clone() const;
22 
24  void Reset() {}
25  int isValid() const;
26 
30  void identify(std::ostream& os = std::cout) const;
31 
32  int FillFromPHFlag(const PHFlag *flags);
33  int PutFlagsBack(PHFlag *flags);
34 
35  protected:
36  int FillIntFromPHFlag(const PHFlag *flags);
37  int FillDoubleFromPHFlag(const PHFlag *flags);
38  int FillFloatFromPHFlag(const PHFlag *flags);
39  int FillCharFromPHFlag(const PHFlag *flags);
40 
41  int PutIntToPHFlag(PHFlag *flags);
42  int PutDoubleToPHFlag(PHFlag *flags);
43  int PutFloatToPHFlag(PHFlag *flags);
44  int PutCharToPHFlag(PHFlag *flags);
45 
46  void PrintIntFlag(std::ostream& os) const;
47  void PrintDoubleFlag(std::ostream& os) const;
48  void PrintFloatFlag(std::ostream& os) const ;
49  void PrintStringFlag(std::ostream& os) const;
50 
51  std::map<std::string, int> intflag;
52  std::map<std::string, double> doubleflag;
53  std::map<std::string, float> floatflag;
54  std::map<std::string, std::string> stringflag;
55 
56  private: // prevent doc++ from showing ClassDef
57  ClassDef(FlagSavev1,1)
58 };
59 
60 #endif
FlagSavev1()
ctor
Definition: FlagSavev1.h:17
int isValid() const
isValid returns non zero if object contains valid data
Definition: FlagSavev1.cc:20
void Reset()
Clear Event.
Definition: FlagSavev1.h:24
int FillDoubleFromPHFlag(const PHFlag *flags)
Definition: FlagSavev1.cc:77
int FillCharFromPHFlag(const PHFlag *flags)
Definition: FlagSavev1.cc:101
int PutIntToPHFlag(PHFlag *flags)
Definition: FlagSavev1.cc:114
void PrintIntFlag(std::ostream &os) const
Definition: FlagSavev1.cc:158
int PutCharToPHFlag(PHFlag *flags)
Definition: FlagSavev1.cc:147
void PrintFloatFlag(std::ostream &os) const
Definition: FlagSavev1.cc:190
virtual ~FlagSavev1()
dtor
Definition: FlagSavev1.h:19
std::map< std::string, float > floatflag
Definition: FlagSavev1.h:53
std::map< std::string, double > doubleflag
Definition: FlagSavev1.h:52
void identify(std::ostream &os=std::cout) const
Definition: FlagSavev1.cc:33
int FillIntFromPHFlag(const PHFlag *flags)
Definition: FlagSavev1.cc:65
void PrintDoubleFlag(std::ostream &os) const
Definition: FlagSavev1.cc:174
std::map< std::string, std::string > stringflag
Definition: FlagSavev1.h:54
int PutFlagsBack(PHFlag *flags)
Definition: FlagSavev1.cc:54
FlagSavev1 * clone() const
Virtual copy constructor.
Definition: FlagSavev1.cc:7
int FillFloatFromPHFlag(const PHFlag *flags)
Definition: FlagSavev1.cc:89
std::map< std::string, int > intflag
Definition: FlagSavev1.h:51
int PutDoubleToPHFlag(PHFlag *flags)
Definition: FlagSavev1.cc:125
void PrintStringFlag(std::ostream &os) const
Definition: FlagSavev1.cc:206
int PutFloatToPHFlag(PHFlag *flags)
Definition: FlagSavev1.cc:136
int FillFromPHFlag(const PHFlag *flags)
Definition: FlagSavev1.cc:44
Definition: PHFlag.h:20