EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbOutRowStream.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairDbOutRowStream.h
1 #ifndef FAIRDBOUTROWSTREAM_H
2 #define FAIRDBOUTROWSTREAM_H
3 
4 #include <string>
5 
6 #include "FairDb.h"
7 #include "FairDbRowStream.h"
8 
10 class ValTimeStamp;
11 class FairDbValidityRec;
12 
14 {
15 
16 // friend class FairDbConfigSet; //To allow it to use private Store method
17 
18  public:
19 
20  FairDbOutRowStream(const FairDbTableMetaData* metaData);
21  virtual ~FairDbOutRowStream();
22 
23  Bool_t HasGoodData() const { return ! fBadData && IsComplete(); }
24  const string& GetCSV() const { return fCSV; }
25  Bool_t IsComplete() const { return CurColNum() == NumCols()+1; }
26 
27  FairDbOutRowStream& operator<<(Bool_t src);
28  FairDbOutRowStream& operator<<(Char_t src);
29  FairDbOutRowStream& operator<<(const Char_t* src);
30  FairDbOutRowStream& operator<<(Short_t src);
31  FairDbOutRowStream& operator<<(UShort_t src);
32  FairDbOutRowStream& operator<<(Int_t src);
33  FairDbOutRowStream& operator<<(UInt_t src);
34  FairDbOutRowStream& operator<<(Float_t src);
35  FairDbOutRowStream& operator<<(Double_t src);
36  FairDbOutRowStream& operator<<(const string& src);
38 
39  void Clear() { fBadData = kFALSE; fCSV.erase(); ClearCurCol();}
40  void Store(const string& str);
42 
43  private:
44 
45  Bool_t fBadData;
46  string fCSV;
47 
48  ClassDef(FairDbOutRowStream,0) //Output stream for single table row
49 
50 };
51 
52 
53 #endif // FAIRDBOUTROWSTREAM_H