ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
EventCountModule.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
EventLoop/EventCountModule.h
>
14
15
#include <
EventLoop/ModuleData.h
>
16
#include <TH1.h>
17
#include <TList.h>
18
19
//
20
// method implementations
21
//
22
23
namespace
EL
24
{
25
namespace
Detail
26
{
27
StatusCode
EventCountModule ::
28
postFinalize (
ModuleData
& data)
29
{
30
auto
eventCount = std::make_unique<TH1D>
31
(
"EventLoop_EventCount"
,
"number of events per algorithm"
,
32
data.m_algs.size()+1, 0, data.m_algs.size()+1);
33
eventCount->SetDirectory (
nullptr
);
34
35
for
(std::size_t iter = 0; iter != data.m_algs.size(); ++ iter)
36
eventCount->Fill (iter, data.m_algs[iter].m_executeCount);
37
38
// count the number of events that passed all algorithms without
39
// skipping
40
if
(data.m_algs.size() > 0)
41
{
42
eventCount->Fill (data.m_algs.size(), data.m_algs.back().m_executeCount - data.m_algs.back().m_skipCount);
43
}
else
44
{
45
eventCount->Fill (data.m_algs.size(), data.m_eventsProcessed);
46
}
47
48
data.addOutput (std::move (eventCount));
49
return
StatusCode::SUCCESS;
50
}
51
}
52
}
EventCountModule.h
ModuleData.h
EL::Detail
Definition
AsgComponentFactories.h:20
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition
ModuleData.h:65
Generated on
for ATLAS Offline Software by
1.17.0