ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MatchMod.h
(Generate patch)

Comparing UserCode/MitPhysics/Mods/interface/MatchMod.h (file contents):
Revision 1.1 by loizides, Wed Jun 17 08:42:28 2009 UTC vs.
Revision 1.4 by loizides, Thu Jun 18 15:26:49 2009 UTC

# Line 28 | Line 28 | namespace mithep
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;     }
# Line 42 | Line 43 | namespace mithep
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
# Line 115 | Line 118 | void mithep::MatchMod<ClA,ClB>::Process(
118          continue;
119        out->Add(pA);
120      }
121 +    AddObjThisEvt(out);
122 +  }
123 + }
124 +
125 + //--------------------------------------------------------------------------------------------------
126 + template<class ClA, class ClB>
127 + void mithep::MatchMod<ClA,ClB>::SlaveBegin()
128 + {
129 +  // Run starting code on the client to do some consistency checks.
130 +
131 +
132 +  if (fColNameA.IsNull()) {
133 +    SendError(kAbortModule, "SlaveBegin", "No name given for input collection A.");
134 +    return;
135 +  }
136 +
137 +  if (fColNameB.IsNull()) {
138 +    SendError(kAbortModule, "SlaveBegin", "No name given for input collection B.");
139 +    return;
140 +  }
141 +
142 +  if (fColNameC.IsNull()) {
143 +    fColNameC="Matched";
144 +    fColNameC+=fColNameA;
145 +    fColNameC+=fColNameB;
146 +    SendError(kWarning, "SlaveBegin", "No name given for output collection,"
147 +              " will use \"%s\"", fColNameC.Data());
148    }
149   }
150   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines