2 * @file TrajectoryPointFlags.tcc
3 * @brief Set of flags pertaining a point of the track.
4 * @authors Giuseppe Cerati (cerati@fnal.gov),
5 * Gianluca Petrillo (petrillo@fnal.gov)
6 * @date January 18, 2017
7 * @see TrajectoryPointFlags.h
11 #ifndef LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_TCC
12 #define LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_TCC
14 #ifndef LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_H
15 #error "Do not include TrajectoryPointFlags.tcc. Include in TrajectoryPointFlags.h instead."
16 #endif // !LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_H
18 //------------------------------------------------------------------------------
19 template <typename Stream>
20 void recob::TrajectoryPointFlags::dump(Stream&& out,
21 unsigned int verbosity,
22 std::string /* indent */,
23 std::string indentFirst) const
26 * Information printed out (`verbosity` argument)
27 * -----------------------------------------------
29 * * level `0`: mask of the flags, and index
30 * * level `1`: name of the flags set, and index
34 //----------------------------------------------------------------------------
36 if (verbosity == 0) { fFlags.dump(std::forward<Stream>(out)); }
37 else { // verbosity >= 1
39 unsigned int count = 0;
40 for (FlagIndex_t index = 0; index < flag::maxFlags(); ++index) {
41 if (!isDefined(index)) continue;
42 if (count++) out << ',';
44 if (isUnset(index)) out << '!';
46 case 0: out << index; break;
47 default: out << flag::name(index);
52 if (hasOriginalHitIndex())
53 out << ", hit index: " << fromHit();
55 out << " (no hit index)";
57 } // recob::TrajectoryPointFlags::dump()
59 //------------------------------------------------------------------------------
61 #endif // LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_TCC