//*-- AUTHOR : J. Markert //////////////////////////////////////////////////////////////////////////// // HMdcGarReader // Class to read several GARFIELD formats //////////////////////////////////////////////////////////////////////////// #include #include #include "hmdcgarreader.h" #include "htool.h" #include "TMath.h" #include "TArray.h" #include "TStyle.h" ClassImp(HMdcGarReader) HMdcGarReader::HMdcGarReader(const char* name="",const char* title="") : TNamed(name,title) { // constructor for HMdcGarReader initVariables(); } HMdcGarReader::~HMdcGarReader() { // destructor of HMdcGarReader } void HMdcGarReader::initVariables() { // inits all variables } TGraph* HMdcGarReader::readXT(TString inputname,Int_t color) { // Reads GARFIELD XT curve from ascii input "inputname" into a TGraph // with LineColor "color", which is returned gStyle->SetPalette(50); FILE* input=0; if(!HTool::openAscii(&input,inputname,"r")) { exit(1); } cout<<"HMdcGarReader::readXT() , Reading XT-data from GARFIELD file\n"<SetMarkerStyle(29); h->SetMarkerColor(4); h->SetMarkerSize(.8); h->SetLineColor(color); HTool::closeAscii(&input); return h; } TGraph* HMdcGarReader::readMagboltz(TString inputname,Int_t color) { // Reads MAGBOLTZ vdrift/E (E/P:Log10) curve from ascii input "inputname" into a TGraph // with LineColor "color", which is returned TGraph* h=0; gStyle->SetPalette(50); FILE* input=0; if(!HTool::openAscii(&input,inputname,"r")) { exit(1); } cout<<"HMdcGarReader::readMagboltz() , Reading Vdrift/E-data from MAGBOLTZ file\n"<SetMarkerStyle(29); h->SetMarkerColor(4); h->SetMarkerSize(.8); h->SetLineColor(color); HTool::closeAscii(&input); return h; }