CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 71 of file TrackCategories.cc.

References TrackCategories::flags(), flags, cmsHarvester::index, init, and TrackCategories::Names.

72 {
73  bool init = true;
74 
75  const TrackCategories::Flags & flags = classifier.flags();
76 
77  // Print out the classification for the track
78  for (std::size_t index = 0; index < flags.size(); ++index)
79  {
80  if (flags[index])
81  {
82  if (init)
83  {
85  init = false;
86  }
87  else
88  os << "::" << TrackCategories::Names[index];
89  }
90  }
91  os << std::endl;
92 
93  return os;
94 }
static const char *const Names[]
Name of the different categories.
int init
Definition: HydjetWrapper.h:67
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
std::vector< bool > Flags
Main types associated to the class.