EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmMCMatchSelectorTask.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmMCMatchSelectorTask.cxx
1 // -------------------------------------------------------------------------
2 // ----- CbmMCMatchSelectorTask source file -----
3 // ----- Created 18/07/08 by T.Stockmanns -----
4 // -------------------------------------------------------------------------
6 
7 #include "CbmMCMatch.h"
8 
9 // framework includes
10 #include "FairRootManager.h"
11 
12 // libc includes
13 #include <iostream>
14 using std::cout;
15 using std::endl;
16 
17 // ----- Default constructor -------------------------------------------
19  : FairTask("Creates CbmMCMatch"),
20  fMCMatch(NULL),
21  fStart(kUnknown),
22  fStop(kUnknown),
23  fStageWeights(),
24  fCommonWeight(0.)
25 {
26 }
27 // -------------------------------------------------------------------------
28 
30  : FairTask("Creates CbmMCMatch"),
31  fMCMatch(NULL),
32  fStart(start),
33  fStop(stop),
34  fStageWeights(),
35  fCommonWeight(0.)
36 {
37 }
38 
39 // ----- Destructor ----------------------------------------------------
41 {
42 }
43 
44 // ----- Public method Init --------------------------------------------
46 {
47 
48 
49 // fMCMatch->InitStage(kMCTrack, "", "MCTrack");
50 
51 
52 
54  if (!ioman) {
55  cout << "-E- CbmMCMatchSelectorTask::Init: "
56  << "RootManager not instantiated!" << endl;
57  return kFATAL;
58  }
59 
60  fMCMatch = (CbmMCMatch*)ioman->GetObject("MCMatch");
61 
62  cout << "-I- CbmMCMatchSelectorTask::Init: Initialization successfull" << endl;
63 
64 
65  return kSUCCESS;
66 }
67 
68 
69 // -------------------------------------------------------------------------
71 {
72  // Get Base Container
73 // FairRun* ana = FairRun::Instance();
74 // FairRuntimeDb* rtdb=ana->GetRuntimeDb();
75 
76 }
77 
78 
79 // ----- Public method Exec --------------------------------------------
80 void CbmMCMatchSelectorTask::Exec(Option_t* opt)
81 {
82  cout << "Output Selector: " << endl;
83  SetWeights();
84  cout << fMCMatch->GetMCInfo(fStart, fStop);
85 }
86 
88 {
89 // cout << "SetWeights: CommonWeight " << fCommonWeight << " NStageWeights " << fStageWeights.size() << endl;
91  for (int i = 0; i < fStageWeights.size();i++){
93  }
94 }
95 
97 {
98 }
99 
100