Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
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
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
Computing
cbmroot
Commits
f09b9e81
Commit
f09b9e81
authored
1 year ago
by
Sergei Zharko
Browse files
Options
Downloads
Patches
Plain Diff
CA: the life-time of L1ConfigRW object was limited
parent
9d898740
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1302
CA: New scheme of CA tracking parameterisation
Pipeline
#23886
passed
1 year ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/L1/L1Algo/L1InitManager.cxx
+12
-1
12 additions, 1 deletion
reco/L1/L1Algo/L1InitManager.cxx
reco/L1/L1Algo/L1InitManager.h
+15
-13
15 additions, 13 deletions
reco/L1/L1Algo/L1InitManager.h
with
27 additions
and
14 deletions
reco/L1/L1Algo/L1InitManager.cxx
+
12
−
1
View file @
f09b9e81
...
...
@@ -18,6 +18,7 @@
#include
"L1Algo.h"
#include
"L1Assert.h"
#include
"L1ConfigRW.h"
using
L1Constants
::
clrs
::
kCL
;
// end colored log
using
L1Constants
::
clrs
::
kGNb
;
// bold green log
...
...
@@ -106,7 +107,7 @@ bool L1InitManager::FormParametersContainer()
// Read configuration files
LOG
(
info
)
<<
"L1InitManager: reading parameter configuration ..."
;
try
{
fConfigRW
.
Read
();
this
->
ReadInputConfigs
();
LOG
(
info
)
<<
"L1InitManager: reading parameter configuration ...
\033
[1;32mdone
\033
[0m"
;
}
catch
(
const
std
::
runtime_error
&
err
)
{
...
...
@@ -289,6 +290,16 @@ void L1InitManager::PushBackCAIteration(const L1CAIteration& iteration)
fParameters
.
fCAIterations
.
push_back
(
iteration
);
}
// ---------------------------------------------------------------------------------------------------------------------
//
void
L1InitManager
::
ReadInputConfigs
()
{
L1ConfigRW
configRW
=
L1ConfigRW
(
this
,
4
);
configRW
.
SetMainConfigPath
(
fsConfigInputMain
);
configRW
.
SetUserConfigPath
(
fsConfigInputUser
);
configRW
.
Read
();
}
// ---------------------------------------------------------------------------------------------------------------------
//
void
L1InitManager
::
ReadParametersObject
(
const
std
::
string
&
fileName
)
...
...
This diff is collapsed.
Click to expand it.
reco/L1/L1Algo/L1InitManager.h
+
15
−
13
View file @
f09b9e81
...
...
@@ -19,7 +19,6 @@
#include
"L1BaseStationInfo.h"
#include
"L1CAIteration.h"
#include
"L1ConfigRW.h"
#include
"L1Constants.h"
#include
"L1EArray.h"
#include
"L1Field.h"
...
...
@@ -139,10 +138,6 @@ public:
/// \return Success flag
bool
FormParametersContainer
();
/// @brief Accessor to configuration module
/// @return Reference to configuration module
L1ConfigRW
&
GetConfigRW
()
{
return
fConfigRW
;
}
/// @brief Gets name of the detector
/// @param detId Index of the detector
/// @return Name of the detector
...
...
@@ -151,8 +146,11 @@ public:
/// Gets ghost suppression flag
int
GetGhostSuppression
()
const
{
return
fParameters
.
fGhostSuppression
;
}
/// Gets a name of the input configuration file
const
std
::
string
&
GetInputConfigName
()
const
{
return
fConfigInputName
;
}
/// @brief Gets a name of the main input configuration file
const
std
::
string
&
GetInputConfigMain
()
const
{
return
fsConfigInputMain
;
}
/// @brief Gets a name of the user input configuration file
const
std
::
string
&
GetInputConfigUser
()
const
{
return
fsConfigInputMain
;
}
/// Gets a const reference to L1ObjectInitController
const
InitController_t
&
GetInitController
()
const
{
return
fInitController
;
}
...
...
@@ -196,6 +194,9 @@ public:
/// Pushes an CA track finder iteration into a sequence of iteration using std::unique_ptr
void
PushBackCAIteration
(
const
std
::
unique_ptr
<
L1CAIteration
>&
puIteration
)
{
PushBackCAIteration
(
*
puIteration
);
}
/// @brief Reads main and user parameters configs
void
ReadInputConfigs
();
/// Reads parameters object from boost-serialized binary file
/// \param fileName Name of input file
void
ReadParametersObject
(
const
std
::
string
&
fileName
);
...
...
@@ -211,15 +212,15 @@ public:
void
SetCAIterationsNumberCrosscheck
(
int
nIterations
);
/// @brief Sets base configuration file
/// @param
base
Config Path to
base
configuration file
/// @param
main
Config Path to
main
configuration file
/// @note The base configuraiton file is mandatory until the tracking configuration is initialized from
/// beforehand created L1Parameters file.
void
SetConfigMain
(
const
std
::
string
&
base
Config
)
{
fConfig
RW
.
SetMainConfigPath
(
base
Config
)
;
}
void
SetConfigMain
(
const
std
::
string
&
main
Config
)
{
f
s
Config
InputMain
=
main
Config
;
}
/// @brief Sets user configuration file
/// @param userConfig Path to user configuration file
/// @note The user configuraiton file is optional
void
SetConfigUser
(
const
std
::
string
&
userConfig
)
{
fConfig
RW
.
SetUserConfigPath
(
userConfig
)
;
}
void
SetConfigUser
(
const
std
::
string
&
userConfig
)
{
f
s
Config
InputUser
=
userConfig
;
}
/// @brief Sets detector names
/// @param container Container of the detector names
...
...
@@ -348,9 +349,10 @@ private:
L1Parameters
fParameters
{};
///< L1Algo parameters object
// * Configuration related *
std
::
string
fConfigInputName
{
""
};
///< name for the input configuration file
std
::
string
fConfigOutputName
{
""
};
///< name for the output configuration file
L1ConfigRW
fConfigRW
{
this
,
/*verbose = */
4
};
///< configuration file reader and writer
std
::
string
fsConfigInputMain
=
""
;
///< name for the input configuration file
std
::
string
fsConfigInputUser
=
""
;
///< name for the input configuration file
std
::
string
fConfigOutputName
=
""
;
///< name for the output configuration file
//L1ConfigRW fConfigRW {this, /*verbose = */ 4}; ///< configuration file reader and writer
};
#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