CMS 3D CMS Logo

Functions
TrackCategories.cc File Reference
#include <iostream>
#include "SimTracker/TrackHistory/interface/TrackCategories.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, TrackCategories const &classifier)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
TrackCategories const &  classifier 
)

Definition at line 66 of file TrackCategories.cc.

References TrackCategories::flags(), and TrackCategories::Names.

66  {
67  bool init = true;
68 
69  const TrackCategories::Flags &flags = classifier.flags();
70 
71  // Print out the classification for the track
72  for (std::size_t index = 0; index < flags.size(); ++index) {
73  if (flags[index]) {
74  if (init) {
76  init = false;
77  } else
78  os << "::" << TrackCategories::Names[index];
79  }
80  }
81  os << std::endl;
82 
83  return os;
84 }
static const char *const Names[]
Name of the different categories.
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
Definition: init.py:1
std::vector< bool > Flags
Main types associated to the class.