CbmRoot
CbmMcbm2019TimeWinEventBuilderTask Class Reference

#include <CbmMcbm2019TimeWinEventBuilderTask.h>

Inheritance diagram for CbmMcbm2019TimeWinEventBuilderTask:
[legend]
Collaboration diagram for CbmMcbm2019TimeWinEventBuilderTask:
[legend]

Public Member Functions

 CbmMcbm2019TimeWinEventBuilderTask ()
 
 CbmMcbm2019TimeWinEventBuilderTask (const CbmMcbm2019TimeWinEventBuilderTask &)=delete
 
CbmMcbm2019TimeWinEventBuilderTask operator= (const CbmMcbm2019TimeWinEventBuilderTask &)=delete
 
 ~CbmMcbm2019TimeWinEventBuilderTask ()
 
virtual InitStatus Init ()
 
virtual InitStatus ReInit ()
 
virtual void Exec (Option_t *)
 
virtual void SetParContainers ()
 
virtual void Finish ()
 
void SetFillHistos (Bool_t bFlag=kTRUE)
 
void SetOutFilename (TString sNameIn)
 
void SetReferenceDetector (ECbmModuleId refDet) __attribute__((deprecated))
 
void AddDetector (ECbmModuleId selDet) __attribute__((deprecated))
 
void RemoveDetector (ECbmModuleId selDet) __attribute__((deprecated))
 
void SetReferenceDetector (EventBuilderDetector refDet)
 
void AddDetector (EventBuilderDetector selDet)
 
void RemoveDetector (EventBuilderDetector selDet)
 
void SetTriggerMinNumber (ECbmModuleId selDet, UInt_t uVal)
 
void SetTriggerMaxNumber (ECbmModuleId selDet, Int_t iVal)
 
void SetTriggerWindow (ECbmModuleId det, Double_t dWinBeg, Double_t dWinEnd)
 
void SetEventOverlapMode (EOverlapMode mode)
 
void SetIgnoreTsOverlap (Bool_t bFlagIn)
 

Private Member Functions

void FillOutput ()
 
void SaveHistos ()
 
 ClassDef (CbmMcbm2019TimeWinEventBuilderTask, 1)
 

Private Attributes

CbmMcbm2019TimeWinEventBuilderAlgofpAlgo = nullptr
 
TClonesArray * fEvents = nullptr
 
Bool_t fbFillHistos {kTRUE}
 output container of CbmEvents More...
 
TString fsOutFileName {"data/HistosEvtWin.root"}
 Switch ON/OFF filling of histograms. More...
 

Detailed Description

Definition at line 29 of file CbmMcbm2019TimeWinEventBuilderTask.h.

Constructor & Destructor Documentation

◆ CbmMcbm2019TimeWinEventBuilderTask() [1/2]

CbmMcbm2019TimeWinEventBuilderTask::CbmMcbm2019TimeWinEventBuilderTask ( )

Default constructor

Create Algo. To be made generic/switchable when more event building algo are available!

Definition at line 23 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References fpAlgo.

◆ CbmMcbm2019TimeWinEventBuilderTask() [2/2]

CbmMcbm2019TimeWinEventBuilderTask::CbmMcbm2019TimeWinEventBuilderTask ( const CbmMcbm2019TimeWinEventBuilderTask )
delete

◆ ~CbmMcbm2019TimeWinEventBuilderTask()

CbmMcbm2019TimeWinEventBuilderTask::~CbmMcbm2019TimeWinEventBuilderTask ( )

Constructor with parameters (Optional) Destructor

Definition at line 30 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

Member Function Documentation

◆ AddDetector() [1/2]

void CbmMcbm2019TimeWinEventBuilderTask::AddDetector ( ECbmModuleId  selDet)

◆ AddDetector() [2/2]

void CbmMcbm2019TimeWinEventBuilderTask::AddDetector ( EventBuilderDetector  selDet)

◆ ClassDef()

CbmMcbm2019TimeWinEventBuilderTask::ClassDef ( CbmMcbm2019TimeWinEventBuilderTask  ,
 
)
private

◆ Exec()

void CbmMcbm2019TimeWinEventBuilderTask::Exec ( Option_t *  )
virtual

Executed for each event.

Call Algo ProcessTs method

Save the resulting vector of events in TClonesArray

Definition at line 60 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References FillOutput(), fpAlgo, and CbmMcbm2019TimeWinEventBuilderAlgo::ProcessTs().

◆ FillOutput()

void CbmMcbm2019TimeWinEventBuilderTask::FillOutput ( )
private

Clear TClonesArray before usage.

Get vector reference from algo

Move CbmEvent from temporary vector to TClonesArray

Clear event vector after usage

Definition at line 81 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References CbmMcbm2019TimeWinEventBuilderAlgo::ClearEventVector(), fEvents, fpAlgo, CbmMcbm2019TimeWinEventBuilderAlgo::GetEventVector(), and Cbm::ToString().

Referenced by Exec().

