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

◆ operator<<()

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

Definition at line 66 of file TrackCategories.cc.

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 }

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

TrackCategories::Names
static const char *const Names[]
Name of the different categories.
Definition: TrackCategories.h:67
init
Definition: init.py:1
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HLT_2018_cff.flags
flags
Definition: HLT_2018_cff.py:11758
TrackCategories::Flags
std::vector< bool > Flags
Main types associated to the class.
Definition: TrackCategories.h:70