PandaRoot
PndTrackArrayMerger.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 
20 #pragma once
21 
22 #include "FairTask.h"
23 
24 #include "TString.h"
25 #include "TClonesArray.h"
26 #include <vector>
27 
28 class PndTrackArrayMerger : public FairTask {
29 
30  public:
32  explicit PndTrackArrayMerger(TString s);
33  virtual ~PndTrackArrayMerger();
34 
35  virtual void SetParContainers();
36  virtual InitStatus Init();
37  virtual InitStatus ReInit();
38  virtual void Exec(Option_t *opt);
39  virtual void FinishEvent();
40 
41  void SetPersistance(Bool_t p = kTRUE) { fPersistance = p; }
42  void AddInputBranch(TString s) { fInputBranchList.push_back(s); }
43  void SetOutputBranch(TString s) { fOutputBranch = s; }
44 
45  private:
46  Bool_t fPersistance;
47  TString fOutputBranch;
48  TClonesArray *fOutputArray;
49  std::vector<TString> fInputBranchList;
50  std::vector<TClonesArray *> fInputArrayList;
51 
53  PndTrackArrayMerger &operator=(const PndTrackArrayMerger &) { return *this; }
54 
55  ClassDef(PndTrackArrayMerger, 1);
56 };
virtual ~PndTrackArrayMerger()
void SetOutputBranch(TString s)
virtual void FinishEvent()
virtual InitStatus ReInit()
void SetPersistance(Bool_t p=kTRUE)
virtual void Exec(Option_t *opt)
Copies the data of several input TClonesArrays of the same type into one output TClonesArray.
void AddInputBranch(TString s)
virtual void SetParContainers()
virtual InitStatus Init()