28 |
|
MatchMod(const char *name="MatchMod", |
29 |
|
const char *title="Generic matching module"); |
30 |
|
|
31 |
+ |
Bool_t GetAddPairs(Bool_t b) const { return fAddPairs; } |
32 |
|
const char *GetColNameA() const { return fColNameA; } |
33 |
|
const char *GetColNameB() const { return fColNameB; } |
34 |
|
const char *GetColNameC() const { return fColNameC; } |
43 |
|
void SetInputNameB(const char *n) { SetColNameB(n); } |
44 |
|
void SetOutputName(const char *n) { SetColNameC(n); } |
45 |
|
void SetMatchRadius(Double_t m) { fMaxR = m; } |
46 |
+ |
void SetAddPairs(Bool_t b) { fAddPairs = b; } |
47 |
|
|
48 |
|
protected: |
49 |
|
void Process(); |
50 |
+ |
void SlaveBegin(); |
51 |
|
|
52 |
|
TString fColNameA; //name of input collection A |
53 |
|
TString fColNameB; //name of input collection B |
120 |
|
} |
121 |
|
} |
122 |
|
} |
123 |
+ |
|
124 |
+ |
//-------------------------------------------------------------------------------------------------- |
125 |
+ |
template<class ClA, class ClB> |
126 |
+ |
void mithep::MatchMod<ClA,ClB>::SlaveBegin() |
127 |
+ |
{ |
128 |
+ |
// Run starting code on the client to do some consistency checks. |
129 |
+ |
|
130 |
+ |
|
131 |
+ |
if (fColNameA.IsNull()) { |
132 |
+ |
SendError(kAbortModule, "SlaveBegin", "No name given for input collection A."); |
133 |
+ |
return; |
134 |
+ |
} |
135 |
+ |
|
136 |
+ |
if (fColNameB.IsNull()) { |
137 |
+ |
SendError(kAbortModule, "SlaveBegin", "No name given for input collection B."); |
138 |
+ |
return; |
139 |
+ |
} |
140 |
+ |
|
141 |
+ |
if (fColNameC.IsNull()) { |
142 |
+ |
fColNameC="Matched"; |
143 |
+ |
fColNameC+=fColNameA; |
144 |
+ |
fColNameC+=fColNameB; |
145 |
+ |
} |
146 |
+ |
} |
147 |
|
#endif |