PandaRoot
PndProcessHandler.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDPROCESSORHANDLER_HH
14 #define PNDPROCESSORHANDLER_HH
15 
16 #include <memory>
17 #include <string>
18 
19 #include "PndParameterRegister.h"
20 #include "PndContainerRegister.h"
21 #include "PndProcess.h"
22 
31  public:
32  PndProcessHandler(const std::string &t_detectorname = "") : fDetectorName(t_detectorname){};
33  virtual ~PndProcessHandler();
34 
39  void AddProcess(PndProcess * /*t_process*/);
40 
45  void SetupProcesses();
46 
47  const std::vector<PndProcess *> &GetProcesses() { return fProcesses; }
50  const std::string &GetDetectorName() const { return fDetectorName; }
51 
52  virtual void GetRequiredDataContainerInfo();
53  virtual void PassDataContainersToProcesses();
54 
55  protected:
56  virtual void SetupProcess(PndProcess *t_process);
57 
58  std::vector<PndProcess *> fProcesses{};
59  std::unique_ptr<PndParameterRegister> fParameterRegister{new PndParameterRegister};
60  std::unique_ptr<PndContainerRegister> fContainerRegister{new PndContainerRegister};
61  std::string fDetectorName{""};
62 };
63 
64 
65 #endif /*PNDPROCESSORHANDLER_HH*/
Base Process class.
Definition: PndProcess.h:36
void SetupProcesses()
Call for each PndProcess the SetupParameter.
PndProcessHandler(const std::string &t_detectorname="")
virtual void GetRequiredDataContainerInfo()
const std::string & GetDetectorName() const
const PndParameterRegister * GetParameterRegister() const
virtual void PassDataContainersToProcesses()
virtual ~PndProcessHandler()
const std::vector< PndProcess * > & GetProcesses()
std::unique_ptr< PndContainerRegister > fContainerRegister
PndParameterRegister * GetParameterRegister()
void AddProcess(PndProcess *)
Add a PndProcess of appropriate type to the list of PndProcesses to be managed.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Base class for classes handling a set of PndProcesses.
std::unique_ptr< PndParameterRegister > fParameterRegister
virtual void SetupProcess(PndProcess *t_process)
std::string fDetectorName
std::vector< PndProcess * > fProcesses