Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AculUtils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AccullinaGroup
AculUtils
Commits
3f011dec
Commit
3f011dec
authored
Nov 02, 2016
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments to some classes added.
parent
b2df0db4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
25 deletions
+122
-25
AculCalib.cpp
AculCalib/AculCalib.cpp
+16
-5
AculCalib.h
AculCalib/AculCalib.h
+20
-9
AculCalibScint.h
AculCalib/AculCalibScint.h
+63
-10
htmldoc.cxx
htmldoc.cxx
+18
-0
makefile
makefile
+5
-1
No files found.
AculCalib/AculCalib.cpp
View file @
3f011dec
#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
\t
a
\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
);
AculCalib/AculCalib.h
View file @
3f011dec
////////////////////////////////////////////////////////////////
// //
// 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
<
Double_t
>
fA
;
vector
<
Double_t
>
fB
;
vector
<
Double_t
>
fA
;
//calibration parameter A
vector
<
Double_t
>
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
AculCalib/AculCalibScint.h
View file @
3f011dec
//////////////////////////////////////////////////////////////////////////////
// //
// 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
<
TH1I
*>
>
fHistFull
;
vector
<
vector
<
TH1I
*>
>
fHistCut
;
//
vector
<
vector
<
Double_t
>
>
fMeanPeakPos
;
vector
<
vector
<
Double_t
>
>
fMeanPeakPos
;
//doc of class member
vector
<
vector
<
Double_t
>
>
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
);
...
...
html.cxx
→
html
doc
.cxx
View file @
3f011dec
#include "THtml.h"
void
htmldoc
()
{
gSystem
->
Load
(
"./libAculData.so"
);
gSystem
->
Load
(
"./libTELoss.so"
);
gSystem
->
Load
(
"./libAculCalib.so"
);
gSystem
->
Load
(
"./libAculData.so"
);
THtml
h
;
h
.
SetInputDir
(
"."
);
h
.
SetOutputDir
(
"htmldoc"
);
h
.
SetProductName
(
"AculUtils"
);
h
.
MakeAll
();
...
...
makefile
View file @
3f011dec
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment