16 |
|
fNEvents(0), |
17 |
|
fNAcceped(0), |
18 |
|
fNFailed(0), |
19 |
< |
fAcceptCurrentRunLumi(kFALSE) |
19 |
> |
fAcceptCurrentRunLumi(kFALSE), |
20 |
> |
fRunLumiGraph(0) |
21 |
|
{ |
22 |
|
// Constructor. |
23 |
|
} |
55 |
|
fAcceptCurrentRunLumi = fAcceptedRunsLumis.HasRunLumi(runLumi); |
56 |
|
} |
57 |
|
fCurrentRunLumi = runLumi; |
58 |
+ |
if (fAcceptCurrentRunLumi) { |
59 |
+ |
fRunLumiSet.Add(runLumi); |
60 |
+ |
} |
61 |
|
if (0) { |
62 |
|
printf("Run %u, Lumi %u, accepted = %i\n",runLumi.first,runLumi.second,fAcceptCurrentRunLumi); |
63 |
|
} |
83 |
|
void RunLumiSelectionMod::SlaveBegin() |
84 |
|
{ |
85 |
|
|
86 |
+ |
// fRunLumiVector = new RunLumiVector; |
87 |
+ |
// fRunLumiVector->SetName("ProcessedRunsLumis"); |
88 |
+ |
// AddOutput(fRunLumiVector); |
89 |
+ |
|
90 |
|
} |
91 |
|
|
92 |
|
//-------------------------------------------------------------------------------------------------- |
94 |
|
{ |
95 |
|
// Save number of accepted events. |
96 |
|
|
97 |
+ |
const RunLumiSet::SetType &theset = fRunLumiSet.runLumiSet(); |
98 |
+ |
|
99 |
+ |
UInt_t setSize = theset.size(); |
100 |
+ |
Double_t *runArray = new Double_t[setSize]; |
101 |
+ |
Double_t *lumiArray = new Double_t[setSize]; |
102 |
+ |
|
103 |
+ |
UInt_t arrayPos = 0; |
104 |
+ |
for (RunLumiSet::SetType::const_iterator it = theset.begin(); it!=theset.end(); ++it) { |
105 |
+ |
printf("first = %u, second = %u\n",it->first,it->second); |
106 |
+ |
runArray[arrayPos] = it->first; |
107 |
+ |
lumiArray[arrayPos] = it->second; |
108 |
+ |
++arrayPos; |
109 |
+ |
} |
110 |
+ |
|
111 |
+ |
fRunLumiGraph = new TGraph(setSize,runArray,lumiArray); |
112 |
+ |
fRunLumiGraph->SetName("ProcessedRunsLumis"); |
113 |
+ |
AddOutput(fRunLumiGraph); |
114 |
+ |
|
115 |
+ |
delete runArray; |
116 |
+ |
delete lumiArray; |
117 |
+ |
|
118 |
|
SaveNEventsProcessed(); |
119 |
|
} |
120 |
|
|