CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/CommonTools/Utils/src/CombinerSetter.h

Go to the documentation of this file.
00001 #ifndef CommonTools_Utils_CombinerSetter_h
00002 #define CommonTools_Utils_CombinerSetter_h
00003 /* \class reco::parser::CombinerSetter
00004  *
00005  * Combiner setter
00006  *
00007  * \author original version: Chris Jones, Cornell, 
00008  *         adapted to Reflex by Luca Lista, INFN
00009  *
00010  * \version $Revision: 1.1 $
00011  *
00012  */
00013 #include "CommonTools/Utils/src/Combiner.h"
00014 #include "CommonTools/Utils/src/CombinerStack.h"
00015 
00016 namespace reco {
00017   namespace parser {    
00018     struct CombinerSetter {
00019       CombinerSetter(Combiner comb, CombinerStack& stack):
00020         comb_(comb), stack_(stack) {}
00021       
00022       void operator()(const char * const &, const char * const &) const { 
00023         stack_.push_back(comb_); 
00024       }
00025       void operator()(const char &) const {
00026         stack_.push_back(comb_); 
00027       }
00028     private:
00029       Combiner comb_;
00030       CombinerStack & stack_;
00031     };
00032   }
00033 }
00034 
00035 #endif