Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jlab
hallc
analyzer_software
hcana
Commits
1dcfbe29
Commit
1dcfbe29
authored
7 years ago
by
Stephen A. Wood
Committed by
Mark K Jones
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplify ThcReactionPoint by inheriting from THaReactionPoint.
Just replaces Process method.
parent
4f43edec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcReactionPoint.cxx
+2
-45
2 additions, 45 deletions
src/THcReactionPoint.cxx
src/THcReactionPoint.h
+2
-31
2 additions, 31 deletions
src/THcReactionPoint.h
with
4 additions
and
76 deletions
src/THcReactionPoint.cxx
+
2
−
45
View file @
1dcfbe29
//*-- Author :
Ole Hansen 13-Mar-03
//*-- Author :
Mark Jones, March 2018
#include
"THcReactionPoint.h"
#include
"THaSpectrometer.h"
...
...
@@ -19,8 +19,7 @@ ClassImp(THcReactionPoint)
//_____________________________________________________________________________
THcReactionPoint
::
THcReactionPoint
(
const
char
*
name
,
const
char
*
description
,
const
char
*
spectro
,
const
char
*
beam
)
:
THaPhysicsModule
(
name
,
description
),
fSpectroName
(
spectro
),
fBeamName
(
beam
),
fSpectro
(
NULL
),
fBeam
(
NULL
)
THaReactionPoint
(
name
,
description
,
spectro
,
beam
)
{
// Normal constructor.
...
...
@@ -34,48 +33,6 @@ THcReactionPoint::~THcReactionPoint()
DefineVariables
(
kDelete
);
}
//_____________________________________________________________________________
void
THcReactionPoint
::
Clear
(
Option_t
*
opt
)
{
// Clear all event-by-event variables.
THaPhysicsModule
::
Clear
(
opt
);
VertexClear
();
}
//_____________________________________________________________________________
Int_t
THcReactionPoint
::
DefineVariables
(
EMode
mode
)
{
// Define/delete analysis variables
if
(
mode
==
kDefine
&&
fIsSetup
)
return
kOK
;
fIsSetup
=
(
mode
==
kDefine
);
return
DefineVarsFromList
(
THaVertexModule
::
GetRVarDef
(),
mode
);
}
//_____________________________________________________________________________
THaAnalysisObject
::
EStatus
THcReactionPoint
::
Init
(
const
TDatime
&
run_time
)
{
// Initialize the module.
// Locate the spectrometer apparatus named in fSpectroName and save
// pointer to it.
// Standard initialization. Calls this object's DefineVariables().
if
(
THaPhysicsModule
::
Init
(
run_time
)
!=
kOK
)
return
fStatus
;
fSpectro
=
static_cast
<
THaSpectrometer
*>
(
FindModule
(
fSpectroName
.
Data
(),
"THaSpectrometer"
));
if
(
!
fSpectro
)
return
fStatus
;
if
(
fBeamName
.
Length
()
>
0
)
fBeam
=
static_cast
<
THaBeam
*>
(
FindModule
(
fBeamName
.
Data
(),
"THaBeam"
)
);
return
fStatus
;
}
//_____________________________________________________________________________
Int_t
THcReactionPoint
::
Process
(
const
THaEvData
&
)
{
...
...
This diff is collapsed.
Click to expand it.
src/THcReactionPoint.h
+
2
−
31
View file @
1dcfbe29
...
...
@@ -7,49 +7,20 @@
//
//////////////////////////////////////////////////////////////////////////
#include
"THaPhysicsModule.h"
#include
"THaVertexModule.h"
#include
"TString.h"
#include
"THaReactionPoint.h"
class
THaSpectrometer
;
class
THaBeam
;
class
THcReactionPoint
:
public
THaPhysicsModule
,
public
THaVertexModule
{
class
THcReactionPoint
:
public
THaReactionPoint
{
public:
THcReactionPoint
(
const
char
*
name
,
const
char
*
description
,
const
char
*
spectro
=
""
,
const
char
*
beam
=
""
);
virtual
~
THcReactionPoint
();
virtual
void
Clear
(
Option_t
*
opt
=
""
);
virtual
EStatus
Init
(
const
TDatime
&
run_time
);
virtual
Int_t
Process
(
const
THaEvData
&
);
void
SetSpectrometer
(
const
char
*
name
);
void
SetBeam
(
const
char
*
name
);
protected:
TString
fSpectroName
;
// Name of spectrom. to consider
TString
fBeamName
;
// Name of beam position apparatus
THaSpectrometer
*
fSpectro
;
// Pointer to spectrometer object
THaBeam
*
fBeam
;
// Pointer to beam position apparatus
virtual
Int_t
DefineVariables
(
EMode
mode
=
kDefine
);
ClassDef
(
THcReactionPoint
,
0
)
//Single arm track-beam vertex module
};
//_________ inlines __________________________________________________________
inline
void
THcReactionPoint
::
SetSpectrometer
(
const
char
*
name
)
{
fSpectroName
=
name
;
}
//_____________________________________________________________________________
inline
void
THcReactionPoint
::
SetBeam
(
const
char
*
name
)
{
fBeamName
=
name
;
}
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment