Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:41

0001 #ifndef L1Trigger_TrackFindingTMTT_PrintL1trk
0002 #define L1Trigger_TrackFindingTMTT_PrintL1trk
0003 
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include <iomanip>
0006 
0007 // Use LogVerbatim with "L1track" category & floating point precision specified here.
0008 // Example use: PrintL1trk() << "My message "<<x<<" more text".
0009 
0010 namespace tmtt {
0011 
0012   class PrintL1trk {
0013   public:
0014     PrintL1trk(unsigned int nDigits = 4) : lv_("L1track"), nDigits_(nDigits){};
0015 
0016     template <class T>
0017     edm::LogVerbatim& operator<<(const T& t) {
0018       lv_ << std::fixed << std::setprecision(nDigits_) << t;
0019       return lv_;
0020     }
0021 
0022   private:
0023     edm::LogVerbatim lv_;
0024     const unsigned int nDigits_;
0025   };
0026 
0027 }  // namespace tmtt
0028 
0029 #endif