ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MergeLeptonsMod.h
Revision: 1.2
Committed: Wed Dec 10 17:28:22 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2, Mit_008pre1, Mit_006b, Mit_006a
Changes since 1.1: +15 -13 lines
Log Message:
Added naming convention: SetInputName/SetOutputName etc.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.2 // $Id: MergeLeptonsMod.h,v 1.1 2008/12/10 11:44:33 loizides Exp $
3 loizides 1.1 //
4     // MergeLeptonsMod
5     //
6     // This module merges muon and electron collections. (Note if need be this can easily be
7     // generalized).
8     //
9     // Authors: C.Loizides
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITPHYSICS_MODS_MERGELEPTONSMOD_H
13     #define MITPHYSICS_MODS_MERGELEPTONSMOD_H
14    
15     #include "MitAna/TreeMod/interface/BaseMod.h"
16     #include "MitAna/DataTree/interface/Collections.h"
17    
18     namespace mithep
19     {
20     class MergeLeptonsMod : public BaseMod
21     {
22     public:
23     MergeLeptonsMod(const char *name="MergeLeptonsMod",
24     const char *title="Merging leptons module");
25     ~MergeLeptonsMod() {}
26    
27 loizides 1.2 const char *GetElectronsName() const { return fElName; }
28     const char *GetMergedName() const { return fMergedName; }
29     const char *GetMuonsName() const { return fMuName; }
30     const char *GetOutputName() const { return GetMergedName(); }
31     void SetElectronsName(const char *n) { fElName=n; }
32     void SetMergedName(const char *n) { fMergedName=n; }
33     void SetMuonsName(const char *n) { fMuName=n; }
34     void SetOutputName(const char *n) { SetMergedName(n); }
35 loizides 1.1
36     protected:
37     void Process();
38    
39 loizides 1.2 TString fElName; //name of electrons collection (input)
40     TString fMuName; //name of muons collection (input)
41     TString fMergedName; //name of merged collection (output)
42     const ElectronCol *fElIn; //!pointer to electron collection
43     const MuonCol *fMuIn; //!pointer to muon collection
44     ParticleOArr *fColOut; //!pointer to merged collection
45 loizides 1.1
46     ClassDef(MergeLeptonsMod, 1) // Merging leptons module
47     };
48     }
49     #endif