KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
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
22class TFile;
23
89protected:
98
100 void CreateTree();
101 void ReadData();
103 void ReadFile(std::ifstream&);
104 Bool_t OpenGeneData(Int_t, std::ifstream&);
105 Bool_t OpenPinData(Int_t, std::ifstream&);
106
107public:
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:142
UInt_t GetNumber() const
Definition KVBase.h:220
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.
TObject * FindObject(const char *name) const override