CMS 3D CMS Logo

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 by Luca Lista, INFN
9  *
10  * \version $Revision: 1.3 $
11  *
12  */
15 #include <cassert>
16 
17 namespace reco {
18  namespace parser {
19  struct CutSetter {
21  cut_(cut), selStack_(selStack) { }
22 
23  void operator()(const char*, const char*) const {
24  assert(nullptr == cut_.get());
25  assert(!selStack_.empty());
26  cut_ = selStack_.back();
27  selStack_.pop_back();
28  }
31  };
32  }
33  }
34 
35 #endif
SelectorStack & selStack_
Definition: CutSetter.h:30
CutSetter(SelectorPtr &cut, SelectorStack &selStack)
Definition: CutSetter.h:20
SelectorPtr & cut_
Definition: CutSetter.h:29
void operator()(const char *, const char *) const
Definition: CutSetter.h:23
std::vector< SelectorPtr > SelectorStack
Definition: SelectorStack.h:18
boost::shared_ptr< SelectorBase > SelectorPtr
Definition: SelectorPtr.h:17
fixed size matrix