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.2 by loizides, Wed Jun 17 14:52:47 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 117 | Line 120 | void mithep::MatchMod<ClA,ClB>::Process(
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines