FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndGemEmpty Class Reference

#include <PndGemEmpty.h>

Inheritance diagram for PndGemEmpty:

Public Member Functions

 PndGemEmpty ()
 
 PndGemEmpty (Int_t iVerbose)
 
 PndGemEmpty (const char *name, Int_t iVerbose=0)
 
virtual ~PndGemEmpty ()
 
virtual void Exec (Option_t *opt)
 
void SetInBranchName (TString ibn)
 

Private Member Functions

virtual void SetParContainers ()
 
virtual InitStatus Init ()
 
virtual InitStatus ReInit ()
 
virtual void Finish ()
 
 ClassDef (PndGemEmpty, 1)
 

Private Attributes

BinaryFunctor * fFunctor
 
TClonesArray * fInBranch
 
TClonesArray * fOutBranch
 
TString fInBranchName
 

Detailed Description

Definition at line 38 of file PndGemEmpty.h.

Constructor & Destructor Documentation

PndGemEmpty::PndGemEmpty ( )

Default constructor

Definition at line 49 of file PndGemEmpty.cxx.

50  : FairTask("GEMEmpty", 0),
51  fFunctor (NULL),
52  fInBranch (NULL),
53  fOutBranch (NULL),
54  fInBranchName("GEMDigi")
55 {
56 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
TString fInBranchName
Definition: PndGemEmpty.h:70
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67
TClonesArray * fInBranch
Definition: PndGemEmpty.h:68
PndGemEmpty::PndGemEmpty ( Int_t  iVerbose)

Standard constructor

Definition at line 62 of file PndGemEmpty.cxx.

63  : FairTask("GEMEmpty", iVerbose),
64  fFunctor (NULL),
65  fInBranch (NULL),
66  fOutBranch (NULL),
67  fInBranchName("GEMDigi")
68 {
69 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
TString fInBranchName
Definition: PndGemEmpty.h:70
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67
TClonesArray * fInBranch
Definition: PndGemEmpty.h:68
Int_t iVerbose
PndGemEmpty::PndGemEmpty ( const char *  name,
Int_t  iVerbose = 0 
)

Constructor with task name

Definition at line 75 of file PndGemEmpty.cxx.

76  : FairTask(name, iVerbose),
77  fFunctor (NULL),
78  fInBranch (NULL),
79  fOutBranch (NULL),
80  fInBranchName("GEMDigi") {
81 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
TString fInBranchName
Definition: PndGemEmpty.h:70
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67
TString name
TClonesArray * fInBranch
Definition: PndGemEmpty.h:68
Int_t iVerbose
PndGemEmpty::~PndGemEmpty ( )
virtual

Destructor

Definition at line 87 of file PndGemEmpty.cxx.

References fFunctor, and fOutBranch.

87  {
88  if ( 0!=fOutBranch ) {
89  fOutBranch->Delete();
90  delete fOutBranch;
91  }
92  if ( 0!=fFunctor ) delete fFunctor;
93 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67

Member Function Documentation

PndGemEmpty::ClassDef ( PndGemEmpty  ,
 
)
private
void PndGemEmpty::Exec ( Option_t *  opt)
virtual

Execution

Definition at line 99 of file PndGemEmpty.cxx.

References fFunctor, fInBranch, fInBranchName, and fOutBranch.

99  {
100  // cout << endl << "======== PndGemEmpty::Exec(Event = " << fTNofEvents << " ) ====================" << endl;
101 
102  if ( fInBranchName.Contains("Sorted") ) {
103  fInBranch->Clear();
104  fInBranch = FairRootManager::Instance()->GetData(fInBranchName, fFunctor, 20.); //FairRootManager::Instance()->GetEventTime() +
105  }
106  else
107  fInBranch = (TClonesArray*)FairRootManager::Instance()->GetObject(fInBranchName);
108 
109  fOutBranch = FairRootManager::Instance()->GetTClonesArray("GEMCluster");
110  if ( ! fOutBranch ) Fatal("Exec", "No GEM Cluster Array");
111  fOutBranch->Delete();
112 
113  std::vector<Int_t> clusterRefs;
114  //PndGemCluster* cluster = NULL;
115  for ( Int_t iout = 0 ; iout < fInBranch->GetEntries()/14 ; iout++ ) {
116  new ((*fOutBranch)[iout]) PndGemCluster(585180824,
117  iout,
118  0,
119  iout*2.,
120  100,
121  0,
122  clusterRefs);
123 
124  }
125 
126  std::cout << "-I- PndGemEmpty::Exec. There are " << fInBranch->GetEntries() << " objects of " << fInBranchName.Data() << std::endl;
127 
128 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
TString fInBranchName
Definition: PndGemEmpty.h:70
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67
TClonesArray * fInBranch
Definition: PndGemEmpty.h:68
void PndGemEmpty::Finish ( )
privatevirtual

Finish at the end of each event

Definition at line 181 of file PndGemEmpty.cxx.

References fOutBranch.

181  {
182  if ( fOutBranch ) fOutBranch->Clear();
183 
184  cout << "-------------------- " << fName.Data() << " : Summary -----------------------" << endl;
185  cout << "-- DONE -- " << endl;
186  cout << "---------------------------------------------------------------------" << endl;
187 
188 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
InitStatus PndGemEmpty::Init ( )
privatevirtual

Intialisation

Definition at line 149 of file PndGemEmpty.cxx.

References fFunctor, fInBranch, fInBranchName, and fOutBranch.

149  {
150 
151  // Get input array
152  FairRootManager* ioman = FairRootManager::Instance();
153  if ( ! ioman ) Fatal("Init", "No FairRootManager");
154  fInBranch = (TClonesArray*) ioman->GetObject(fInBranchName.Data());
155  fOutBranch = ioman->Register("GEMCluster", "PndGemCluster", "PndGEM", kTRUE);
156 
157  fFunctor = new TimeGap();
158 
159  cout << "-I- " << fName.Data() << "::Init(). Initialization succesfull." << endl;
160 
161  return kSUCCESS;
162 }
TClonesArray * fOutBranch
Definition: PndGemEmpty.h:69
TString fInBranchName
Definition: PndGemEmpty.h:70
BinaryFunctor * fFunctor
Definition: PndGemEmpty.h:67
TClonesArray * fInBranch
Definition: PndGemEmpty.h:68
InitStatus PndGemEmpty::ReInit ( )
privatevirtual

Reinitialisation

Definition at line 169 of file PndGemEmpty.cxx.

169  {
170 
171  // Create sectorwise digi sets
172  // MakeSets();
173 
174  return kSUCCESS;
175 }
void PndGemEmpty::SetInBranchName ( TString  ibn)
inline

Definition at line 63 of file PndGemEmpty.h.

References fInBranchName.

63 { fInBranchName = ibn.Data(); }
TString fInBranchName
Definition: PndGemEmpty.h:70
void PndGemEmpty::SetParContainers ( )
privatevirtual

Get parameter containers

Definition at line 133 of file PndGemEmpty.cxx.

References run.

133  {
134 
135  // Get run and runtime database
136  FairRunAna* run = FairRunAna::Instance();
137  if ( ! run ) Fatal("SetParContainers", "No analysis run");
138 
139  FairRuntimeDb* db = run->GetRuntimeDb();
140  if ( ! db ) Fatal("SetParContainers", "No runtime database");
141 
142 }
Int_t run
Definition: autocutx.C:47

Member Data Documentation

BinaryFunctor* PndGemEmpty::fFunctor
private

Definition at line 67 of file PndGemEmpty.h.

Referenced by Exec(), Init(), and ~PndGemEmpty().

TClonesArray* PndGemEmpty::fInBranch
private

Definition at line 68 of file PndGemEmpty.h.

Referenced by Exec(), and Init().

TString PndGemEmpty::fInBranchName
private

Definition at line 70 of file PndGemEmpty.h.

Referenced by Exec(), Init(), and SetInBranchName().

TClonesArray* PndGemEmpty::fOutBranch
private

Definition at line 69 of file PndGemEmpty.h.

Referenced by Exec(), Finish(), Init(), and ~PndGemEmpty().


The documentation for this class was generated from the following files: