KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRAPulserDataTree.h
Go to the documentation of this file.
1 /*
2 $Id: KVINDRAPulserDataTree.h,v 1.5 2009/03/27 16:42:58 franklan Exp $
3 $Revision: 1.5 $
4 $Date: 2009/03/27 16:42:58 $
5 */
6 
9 
10 #ifndef __KVINDRAPULSERDATATREE_H
11 #define __KVINDRAPULSERDATATREE_H
12 
13 #include "KVBase.h"
14 #include "TTree.h"
15 #include "THashTable.h"
16 #include "Riostream.h"
17 #include "KVString.h"
18 #include "KVTarArchive.h"
19 
20 #include <KVSeqCollection.h>
21 
22 class TFile;
23 
87 class KVINDRAPulserDataTree : public KVBase {
88 protected:
97 
99  void CreateTree();
100  void ReadData();
102  void ReadFile(std::ifstream&);
103  Bool_t OpenGeneData(Int_t, std::ifstream&);
104  Bool_t OpenPinData(Int_t, std::ifstream&);
105 
106 public:
108  virtual ~KVINDRAPulserDataTree();
109 
110  virtual void Build();
111  TTree* GetTree() const
112  {
113  return fArb;
114  };
115 
116  void ReadTree(TFile*);
117  void WriteTree(TFile*);
118 
119  Int_t GetIndex(const Char_t* branchname) const
120  {
121  if (fIndex) {
122  KVBase* iob = (KVBase*)fIndex->FindObject(branchname);
123  if (iob) return (Int_t)iob->GetNumber();
124  }
125  return -1;
126  };
128  {
129  fRunlist = runs;
130  };
131 
132  Float_t GetMean(const Char_t*, Int_t);
133 
134  ClassDef(KVINDRAPulserDataTree, 1) //Handles TTree with mean pulser data for every run
135 };
136 
137 #endif
int Int_t
unsigned char UChar_t
char Char_t
bool Bool_t
float Float_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:135
UInt_t GetNumber() const
Definition: KVBase.h:213
Handles TTree with mean pulser data for every run.
void ReadFile(std::ifstream &)
Read data in one file.
Bool_t OpenGeneData(Int_t, std::ifstream &)
virtual ~KVINDRAPulserDataTree()
Destructor.
KVTarArchive * fPinDir
directory/archive containing pin data
Float_t * fVal
array of floats used to fill tree
Int_t GetIndex(const Char_t *branchname) const
void SetRunList(KVSeqCollection *runs)
Float_t GetMean(const Char_t *, Int_t)
TTree * fArb
tree containing pulser data
THashTable * fIndex
associate name of branch to index in fVal
Int_t fRun
run number used to build tree
TString GetDirectoryName(const Char_t *)
void ReadData()
Read data for every run in dataset.
void ReadTree(TFile *)
Read pulser data tree from file.
Bool_t OpenPinData(Int_t, std::ifstream &)
KVTarArchive * fGeneDir
directory/archive containing gene data
Int_t fTab_siz
size of array
KVSeqCollection * fRunlist
list of runs given by database
KVINDRAPulserDataTree()
Default constructor.
KaliVeda extensions to ROOT collection classes.
Handles directories stored in .tgz archive files.
Definition: KVTarArchive.h:21
TObject * FindObject(const char *name) const