PandaRoot
PndSolCorrTask.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 PndSolCorrTask_H_
14 #define PndSolCorrTask_H_
15 
16 // Class to correct TimeStamps according to the flight path of the Particles, assuming speed of light and a straigt track path from the origin. Afterwards they get sorted timewise
17 // and written to the Outputfile
18 // With AddInputBranch(TString branchName) Branches are added to the task, with SetOutBranchName(TString name) the Output Branch name can be defined.
19 
20 #include "TClonesArray.h"
21 #include "FairTask.h"
22 #include "FairTimeStamp.h"
23 #include "FairHit.h"
24 #include "FairTSBufferFunctional.h"
25 
26 #include <vector>
27 #include <map>
28 
29 class PndSolCorrTask : public FairTask {
30  public:
34  virtual ~PndSolCorrTask();
35 
37  // virtual void SetParContainers();
38  virtual InitStatus Init();
39  // virtual InitStatus ReInit();
40 
42  virtual void Exec(Option_t *opt);
43  // virtual void FinishEvent();
44  virtual void FinishTask();
45 
46  void SetOutBranchName(TString name) { fOutBranchName = name; };
47  void AddInputBranch(TString branchName) { fInBranches.push_back(branchName); };
48 
49  void RunContinuous(Bool_t val = kTRUE) { fRunContinuous = val; };
50  void SetPersistence(Bool_t val) { fPersistence = val; };
51 
52  FairTimeStamp *SolCorr(FairHit *inHit);
53 
54  private:
55  TString fOutBranchName;
56  std::vector<TString> fInBranches;
57  std::vector<TClonesArray *> fInArrays;
58  TClonesArray *fOutArray;
59 
60  std::multimap<double, FairTimeStamp *> fDataCorr_map;
61 
62  Bool_t fRunContinuous;
63 
64  Bool_t fPersistence;
65 
66  BinaryFunctor *fStopFunctor;
67  double fReadOutStop;
68 
69  ClassDef(PndSolCorrTask, 0);
70 };
71 
72 #endif /*PndSolCorrTask_H_*/
FairTimeStamp * SolCorr(FairHit *inHit)
void AddInputBranch(TString branchName)
void RunContinuous(Bool_t val=kTRUE)
virtual InitStatus Init()
void SetOutBranchName(TString name)
virtual void Exec(Option_t *opt)
virtual ~PndSolCorrTask()
virtual void FinishTask()
void SetPersistence(Bool_t val)