CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
HLTAnalyzer.cc File Reference
#include <boost/foreach.hpp>
#include "HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h"
#include "HLTMessages.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

Go to the source code of this file.

Typedefs

typedef std::pair< const char
*, const edm::InputTag * > 
MissingCollectionInfo
 

Functions

template<class T >
static bool getCollection (const edm::Event &event, std::vector< MissingCollectionInfo > &missing, edm::Handle< T > &handle, const edm::InputTag &name, const edm::EDGetTokenT< T > token, const char *description)
 

Typedef Documentation

typedef std::pair<const char *, const edm::InputTag *> MissingCollectionInfo

Definition at line 11 of file HLTAnalyzer.cc.

Function Documentation

template<class T >
static bool getCollection ( const edm::Event event,
std::vector< MissingCollectionInfo > &  missing,
edm::Handle< T > &  handle,
const edm::InputTag name,
const edm::EDGetTokenT< T token,
const char *  description 
)
inlinestatic

Definition at line 15 of file HLTAnalyzer.cc.

References edm::HandleBase::clear(), and edm::HandleBase::isValid().

Referenced by HLTAnalyzer::analyze().

16 {
17  event.getByToken(token, handle);
18  bool valid = handle.isValid();
19  if (not valid) {
20  missing.push_back( std::make_pair(description, & name) );
21  handle.clear();
22  // std::cout << "not valid "<< description << " " << name << std::endl;
23  }
24  return valid;
25 }
dictionary missing
Definition: combine.py:4
bool isValid() const
Definition: HandleBase.h:75
tuple description
Definition: idDealer.py:66