CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

reco::TaggingVariableList Class Reference

#include <TaggingVariable.h>

List of all members.

Public Types

typedef std::vector
< TaggingVariable >
::const_iterator 
const_iterator
typedef std::pair
< const_iterator,
const_iterator
range

Public Member Functions

const_iterator begin () const
bool checkTag (TaggingVariableName tag) const
const_iterator end () const
void finalize (void)
TaggingValue get (TaggingVariableName tag, TaggingValue defaultValue) const
TaggingValue get (TaggingVariableName tag) const
std::vector< TaggingValuegetList (TaggingVariableName tag, bool throwOnEmptyList=true) const
range getRange (TaggingVariableName tag) const
void insert (const TaggingVariable &variable, bool delayed=false)
void insert (const TaggingVariableList &list)
void insert (TaggingVariableName tag, TaggingValue value, bool delayed=false)
void insert (TaggingVariableName tag, const std::vector< TaggingValue > &values, bool delayed=false)
TaggingValue operator[] (TaggingVariableName tag) const
void push_back (const TaggingVariable &t)
size_t size () const
template<typename InputIterator >
 TaggingVariableList (const InputIterator begin, const InputIterator end)
 TaggingVariableList (const TaggingVariableList &list)
 TaggingVariableList ()
 ~TaggingVariableList ()

Private Attributes

std::vector< TaggingVariablem_list

Detailed Description

Definition at line 129 of file TaggingVariable.h.


Member Typedef Documentation

STL-like accessors

Definition at line 145 of file TaggingVariable.h.

Definition at line 146 of file TaggingVariable.h.


Constructor & Destructor Documentation

reco::TaggingVariableList::TaggingVariableList ( ) [inline]

Definition at line 131 of file TaggingVariable.h.

: m_list() { }
reco::TaggingVariableList::TaggingVariableList ( const TaggingVariableList list) [inline]

Definition at line 132 of file TaggingVariable.h.

: m_list( list.m_list ) { }
template<typename InputIterator >
reco::TaggingVariableList::TaggingVariableList ( const InputIterator  begin,
const InputIterator  end 
) [inline]

Definition at line 136 of file TaggingVariable.h.

References end(), i, insert(), and relativeConstraints::value.

                                                                              : m_list() {
      BOOST_STATIC_ASSERT(( boost::is_convertible< const TaggingVariableList, typename boost::pointee<InputIterator>::type >::value ));
      for (const InputIterator i = begin; i != end; i++)
        insert(*i);
    }
reco::TaggingVariableList::~TaggingVariableList ( ) [inline]

Definition at line 152 of file TaggingVariable.h.

{ }

Member Function Documentation

const_iterator reco::TaggingVariableList::begin ( void  ) const [inline]

Definition at line 148 of file TaggingVariable.h.

References m_list.

Referenced by JetTagMVAExtractor::analyze(), JetTagMVATreeTrainer::analyze(), and JetTagMVATrainer::analyze().

{ return m_list.begin(); }
bool reco::TaggingVariableList::checkTag ( TaggingVariableName  tag) const

Definition at line 380 of file PixelROCDACSettings.cc.

References gather_cfg::cout.

                                                             {
  
  std::string mthn = "[PixelROCDACSettings::checkTag()]\t\t\t\t    " ;
  dacName+=":";
  if (tag!=dacName) {
    cout << __LINE__ << "]\t" << mthn << "Read ROC name       : "             << tag     << endl;
    cout << __LINE__ << "]\t" << mthn << "But expected to find: "             << dacName << endl;
    cout << __LINE__ << "]\t" << mthn << "When reading DAC settings for ROC " << rocid   << endl;
    assert(0);
  }

}
const_iterator reco::TaggingVariableList::end ( void  ) const [inline]
void reco::TaggingVariableList::finalize ( void  )
TaggingValue reco::TaggingVariableList::get ( TaggingVariableName  tag) const

Definition at line 205 of file TaggingVariable.cc.

References Exception, helper::getRange(), edm::errors::InvalidReference, and csvReporter::r.

