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
f5673e3f
Commit
f5673e3f
authored
1 year ago
by
Sergei Zharko
Browse files
Options
Downloads
Patches
Plain Diff
hist-server: user interruption handling
parent
8b306b63
No related branches found
No related tags found
1 merge request
!1746
hist-server: user interruption handling
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/histserv/app/Application.cxx
+572
-543
572 additions, 543 deletions
services/histserv/app/Application.cxx
services/histserv/app/Application.h
+39
-14
39 additions, 14 deletions
services/histserv/app/Application.h
with
611 additions
and
557 deletions
services/histserv/app/Application.cxx
+
572
−
543
View file @
f5673e3f
This diff is collapsed.
Click to expand it.
services/histserv/app/Application.h
+
39
−
14
View file @
f5673e3f
...
...
@@ -5,17 +5,17 @@
#ifndef CBM_SERVICES_HISTSERV_APP_APPLICATION_H
#define CBM_SERVICES_HISTSERV_APP_APPLICATION_H 1
#include
"ProgramOptions.h"
#include
"THttpServer.h"
#include
"TObjArray.h"
#include
"ui_callbacks.h"
#include
<csignal>
#include
<memory>
#include
<string>
#include
<thread>
#include
<zmq.hpp>
#include
"ProgramOptions.h"
#include
"ui_callbacks.h"
class
TCanvas
;
class
TNamed
;
...
...
@@ -44,18 +44,43 @@ namespace cbm::services::histserv
private:
//const std::string& ConfigFile() const;
bool
ReceiveData
(
zmq
::
message_t
&
msg
);
bool
ReceiveHistoConfig
(
zmq
::
message_t
&
msg
);
bool
ReceiveCanvasConfig
(
zmq
::
message_t
&
msg
);
bool
ReceiveConfigAndData
(
std
::
vector
<
zmq
::
message_t
>&
vMsg
);
/// \brief Receives histograms
bool
ReceiveData
(
zmq
::
message_t
&
msg
);
/// \brief Receives histogram configuration
bool
ReceiveHistoConfig
(
zmq
::
message_t
&
msg
);
/// \brief Receives canvas configuration
bool
ReceiveCanvasConfig
(
zmq
::
message_t
&
msg
);
/// \brief Receives a list of canvases and histograms
/// \param vMsg Message with the histograms and canvases list
bool
ReceiveConfigAndData
(
std
::
vector
<
zmq
::
message_t
>&
vMsg
);
/// \brief Read a histogram
/// \tparam HistoT Histogram type
/// \param pHist Pointer to the histogram
template
<
class
HistoT
>
bool
ReadHistogram
(
HistoT
*
pHist
);
/// \brief Find histogram index in the histogram array
/// \param name A name of the histogram
int
FindHistogram
(
const
std
::
string
&
name
);
/// \brief Prepares canvases using received canvas configuration
/// \param uCanvIdx Index of canvas
bool
PrepareCanvas
(
uint32_t
uCanvIdx
);
/// \brief Resets handled histograms
bool
ResetHistograms
();
/// \brief Saves handled histograms
bool
SaveHistograms
();
template
<
class
HistoT
>
bool
ReadHistogram
(
HistoT
*
pHist
);
int
FindHistogram
(
const
std
::
string
&
name
);
bool
PrepareCanvas
(
uint32_t
uCanvIdx
);
/// \brief A handler for system signals
/// \param signal Signal ID
//static void SignalHandler(int signal);
bool
ResetHistograms
();
bool
SaveHistograms
();
private:
ProgramOptions
const
&
fOpt
;
///< Program options object
...
...
@@ -74,7 +99,7 @@ namespace cbm::services::histserv
/// Vector of string with ( HistoName, FolderPath ) to configure the histogram
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
fvpsHistosFolder
=
{};
/// Vector of string pairs with ( CanvasName, CanvasConfig ) to configure the canvases and histos within
/// Format of Can config is "Name;Title;NbPadX(U);NbPadY(U);ConfigPad
1
(s);....;ConfigPadXY(s)"
/// Format of Can config is "Name;Title;NbPadX(U);NbPadY(U);ConfigPad
2
(s);....;ConfigPadXY(s)"
/// Format of Pad config is "GrixX(b),GridY(b),LogX(b),LogY(b),LogZ(b),HistoName(s),DrawOptions(s)"
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
fvpsCanvasConfig
=
{};
std
::
vector
<
bool
>
fvbCanvasReady
=
{};
...
...
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