PandaRoot
PndPrintFairLinks.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 // framework includes
23 #include "FairTask.h"
24 
25 #include <vector>
26 #include <map>
27 #include "TObjString.h"
28 
29 class TClonesArray;
30 
31 class PndPrintFairLinks : public FairTask {
32  public:
35 
37  virtual ~PndPrintFairLinks();
38 
39 
40  virtual void AddBranchName(const TString &name) { fSelectedBranches->AddLast(new TObjString(name.Data())); }
41 
42  virtual void PrintBranchNameList(TList *branches);
43 
44  virtual InitStatus Init();
45 
47  virtual void Exec(Option_t *opt);
48 
49  virtual void Finish();
50 
51  protected:
52  void InitBranchList(TList *branches);
53 
54  private:
55  std::map<Int_t, TClonesArray *> fBranches;
56  TList *fSelectedBranches;
57 
58  void Register();
59 
60  void Reset();
61 
62  void ProduceHits();
63 
64  ClassDef(PndPrintFairLinks, 1);
65 };
66