CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CutSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_CutSetter_h
2 #define CommonTools_Utils_CutSetter_h
3 /* \class reco::parser::CutSetter
4  *
5  * Cut setter
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted to Reflex by Luca Lista, INFN
9  *
10  * \version $Revision: 1.1 $
11  *
12  */
15 
16 namespace reco {
17  namespace parser {
18  struct CutSetter {
20  cut_(cut), selStack_(selStack) { }
21 
22  void operator()(const char*, const char*) const {
23  assert(0 == cut_.get());
24  assert(!selStack_.empty());
25  cut_ = selStack_.back();
26  selStack_.pop_back();
27  }
30  };
31  }
32  }
33 
34 #endif
SelectorStack & selStack_
Definition: CutSetter.h:29
CutSetter(SelectorPtr &cut, SelectorStack &selStack)
Definition: CutSetter.h:19
SelectorPtr & cut_
Definition: CutSetter.h:28
void operator()(const char *, const char *) const
Definition: CutSetter.h:22
std::vector< SelectorPtr > SelectorStack
Definition: SelectorStack.h:18
boost::shared_ptr< SelectorBase > SelectorPtr
Definition: SelectorPtr.h:17