◆ Finish()

void CbmMcbm2019TimeWinEventBuilderTask::Finish ( )
virtual

Finish task called at the end of the run

Call Algo finish method

Definition at line 73 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References fbFillHistos, CbmMcbm2019TimeWinEventBuilderAlgo::Finish(), fpAlgo, and SaveHistos().

◆ Init()

InitStatus CbmMcbm2019TimeWinEventBuilderTask::Init ( )
virtual

Initiliazation of task at the beginning of a run

Get a handle from the IO manager

Register output array (CbmEvent)

Call Algo Init method

Definition at line 38 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References fEvents, fpAlgo, and CbmMcbm2019TimeWinEventBuilderAlgo::InitAlgo().

◆ operator=()

CbmMcbm2019TimeWinEventBuilderTask CbmMcbm2019TimeWinEventBuilderTask::operator= ( const CbmMcbm2019TimeWinEventBuilderTask )
delete

◆ ReInit()

InitStatus CbmMcbm2019TimeWinEventBuilderTask::ReInit ( )
virtual

ReInitiliazation of task when the runID changes

Definition at line 57 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

◆ RemoveDetector() [1/2]

void CbmMcbm2019TimeWinEventBuilderTask::RemoveDetector ( ECbmModuleId  selDet)

◆ RemoveDetector() [2/2]

void CbmMcbm2019TimeWinEventBuilderTask::RemoveDetector ( EventBuilderDetector  selDet)

◆ SaveHistos()

void CbmMcbm2019TimeWinEventBuilderTask::SaveHistos ( )
private

Obtain vector of pointers on each histo from the algo (+ optionally desired folder)

(Re-)Create ROOT file to store the histos

Store current directory position to allow restore later

open separate histo file in recreate mode

Save all plots and create folders if needed

Make sure we end up in chosen folder

Write plot

Restore original directory position

Definition at line 102 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References fpAlgo, fsOutFileName, and CbmMcbm2019TimeWinEventBuilderAlgo::GetHistoVector().

Referenced by Finish().

◆ SetEventOverlapMode()

void CbmMcbm2019TimeWinEventBuilderTask::SetEventOverlapMode ( EOverlapMode  mode)

◆ SetFillHistos()

void CbmMcbm2019TimeWinEventBuilderTask::SetFillHistos ( Bool_t  bFlag = kTRUE)

◆ SetIgnoreTsOverlap()

void CbmMcbm2019TimeWinEventBuilderTask::SetIgnoreTsOverlap ( Bool_t  bFlagIn)

◆ SetOutFilename()

void CbmMcbm2019TimeWinEventBuilderTask::SetOutFilename ( TString  sNameIn)

Definition at line 138 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

References fsOutFileName.

◆ SetParContainers()

void CbmMcbm2019TimeWinEventBuilderTask::SetParContainers ( )
virtual

Load the parameter container from the runtime database

Nothing to do

Definition at line 33 of file CbmMcbm2019TimeWinEventBuilderTask.cxx.

◆ SetReferenceDetector() [1/2]

void CbmMcbm2019TimeWinEventBuilderTask::SetReferenceDetector ( ECbmModuleId  refDet)

◆ SetReferenceDetector() [2/2]

void CbmMcbm2019TimeWinEventBuilderTask::SetReferenceDetector ( EventBuilderDetector  refDet)

◆ SetTriggerMaxNumber()

void CbmMcbm2019TimeWinEventBuilderTask::SetTriggerMaxNumber ( ECbmModuleId  selDet,
Int_t  iVal 
)

◆ SetTriggerMinNumber()

void CbmMcbm2019TimeWinEventBuilderTask::SetTriggerMinNumber ( ECbmModuleId  selDet,
UInt_t  uVal 
)

◆ SetTriggerWindow()

void CbmMcbm2019TimeWinEventBuilderTask::SetTriggerWindow ( ECbmModuleId  det,
Double_t  dWinBeg,
Double_t  dWinEnd 
)

Member Data Documentation

◆ fbFillHistos

Bool_t CbmMcbm2019TimeWinEventBuilderTask::fbFillHistos {kTRUE}
private

output container of CbmEvents

Definition at line 90 of file CbmMcbm2019TimeWinEventBuilderTask.h.

Referenced by Finish(), and SetFillHistos().

◆ fEvents

TClonesArray* CbmMcbm2019TimeWinEventBuilderTask::fEvents = nullptr
private

Definition at line 88 of file CbmMcbm2019TimeWinEventBuilderTask.h.

Referenced by FillOutput(), and Init().

◆ fpAlgo

◆ fsOutFileName

TString CbmMcbm2019TimeWinEventBuilderTask::fsOutFileName {"data/HistosEvtWin.root"}
private

Switch ON/OFF filling of histograms.

Name of the histogram output file

Definition at line 93 of file CbmMcbm2019TimeWinEventBuilderTask.h.

Referenced by SaveHistos(), and SetOutFilename().


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