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
19 //------------------------------------------------------------------------------
20 template <typename Stream>
21 void recob::TrajectoryPointFlags::dump(
23 unsigned int verbosity,
24 std::string /* indent */, std::string indentFirst
28 * Information printed out (`verbosity` argument)
29 * -----------------------------------------------
31 * * level `0`: mask of the flags, and index
32 * * level `1`: name of the flags set, and index
36 //----------------------------------------------------------------------------
39 fFlags.dump(std::forward<Stream>(out));
41 else { // verbosity >= 1
43 unsigned int count = 0;
44 for (FlagIndex_t index = 0; index < flag::maxFlags(); ++index) {
45 if (!isDefined(index)) continue;
46 if (count++) out << ',';
48 if (isUnset(index)) out << '!';
54 out << flag::name(index);
59 if (hasOriginalHitIndex()) out << ", hit index: " << fromHit();
60 else out << " (no hit index)";
62 } // recob::TrajectoryPointFlags::dump()
65 //------------------------------------------------------------------------------
68 #endif // LARDATAOBJ_RECOBASE_TRAJECTORYPOINTFLAGS_TCC