Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cmsos
worksuite
Commits
ca4f5a12
Commit
ca4f5a12
authored
Apr 23, 2022
by
Andrea Petrucci
Browse files
references #295: first version of disable monitoring information when a BU is not used
parent
7f1f6ccd
Changes
8
Hide whitespace changes
Inline
Side-by-side
evb/include/evb/bu/DiskWriter.h
View file @
ca4f5a12
...
...
@@ -106,6 +106,7 @@ namespace evb {
*/
uint32_t
getNbLumiSections
()
const
;
void
resetMonitoringCounters
();
private:
...
...
@@ -135,7 +136,6 @@ namespace evb {
bool
getReadyFileInfo
(
FileInfoPtr
&
);
bool
populateFileInfo
(
FileInfoPtr
&
);
void
resetMonitoringCounters
();
void
startFileAccounting
();
bool
idle
()
const
;
bool
fileAccounting
(
toolbox
::
task
::
WorkLoop
*
);
...
...
evb/include/evb/bu/EventBuilder.h
View file @
ca4f5a12
...
...
@@ -122,6 +122,7 @@ namespace evb {
*/
uint64_t
getNbEventsMissingData
()
const
;
void
resetMonitoringCounters
();
private:
...
...
evb/include/evb/bu/RUproxy.h
View file @
ca4f5a12
...
...
@@ -118,10 +118,10 @@ namespace evb {
*/
void
lumisectionInfoCallback
(
toolbox
::
mem
::
Reference
*
);
void
resetMonitoringCounters
();
private:
void
resetMonitoringCounters
();
void
getApplicationDescriptors
();
void
startEventFragmentWorkLoop
();
void
startRequestFragmentsWorkLoop
();
...
...
evb/include/evb/bu/ResourceManager.h
View file @
ca4f5a12
...
...
@@ -194,13 +194,14 @@ namespace evb {
void
setBlacklistedFUcount
(
const
uint16_t
count
)
{
blacklistedFUcount_
=
count
;
}
void
resetMonitoringCounters
();
private:
using
EvBidList
=
std
::
list
<
EvBid
>
;
using
LumiSectionAccounts
=
std
::
map
<
uint32_t
,
LumiSectionAccountPtr
>
;
void
resetMonitoringCounters
();
void
incrementEventsInLumiSection
(
const
EvBidList
&
);
void
eventCompletedForLumiSection
(
const
uint32_t
lumiSection
);
LumiSectionAccounts
::
const_iterator
getLumiSectionAccount
(
const
uint32_t
lumiSection
);
...
...
evb/include/evb/bu/States.h
View file @
ca4f5a12
...
...
@@ -147,6 +147,8 @@ namespace evb {
virtual
~
Halted
()
{
safeExitAction
();
}
virtual
void
entryAction
();
void
activity
();
};
...
...
evb/include/evb/version.h
View file @
ca4f5a12
...
...
@@ -5,8 +5,8 @@
#define WORKSUITE_EVB_VERSION_MAJOR 6
#define WORKSUITE_EVB_VERSION_MINOR 9
#define WORKSUITE_EVB_VERSION_PATCH
7
#define WORKSUITE_EVB_PREVIOUS_VERSIONS "6.5.0,6.5.1,6.5.2,6.6.0,6.6.1,6.7.0,6.7.1,6.8.0,6.8.1,6.8.2,6.9.0,6.9.1,6.9.2,6.9.3,6.9.4,6.9.5,6.9.6"
#define WORKSUITE_EVB_VERSION_PATCH
8
#define WORKSUITE_EVB_PREVIOUS_VERSIONS "6.5.0,6.5.1,6.5.2,6.6.0,6.6.1,6.7.0,6.7.1,6.8.0,6.8.1,6.8.2,6.9.0,6.9.1,6.9.2,6.9.3,6.9.4,6.9.5,6.9.6
,6.9.7
"
#define WORKSUITE_EVB_VERSION_CODE PACKAGE_VERSION_CODE(WORKSUITE_EVB_VERSION_MAJOR,WORKSUITE_EVB_VERSION_MINOR,WORKSUITE_EVB_VERSION_PATCH)
#ifndef WORKSUITE_EVB_PREVIOUS_VERSIONS
...
...
evb/src/common/bu/EventBuilder.cc
View file @
ca4f5a12
...
...
@@ -114,6 +114,21 @@ void evb::bu::EventBuilder::createProcessingWorkLoops()
}
}
void
evb
::
bu
::
EventBuilder
::
resetMonitoringCounters
()
{
for
(
auto
&
monitor
:
eventMapMonitors_
)
{
monitor
.
second
.
reset
();
}
{
std
::
lock_guard
<
std
::
mutex
>
guard
(
errorCountMutex_
);
corruptedEvents_
=
0
;
eventsWithCRCerrors_
=
0
;
eventsMissingData_
=
0
;
}
}
void
evb
::
bu
::
EventBuilder
::
startProcessing
(
const
uint32_t
runNumber
)
{
...
...
evb/src/common/bu/StateMachine.cc
View file @
ca4f5a12
...
...
@@ -25,6 +25,51 @@ evb::bu::StateMachine::StateMachine
resourceManager_
(
resourceManager
)
{}
void
evb
::
bu
::
Halted
::
entryAction
()
{
auto
thread
=
std
::
thread
(
&
evb
::
bu
::
Halted
::
activity
,
this
);
thread
.
detach
();
// otherwise, the thread tries to destruct itself on exiting this state
}
void
evb
::
bu
::
Halted
::
activity
()
{
outermost_context_type
&
stateMachine
=
outermost_context
();
std
::
string
msg
=
"Failed to reset counter"
;
try
{
outermost_context_type
&
stateMachine
=
outermost_context
();
if
(
stateMachine
.
bu
()
->
getConfiguration
()
->
useLock
)
stateMachine
.
acquireLock
();
stateMachine
.
resourceManager
()
->
resetMonitoringCounters
();
stateMachine
.
ruProxy
()
->
resetMonitoringCounters
();
stateMachine
.
eventBuilder
()
->
resetMonitoringCounters
();
stateMachine
.
diskWriter
()
->
resetMonitoringCounters
();
}
catch
(
xcept
::
Exception
&
e
)
{
XCEPT_DECLARE_NESTED
(
exception
::
FSM
,
sentinelException
,
msg
,
e
);
stateMachine
.
processFSMEvent
(
Fail
(
sentinelException
)
);
}
catch
(
std
::
exception
&
e
)
{
msg
+=
": "
;
msg
+=
e
.
what
();
XCEPT_DECLARE
(
exception
::
FSM
,
sentinelException
,
msg
);
stateMachine
.
processFSMEvent
(
Fail
(
sentinelException
)
);
}
catch
(...)
{
msg
+=
": unknown exception"
;
XCEPT_DECLARE
(
exception
::
FSM
,
sentinelException
,
msg
);
stateMachine
.
processFSMEvent
(
Fail
(
sentinelException
)
);
}
}
void
evb
::
bu
::
Configuring
::
entryAction
()
{
...
...
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