10#include "KVINDRAPulserDataTree.h"
12#include "KVINDRADBRun.h"
13#include <KVEBYEDAT_ACQParam.h>
14#include "KVMultiDetArray.h"
179 Info(
"Build",
"No data available to build pulser data tree");
206 datasetenv.
Form(
"KVINDRAPulserDataTree.%s", dirvar);
209 Error(
"GetDirectoryName",
"%s is not defined for dataset %s. Check .kvrootrc files.",
234 fArb =
new TTree(
"PulserData",
"Created by KVINDRAPulserDataTree");
248 TIter nxtACQ(acq_pars);
268 else if (ap_type !=
"T") {
276 "Number of branches to create is greater than estimated (%d). Not all parameters can be treated.",
298 if (!
line.BeginsWith(
"#")) {
348 fname.
Form(
"/run%d.gene", run);
375 fname.
Form(
"/run%d.genepin", run);
379 fname.
Form(
"/run%d.laserpin", run);
382 fname.
Form(
"/run%d.genelaserpin", run);
397 Error(
"ReadData",
"Must set list of runs first using SetRunList(TList*)");
400 Info(
"ReadData",
"Reading pulser and laser data for all runs");
408 std::cout <<
"\rInfo in <KVINDRAPulserDataTree::ReadData>: Reading data for run " << run_num << std::flush;
410 if (msg & 1) missing1.
Add(run_num);
411 if (msg & 2) missing2.
Add(run_num);
413 std::cout << std::endl;
415 Warning(
"ReadData",
"Missing file 'run[run_num].gene' for runs: %s", missing1.
GetList());
417 Warning(
"ReadData",
"Missing file 'run[run_num].[gene][laser]pin' for runs: %s", missing2.
GetList());
478 if (!
fArb)
return -1.0;
484 Error(
"GetMean",
"No branch found with name %s", param);
496 Error(
"GetMean",
"Unknown run %d", run);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
KVBase()
Default constructor.
virtual void SetNumber(UInt_t num)
virtual const Char_t * GetType() const
virtual Int_t GetNumber() const
const Char_t * GetDataSetDir() const
const Char_t * GetDataSetEnv(const Char_t *type, const Char_t *defval="") const
Bool_t OpenDataSetFile(const Char_t *filename, std::ifstream &file)
GANIL VXI/VME 16 bit (maximum) EBYEDAT acquisition parameter.
Database entry for each run of an INDRA experiment.
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
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
static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray")
Strings used to represent a set of ranges of values.
const Char_t * GetList() const
void Add(Int_t)
Add value 'n' to the list.
KaliVeda extensions to ROOT collection classes.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Handles directories stored in .tgz archive files.
virtual void SetAddress(void *add)
virtual void SetOwner(Bool_t enable=kTRUE)
void Add(TObject *obj) override
void Delete(Option_t *option="") override
const char * GetName() const override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(char c, Ssiz_t rep=1)
void Form(const char *fmt,...)
virtual TBranch * GetBranch(const char *name)
virtual Int_t BuildIndex(const char *majorname, const char *minorname="0")
virtual void SetDirectory(TDirectory *dir)
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const override
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=nullptr)
virtual Int_t Branch(const char *folder, Int_t bufsize=32000, Int_t splitlevel=99)