diff --git a/AculCalib/AculCalib.cpp b/AculCalib/AculCalib.cpp index 0773c1f74a730f874dd51944d5206adb3795f538..16b914744bd7eb83fbbd24f448e7ba38e81bcc5d 100644 --- a/AculCalib/AculCalib.cpp +++ b/AculCalib/AculCalib.cpp @@ -1,23 +1,24 @@ #include "AculCalib.h" -ClassImp(AculCalib); - +//---------------------------------------------------------------------------- AculCalib::AculCalib() { - +//documentation example printf("AculCalib::Default constructor called.\n"); Init(); } -AculCalib::AculCalib(const char* parfile) { +//---------------------------------------------------------------------------- +/*AculCalib::AculCalib(const char* parfile) { printf("AculCalib::Constructor called.\n"); SetParFile(parfile); Init(); -} +}*/ +//---------------------------------------------------------------------------- AculCalib::~AculCalib() { printf("AculCalib::Destructor called.\n"); @@ -26,17 +27,20 @@ AculCalib::~AculCalib() { } +//---------------------------------------------------------------------------- void AculCalib::Init() { fPars = 0; } +//---------------------------------------------------------------------------- void AculCalib::SetParFile(const char* parfile) { fParFileName = parfile; return; } +//---------------------------------------------------------------------------- void AculCalib::PrintParameters(const char* option) { if (!fPars) { cerr << "\"AculCalib::PrintParameters\" parameters were not initialized." << endl; @@ -46,6 +50,7 @@ void AculCalib::PrintParameters(const char* option) { fPars->PrintParameters(option); } +//---------------------------------------------------------------------------- void AculCalib::PrintCalibParameters() { cout << "i\ta\t\b" << endl; for (Int_t i = 0; i<=(Int_t)fA.size(); i++) { @@ -53,6 +58,7 @@ void AculCalib::PrintCalibParameters() { } } +//---------------------------------------------------------------------------- Double_t AculCalib::GetA(Int_t i) { if (i >= (Int_t)fA.size()) //if i >= number of array element { @@ -61,6 +67,7 @@ Double_t AculCalib::GetA(Int_t i) { return fA[i]; } +//---------------------------------------------------------------------------- Double_t AculCalib::GetB(Int_t i) { if (i >= (Int_t)fB.size()) //if i >= number of array element { @@ -69,6 +76,7 @@ Double_t AculCalib::GetB(Int_t i) { return fB[i]; } +//---------------------------------------------------------------------------- void AculCalib::CanDivider(TCanvas *c, Int_t noPads, Int_t columns, Int_t rows) { c->Clear(); @@ -83,3 +91,6 @@ void AculCalib::CanDivider(TCanvas *c, Int_t noPads, Int_t columns, Int_t rows) return; } } + +//---------------------------------------------------------------------------- +ClassImp(AculCalib); diff --git a/AculCalib/AculCalib.h b/AculCalib/AculCalib.h index aa093a0b8c99c9f24f2c7c414d58bb9cbee3bb6c..782b5106b6d074fde1e06eb96c5cec7e43edf87e 100644 --- a/AculCalib/AculCalib.h +++ b/AculCalib/AculCalib.h @@ -1,3 +1,11 @@ +//////////////////////////////////////////////////////////////// +// // +// TMyClass // +// // +// This is the description block. // +// // +//////////////////////////////////////////////////////////////// + #ifndef ACULCALIB_ACULCALIB_H_ #define ACULCALIB_ACULCALIB_H_ @@ -19,18 +27,18 @@ using std::cerr; class AculCalib { protected: -//essential - vector fA; - vector fB; + vector fA; //calibration parameter A + vector fB; //calibration parameter A - TString fParFileName; + TString fParFileName; //name of file with parameters - AculCalPars *fPars; + AculCalPars *fPars; //parameters used for calibration public: -//essential + //Default constructor. AculCalib(); - AculCalib(const char* parfile); + + //Destructor. virtual ~AculCalib(); ClassDef(AculCalib,1); @@ -39,16 +47,19 @@ public: void SetParFile(const char* parfile); const char* GetParFileName() {return fParFileName.Data();} + //Print parameters used for calibration. void PrintParameters(const char* option = ""); + //Print calibration parameters. void PrintCalibParameters(); + //Get calibration parameter A. Double_t GetA(Int_t i); + //Get calibration parameter B. Double_t GetB(Int_t i); protected: -//essential void CanDivider(TCanvas *c, Int_t noPads, Int_t columns = 0, Int_t rows = 0); }; -#endif /* ACULCALIB_ACULCALIB_H_ */ +#endif diff --git a/AculCalib/AculCalibScint.h b/AculCalib/AculCalibScint.h index 580e0eb7b3361a867a4d26f01ea7e12f797d61b2..6e3da7b8dbe2bd4b73ebaa5f0b2895965568b221 100644 --- a/AculCalib/AculCalibScint.h +++ b/AculCalib/AculCalibScint.h @@ -1,3 +1,55 @@ +////////////////////////////////////////////////////////////////////////////// +// // +// This class is intended for ... // +// // +// It work like this... User may use such functions ... in such steps. // +// +// Keywords in parameter file and possible comments +// +// Something about order of keywords +// +// Example of parameter file (with explanations) +// +// energies 4 #number of energy points +// crystals 16 #number of crystals in detector +// files 4 +// #fileID fileName +// #fileID not implemented yet +// data/csi_13_Ealpha16.root +// data/csi_13_Ealpha21.root +// data/csi_13_Ealpha26.root +// data/csi_13_Ealpha30.root +// #keyword detector particle +// detector SQ13 Alpha +// #keyword energy [MeV/A] +// energy 66.542 +// #keyword; filename; number of cuts in file +// cutFile cuts/cutsSQ13Alpha.root 2 +// cutsSQ13Alpha16 +// cutSQ13Alpha16Amp +// #channel minimum maximum +// 0 650 830 +// 1 920 1150 +//\ ... +// 15 800 1000 +// #CsI2, energy ~ 21 MeV/A, Alpha +// energy 85.437 +// #keyword; filename; number of cuts in file +// cutFile cuts/cutsSQ13Alpha.root 2 +// cutSQ13Alpha21 +// cutSQ13Alpha21Amp +// #channel minimum maximum +// 0 1050 1200 +//\ \... +// 15 1150 1350 +// #CsI2, energy ~ 26 MeV/A, Alpha +// energy 105.5 +// ... +// +//asdasd +////////////////////////////////////////////////////////////////////////////// + + #pragma once //#include "TObject.h" @@ -25,7 +77,7 @@ class AculCalibScint : public AculCalib { private: // //todo delete this strange double array somewhere - TFile **fInFiles; + TFile **fInFiles; //doc of class member TTree **fTrees; TFile *fCutFile; @@ -33,7 +85,7 @@ private: vector< vector > fHistFull; vector< vector > fHistCut; // - vector< vector > fMeanPeakPos; + vector< vector > fMeanPeakPos; //doc of class member vector< vector > fMeanPeakRMS; // //todo make vector of graphs @@ -41,25 +93,26 @@ private: // TFile *fGraphs; public: -// AculCalibScint() : a(0), b(0), c(0), p(0){}; AculCalibScint(); + //default constructor + AculCalibScint(const char* parfile); virtual ~AculCalibScint(); - // Define the class for the cint dictionary - ClassDef (AculCalibScint,1); + ClassDef (AculCalibScint,1); //decription right after ClassDef virtual void Init(); -// void SetParFile(const char* parfile); - void PrintTrees(); -// void PrintParameters(const char* option = ""); -// void PrintPeakRanges(); + //Description of the function. I think it does not work. void DrawVariable(const char* variable, Int_t treeID, TCanvas *canvas, Int_t lowRange = 0, Int_t upRange = 4096); + + //Description of the function. I think it does not work. void DrawBeam(TCanvas *canvas, Int_t file, const char* variable); - void GetPeakMean(const char* variable, Int_t treeID, /*Int_t energy,*/ TCanvas *canvas, const char* beamcut, const Int_t nbins = 4096, Int_t lowRange = 0); + //One of the crucial function. It founds the mean of the peak related to our particle. + void GetPeakMean(const char* variable, Int_t treeID, TCanvas *canvas, + const char* beamcut, const Int_t nbins = 4096, Int_t lowRange = 0); void Calibrate(TCanvas *canvas, Bool_t savefile = 0, const char* filename = "", const char* option = "READ"); void WriteClbParameters(const char* filename); diff --git a/html.cxx b/html.cxx deleted file mode 100755 index acc65a4861d28f0afd8fea01ab663ee1e319d421..0000000000000000000000000000000000000000 --- a/html.cxx +++ /dev/null @@ -1,11 +0,0 @@ -{ - gSystem->Load("./libAculData.so"); - gSystem->Load("./libTELoss.so"); - - THtml h; - - h.SetInputDir("."); - - h.MakeAll(); - -} diff --git a/htmldoc.cxx b/htmldoc.cxx new file mode 100755 index 0000000000000000000000000000000000000000..354a52332b42b2b60df38ea487897af7d844b443 --- /dev/null +++ b/htmldoc.cxx @@ -0,0 +1,18 @@ +#include "THtml.h" + +void htmldoc() +{ + gSystem->Load("./libTELoss.so"); + gSystem->Load("./libAculCalib.so"); + gSystem->Load("./libAculData.so"); + + THtml h; + + h.SetInputDir("."); + h.SetOutputDir("htmldoc"); + h.SetProductName("AculUtils"); + + + h.MakeAll(); + +} diff --git a/makefile b/makefile index f42f9b55558e72b641bb6fa58262a6c902de854f..aaea1ba37eeb46d09ed09be3ed510349a45d707f 100755 --- a/makefile +++ b/makefile @@ -40,7 +40,11 @@ all: libAculData.so \ #ROOT html documentation, it will be done as a program which will be alsa compiled by this makefile, program will be as a last condition after all of the libraries htmldoc: libAculData.so libAculCalib.so libTELoss.so -$(RM) htmldoc - root -l -q html.cxx + root -l -q htmldoc.cxx + +clean_htmldoc: + -$(RM) htmldoc + -@echo ' ' clean: -$(RM) $(ACULDATAOBJS) $(ACULDATACPP_DEPS)