Referenced by TrackProbabilityTagPlotter::analyzeTag(), and TagInfoMVACategorySelector::findCategory().

                                                                     {
  range r = getRange(tag);
  if (r.first == r.second)
    throw edm::Exception( edm::errors::InvalidReference )
                  << "TaggingVariable " << tag << " is not present in the collection";
  return r.first->second;
}
TaggingValue reco::TaggingVariableList::get ( TaggingVariableName  tag,
TaggingValue  defaultValue 
) const

Definition at line 213 of file TaggingVariable.cc.

References helper::getRange(), and csvReporter::r.

                                                                                                {
  range r = getRange(tag);
  if ( r.first == r.second )
    return defaultValue;
  return r.first->second;
}
std::vector< TaggingValue > reco::TaggingVariableList::getList ( TaggingVariableName  tag,
bool  throwOnEmptyList = true 
) const

Definition at line 220 of file TaggingVariable.cc.

References Exception, helper::getRange(), edm::errors::InvalidReference, list(), and csvReporter::r.

Referenced by TaggingVariablePlotter::analyzeTag().

                                                                                                           {
  using namespace __gnu_cxx;
  range r = getRange( tag );
  if ( throwOnEmptyList && r.first == r.second )
    throw edm::Exception( edm::errors::InvalidReference )
                  << "TaggingVariable " << tag << " is not present in the collection";
  std::vector<TaggingValue> list( r.second - r.first );
  transform( r.first, r.second, list.begin(), select2nd< TaggingVariable >() );
  return list;
}
TaggingVariableList::range reco::TaggingVariableList::getRange ( TaggingVariableName  tag) const

Definition at line 231 of file TaggingVariable.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

                                                                                      {
  return equal_range( m_list.begin(), m_list.end(), tag, TaggingVariableCompare() );
}
void reco::TaggingVariableList::insert ( const TaggingVariable variable,
bool  delayed = false 
)
void reco::TaggingVariableList::insert ( TaggingVariableName  tag,
TaggingValue  value,
bool  delayed = false 
)

Definition at line 183 of file TaggingVariable.cc.

                                                                                              {
  m_list.push_back( TaggingVariable( tag, value ) );
  if (not delayed) finalize();
}
void reco::TaggingVariableList::insert ( const TaggingVariableList list)

Definition at line 195 of file TaggingVariable.cc.

References m_list, and findQualityFiles::size.

                                                                   {
  std::vector<TaggingVariable>::size_type size = m_list.size();
  m_list.insert( m_list.end(), list.m_list.begin(), list.m_list.end() );
  inplace_merge( m_list.begin(), m_list.begin() + size, m_list.end(), TaggingVariableCompare() );
}
void reco::TaggingVariableList::insert ( TaggingVariableName  tag,
const std::vector< TaggingValue > &  values,
bool  delayed = false 
)

Definition at line 188 of file TaggingVariable.cc.

References i.

                                                                                                                  {
  for (std::vector<TaggingValue>::const_iterator i = values.begin(); i != values.end(); i++) {
    m_list.push_back( TaggingVariable(tag, *i) );
  }
  if (not delayed) finalize();
}
TaggingValue reco::TaggingVariableList::operator[] ( TaggingVariableName  tag) const [inline]

Definition at line 174 of file TaggingVariable.h.

References GlobalPosition_Frontier_DevDB_cff::tag.

                                                             {
      return get( tag );
    }
void reco::TaggingVariableList::push_back ( const TaggingVariable t) [inline]

Definition at line 150 of file TaggingVariable.h.

References m_list.

Referenced by GenericMVAJetTagComputer::taggingVariables().

{ m_list.push_back ( t ); }
size_t reco::TaggingVariableList::size ( void  ) const [inline]

Definition at line 147 of file TaggingVariable.h.

References m_list.

Referenced by JetTagMVAExtractor::analyze(), JetTagMVATreeTrainer::analyze(), and JetTagMVATrainer::analyze().

{ return m_list.size(); }

Member Data Documentation

Definition at line 156 of file TaggingVariable.h.

Referenced by begin(), end(), insert(), push_back(), and size().