KaliVeda
Toolkit for HIC analysis
KVINDRAPulserDataTree.h
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 
88 class KVINDRAPulserDataTree : public KVBase {
89 protected:
90  TTree* fArb;
91  KVTarArchive* fGeneDir;
92  KVTarArchive* fPinDir;
93  Int_t fRun;
94  Float_t* fVal;
95  Int_t fTab_siz;
96  THashTable* fIndex;
97  KVSeqCollection* fRunlist;
98 
99  TString GetDirectoryName(const Char_t*);
100  void CreateTree();
101  void ReadData();
102  UChar_t ReadData(Int_t);
103  void ReadFile(std::ifstream&);
104  Bool_t OpenGeneData(Int_t, std::ifstream&);
105  Bool_t OpenPinData(Int_t, std::ifstream&);
106 
107 public:
109  virtual ~KVINDRAPulserDataTree();
110 
111  virtual void Build();
112  TTree* GetTree() const
113  {
114  return fArb;
115  };
116 
117  void ReadTree(TFile*);
118  void WriteTree(TFile*);
119 
120  Int_t GetIndex(const Char_t* branchname) const
121  {
122  if (fIndex) {
123  KVBase* iob = (KVBase*)fIndex->FindObject(branchname);
124  if (iob) return (Int_t)iob->GetNumber();
125  }
126  return -1;
127  };
129  {
130  fRunlist = runs;
131  };
132 
133  Float_t GetMean(const Char_t*, Int_t);
134 
135  ClassDef(KVINDRAPulserDataTree, 1) //Handles TTree with mean pulser data for every run
136 };
137 
138 #endif
int Int_t
bool Bool_t
unsigned char UChar_t
char Char_t
float Float_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:140
UInt_t GetNumber() const
Definition: KVBase.h:220
Handles TTree with mean pulser data for every run.
virtual ~KVINDRAPulserDataTree()
Destructor.
Int_t GetIndex(const Char_t *branchname) const
void SetRunList(KVSeqCollection *runs)
Float_t GetMean(const Char_t *, Int_t)
void ReadTree(TFile *)
Read pulser data tree from file.
KVINDRAPulserDataTree()
Default constructor.
KaliVeda extensions to ROOT collection classes.
Handles directories stored in .tgz archive files.
Definition: KVTarArchive.h:22
size_t fIndex