CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetTagComputer.cc
Go to the documentation of this file.
1 #include <vector>
2 #include <string>
3 
6 
8 
10 
12 {
13  std::vector<const reco::BaseTagInfo*> helper;
14  helper.push_back(&info);
15  return discriminator(TagInfoHelper(helper));
16 }
17 
18 void JetTagComputer::uses(unsigned int id, const std::string &label)
19 {
20  if (m_setupDone)
21  throw cms::Exception("InvalidState")
22  << "JetTagComputer::uses called outside of "
23  "constructor" << std::endl;
24 
25  if (id >= m_inputLabels.size())
26  m_inputLabels.resize(id + 1);
27 
28  if (!m_inputLabels[id].empty())
29  throw cms::Exception("InvalidIndex")
30  << "JetTagComputer::uses called with duplicate "
31  "or invalid index" << std::endl;
32 
33  m_inputLabels[id] = label;
34 }
35 
37 {
38  throw cms::Exception("VirtualMethodMissing")
39  << "No virtual method implementation for "
40  << "JetTagComputer::discriminator() defined." << std::endl;
41 }
42 
44 {
45  return discriminator(info.getBase(0));
46 }
47 
std::vector< std::string > m_inputLabels
static const TGPicture * info(bool iBackgroundIsBlack)
virtual float discriminator(const reco::BaseTagInfo &) const
float operator()(const reco::BaseTagInfo &info) const
void uses(unsigned int id, const std::string &label)
const reco::BaseTagInfo & getBase(unsigned int index) const
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:96