ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
16#include <TH1.h>
17#include <TList.h>
18
19//
20// method implementations
21//
22
23namespace 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}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
the data the EventLoop core classes are sharing with the Module implementation
Definition ModuleData.h:64