CMS 3D CMS Logo

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

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 51 of file VertexCategories.cc.

References VertexCategories::flags(), HLT_2023v12_cff::flags, and VertexCategories::Names.

51  {
52  bool init = true;
53 
54  const VertexCategories::Flags &flags = classifier.flags();
55 
56  // Print out the classification for the track
57  for (std::size_t index = 0; index < flags.size(); ++index) {
58  if (flags[index]) {
59  if (init) {
61  init = false;
62  } else
63  os << "::" << VertexCategories::Names[index];
64  }
65  }
66  os << std::endl;
67 
68  return os;
69 }
std::vector< bool > Flags
Main types associated to the class.
Definition: init.py:1
static const char *const Names[]
Name of the different categories.