CMS 3D CMS Logo

Classes | Functions
triggerExpression Namespace Reference

Classes

class  BinaryOperator
 
class  Constant
 
class  Data
 
class  Evaluator
 
class  L1uGTReader
 
class  OperatorAnd
 
class  OperatorNot
 
class  OperatorOr
 
class  OperatorXor
 
class  Parser
 
class  PathReader
 
class  Prescaler
 
class  UnaryOperator
 

Functions

template<typename T >
static const Tget (const edm::Event &event, const edm::EDGetTokenT< T > &token)
 
template<typename R , typename T >
static const Tget (const edm::EventSetup &setup)
 
std::ostream & operator<< (std::ostream &out, const Evaluator &eval)
 
template<class T >
Evaluatorparse (const T &text)
 
Evaluatorparse (const char *text)
 

Function Documentation

template<typename T >
static const T* triggerExpression::get ( const edm::Event event,
const edm::EDGetTokenT< T > &  token 
)
static

Definition at line 20 of file TriggerExpressionData.cc.

References relativeConstraints::error, cmsBatch::handle, edm::HandleBase::isValid(), edm::Handle< T >::product(), and edm::HandleBase::whyFailed().

20  {
22  event.getByToken(token, handle);
23  if (not handle.isValid()) {
24  auto const & error = handle.whyFailed();
25  edm::LogWarning(error->category()) << error->what();
26  return nullptr;
27  } else {
28  return handle.product();
29  }
30 }
bool isValid() const
Definition: HandleBase.h:74
T const * product() const
Definition: Handle.h:81
std::shared_ptr< cms::Exception > whyFailed() const
Definition: HandleBase.h:106
template<typename R , typename T >
static const T* triggerExpression::get ( const edm::EventSetup setup)
static

Definition at line 34 of file TriggerExpressionData.cc.

References cmsBatch::handle, edm::ESHandle< T >::product(), dttmaxenums::R, and GeneralSetup::setup().

34  {
36  setup.get<R>().get(handle);
37  return handle.product();
38 }
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
std::ostream& triggerExpression::operator<< ( std::ostream &  out,
const Evaluator eval 
)
inline

Definition at line 28 of file TriggerExpressionEvaluator.h.

References triggerExpression::Evaluator::dump(), and MillePedeFileConverter_cfg::out.

28  {
29  eval.dump(out);
30  return out;
31 }
template<class T >
Evaluator* triggerExpression::parse ( const T text)

Definition at line 76 of file TriggerExpressionParser.h.

References begin, end, or, createfilelist::parser, and mps_fire::result.

Referenced by TriggerResultsFilter::parse(), and TriggerResultsFilterFromDB::parse().

76  {
77  typedef typename T::const_iterator Iterator;
78  Parser<Iterator> parser;
79  Evaluator * evaluator = 0;
80 
81  Iterator begin = text.begin();
82  Iterator end = text.end();
83 
84  // the interface of qi::phrase_parse has changed between Boost 1.40 (Spirit 2.0) and Boost 1.41 (Spirit 2.1)
85  bool result = qi::phrase_parse( begin, end, parser, ascii::space, evaluator );
86 
87  if (not result or begin != end) {
88  delete evaluator;
89  return 0;
90  }
91 
92  return evaluator;
93 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
Evaluator* triggerExpression::parse ( const char *  text)
inline

Definition at line 96 of file TriggerExpressionParser.h.

References begin, end, or, createfilelist::parser, mps_fire::result, and RecoTauValidation_cfi::text.

96  {
97  Parser<const char *> parser;
98  Evaluator * evaluator = 0;
99 
100  const char * begin = text;
101  const char * end = text + strlen(text);
102 
103  // the interface of qi::phrase_parse has changed between Boost 1.40 (Spirit 2.0) and Boost 1.41 (Spirit 2.1)
104  bool result = qi::phrase_parse( begin, end, parser, ascii::space, evaluator );
105 
106  if (not result or begin != end) {
107  delete evaluator;
108  return 0;
109  }
110 
111  return evaluator;
112 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30