KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRARunSheetReader.h
Go to the documentation of this file.
1 /*******************************************************************************
2 $Id: KVINDRARunSheetReader.h,v 1.10 2007/10/24 14:10:26 franklan Exp $
3 $Revision: 1.10 $
4 $Date: 2007/10/24 14:10:26 $
5 $Author: franklan $
6 *******************************************************************************/
7 
8 #ifndef __KVINDRARUNSHEETREADER_H
9 #define __KVINDRARUNSHEETREADER_H
10 
11 #include "KVString.h"
12 #include "KVNumberList.h"
13 #include "TTree.h"
14 #include "KVDatime.h"
15 #include "Riostream.h"
16 
49 
53 
56 
57  /***** temp variables used to read runsheet and (if required) fill TTree ******/
64  Int_t fScalers[1024];
66 
68 
69  void init_vars();
70 
71 public:
72 
73  KVINDRARunSheetReader(Bool_t make_tree = kFALSE);
75  {
76  };
77 
79  {
80  return fRunSheetDir;
81  };
82  void SetRunSheetDir(const Char_t* dir)
83  {
84  fRunSheetDir = dir;
85  };
87  {
88  return fFileFormat;
89  };
90  void SetFileFormat(const Char_t* fmt)
91  {
92  fFileFormat = fmt;
93  };
94  const Char_t* GetRunSheetFileName(Int_t run);
95  Double_t GetNumberField(TString&, const Char_t* delim =
96  ":", int index = 1);
97  TString GetStringField(TString&, const Char_t* delim =
98  ":", int index = 1);
99  TString GetDateField(TString&, const Char_t* delim = ":");
100 
102  {
103  return fMakeTree;
104  };
105  void SetMakeTree(Bool_t yes = kTRUE)
106  {
107  std::cout << "SetMakeTree called with yes=" << yes << std::endl;
108  fMakeTree = yes;
109  };
110  void CreateTree();
111 
112  TTree* GetTree() const
113  {
114  return fTree;
115  };
116  void StartTreeViewer() const
117  {
118  if (fTree) fTree->StartViewer();
119  };
120 
122  Int_t ReadAllRunSheets(Int_t first = 1, Int_t last = 9999);
123 
124  ClassDef(KVINDRARunSheetReader, 0) //For reading run sheets of INDRA experiments
125 };
126 
127 #endif
int Int_t
unsigned int UInt_t
char Char_t
bool Bool_t
double Double_t
#define ClassDef(name, id)
Extension of TDatime to handle various useful date formats.
Definition: KVDatime.h:32
Read the run sheets produced by the standard INDRA acquisition control program.
TString fFileFormat
format string for run sheet file names
TString GetDateField(TString &, const Char_t *delim=":")
void init_vars()
Set values of all runsheet/TTree variables to 0.
Double_t GetNumberField(TString &, const Char_t *delim=":", int index=1)
const Char_t * GetRunSheetFileName(Int_t run)
const Char_t * GetRunSheetDir()
TTree * fTree
TTree can be made and filled from info.
Int_t fScalers[1024]
scalers for tree
void SetMakeTree(Bool_t yes=kTRUE)
Int_t ReadAllRunSheets(Int_t first=1, Int_t last=9999)
Bool_t fMakeTree
set to kTRUE if TTree is to be filled
TString fFilePath
temporary string holding full filename of current runsheet
UInt_t fTIME_START
zero-time for all run start/stop times
TString fRunSheetDir
full path to directory holding run sheets
KVINDRARunSheetReader(Bool_t make_tree=kFALSE)
TString GetStringField(TString &, const Char_t *delim=":", int index=1)
void SetFileFormat(const Char_t *fmt)
const Char_t * GetFileFormat()
void SetRunSheetDir(const Char_t *dir)
virtual void StartViewer()