PandaRoot
PndSdsTask.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 /*
14  * PndSdsTask.h
15  *
16  * Created on: Jul 7, 2010
17  * Author: stockman
18  */
19 
20 #ifndef PNDSDSTASK_H_
21 #define PNDSDSTASK_H_
22 #include <PndPersistencyTask.h>
23 #include "FairRootManager.h"
24 
25 #include <iostream>
26 
28  public:
29  PndSdsTask();
30 
31  PndSdsTask(const char *name, Int_t iVerbose = 1)
32  : PndPersistencyTask(name, iVerbose), fInBranchName(""), fOutBranchName(""), fFolderName(""), fInBranchId(-1), fOutBranchId(-1){};
33  virtual ~PndSdsTask();
34 
35  virtual void SetBranchNames() = 0;
36  virtual void SetInBranchId()
37  {
38  FairRootManager *ioman = FairRootManager::Instance();
39  fInBranchId = ioman->GetBranchId(fInBranchName);
40  fOutBranchId = ioman->GetBranchId(fOutBranchName);
41  std::cout << "InBranchId: " << fInBranchId << " for Branch: " << fInBranchName.Data() << std::endl;
42  std::cout << "OutBranchId: " << fOutBranchId << " for Branch: " << fOutBranchName.Data() << std::endl;
43  }
44 
45  protected:
46  TString fInBranchName;
47  TString fOutBranchName;
48  TString fFolderName;
49 
50  Int_t fInBranchId;
51  Int_t fOutBranchId;
52 
53  ClassDef(PndSdsTask, 1);
54 };
55 
56 #endif /* PNDSDSTASK_H_ */
ClassDef(PndSdsTask, 1)
Int_t fInBranchId
Definition: PndSdsTask.h:50
TString fOutBranchName
Definition: PndSdsTask.h:47
PndSdsTask(const char *name, Int_t iVerbose=1)
Definition: PndSdsTask.h:31
Int_t fOutBranchId
Definition: PndSdsTask.h:51
TString fInBranchName
Definition: PndSdsTask.h:46
virtual void SetBranchNames()=0
TString fFolderName
Definition: PndSdsTask.h:48
virtual ~PndSdsTask()
virtual void SetInBranchId()
Definition: PndSdsTask.h:36