PandaRoot
BSEmcCounter Class Reference

Simple Process that prints every 100 Events the number of events. More...

#include <BSEmcCounter.h>

Inheritance diagram for BSEmcCounter:
PndProcess

Public Member Functions

virtual void Process ()
 The actual data transformation (digitizing, clustering, etc.) should be defined here. More...
 
virtual void SetupParameters (const PndParameterRegister *)
 Fetch all parameters from the PndParameterRegister. More...
 
- Public Member Functions inherited from PndProcess
 PndProcess ()
 
 PndProcess (const std::string &t_processname)
 
virtual ~PndProcess ()
 
virtual void SetDetectorName (const std::string &t_detectorname)
 Set the Detector name. Important, as most EmcParameter need to know for which detector they need to be fetched (each Emc Subdetector has its own set of parameters) More...
 
const std::vector< std::string > & GetListOfRequiredParameters () const
 Get the List Of Required Parameters. More...
 
virtual void RequestDataContainer (PndContainerRegister *)
 Pass the container register to the process, and get the processes container requirements. More...
 
virtual void GetDataContainer (PndContainerRegister *)
 Pass the container register to the process, and set the processes container requirements. More...
 
virtual void PreProcess ()
 PreProcess() is called before the actual Process() call in each event. More...
 
virtual void PostProcess ()
 Immediately after calling Process() PostProcess() is called for cleanup of internal process data, or if not needed, to end the time and memory increase measurement started by PreProcess() More...
 
virtual void TearDown ()
 Last actions at the end of the run. More...
 

Additional Inherited Members

- Protected Attributes inherited from PndProcess
std::vector< std::string > fParameterList {}
 Parameter names required by this PndProcess. Needs to be populated in derived class. More...
 
std::string fDetectorName {""}
 Set Detector name this PndProcess transforms data for. Required for example by EMC Processes to fetch right parameters. More...
 
std::string fProcessName {"PndProcess"}
 Name of current PndProcess (for debugging) More...
 
TStopwatch fTimer {}
 Timer to monitor Process() time. More...
 
Double_t fTotalTime {0}
 Time taken by this Process' Process() More...
 
ProcInfo_t fProcInfo
 Helper to access cpu process Memory Info. More...
 
Long_t fLastMemSize
 

Detailed Description

Simple Process that prints every 100 Events the number of events.

Author
Ben Salisbury salis.nosp@m.bury.nosp@m.@hisk.nosp@m.p.un.nosp@m.i-bon.nosp@m.n.de, HISKP Bonn
Date
2021-02

Definition at line 19 of file BSEmcCounter.h.

Member Function Documentation

◆ Process()

virtual void BSEmcCounter::Process ( )
inlinevirtual

The actual data transformation (digitizing, clustering, etc.) should be defined here.

Implements PndProcess.

Definition at line 21 of file BSEmcCounter.h.

22  {
23  if (fEventnumber % 100 == 0) {
24  fTimer.Stop();
25  Double_t realTime = fTimer.RealTime();
26  fTotalTime += realTime;
27  if (fEventnumber > 0) {
28  LOG(info) << "Event: " << fEventnumber << " - Last 100 Events took " << realTime << " s - expeting to finish in "
29  << (fTotalTime) * ((Double_t)fTotalEventNumber / (Double_t)(fEventnumber)-1);
30  }
31  fTimer.Reset();
32  fTimer.Start();
33  }
34  ++fEventnumber;
35  }

◆ SetupParameters()

virtual void BSEmcCounter::SetupParameters ( const PndParameterRegister t_parameter)
inlinevirtual

Fetch all parameters from the PndParameterRegister.

Parameters
t_parameter

Implements PndProcess.

Definition at line 37 of file BSEmcCounter.h.

38  {
39  fTotalEventNumber = FairRootManager::Instance()->CheckMaxEventNo();
40  fTimer.Start();
41  };

The documentation for this class was generated from the following file: