CMS 3D CMS Logo

printutil.h
Go to the documentation of this file.
1 // .
2 // ..: P. Chang, philip@physics.ucsd.edu
3 
4 #ifndef printutil_cc
5 #define printutil_cc
6 
7 // C/C++
8 #include <algorithm>
9 #include <fstream>
10 #include <iostream>
11 #include <map>
12 #include <string>
13 #include <unordered_map>
14 #include <vector>
15 #include <stdarg.h>
16 #include <functional>
17 #include <cmath>
18 
19 // ROOT
20 #include "TBenchmark.h"
21 #include "TBits.h"
22 #include "TChain.h"
23 #include "TFile.h"
24 #include "TTree.h"
25 #include "TBranch.h"
26 #include "TLeaf.h"
27 #include "TH1.h"
28 #include "TH1D.h"
29 #include "TH2D.h"
30 #include "TChainElement.h"
31 #include "TTreeCache.h"
32 #include "TTreePerfStats.h"
33 #include "TStopwatch.h"
34 #include "TSystem.h"
35 #include "TString.h"
36 #include "TLorentzVector.h"
37 #include "Math/LorentzVector.h"
38 #include "Math/GenVector/PtEtaPhiM4D.h"
39 
40 #ifdef LorentzVectorPtEtaPhiM4D
41 typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> > LV;
42 #else
43 typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float> > LV;
44 #endif
45 
46 namespace RooUtil {
47 
49  // Printing functions
51  // No namespace given in order to minimize typing
52  // (e.g. RooUtil::print v. RooUtil::NAMESPACE::print)
53  void clearline(int numchar = 100);
54  void print(TString msg = "", const char* fname = "", int flush_before = 0, int flush_after = 0);
55  void error(TString msg, const char* fname = "", int is_error = 1);
56  void warning(TString msg, const char* fname = "");
57  void announce(TString msg = "", int quiet = 0);
58  void start(int quiet = 0, int sleep_time = 0);
59  void end(int quiet = 0);
60 
61  std::string getstr(const LV& lv);
62 } // namespace RooUtil
63 
64 #endif
void warning(TString msg, const char *fname="")
Definition: printutil.cc:38
void print(TString msg="", const char *fname="", int flush_before=0, int flush_after=0)
Definition: printutil.cc:23
math::XYZTLorentzVectorD LV
void error(TString msg, const char *fname="", int is_error=1)
Definition: printutil.cc:44
void announce(TString msg="", int quiet=0)
void clearline(int numchar=100)
Definition: printutil.cc:15
void start(int quiet=0, int sleep_time=0)
Definition: printutil.cc:54
std::string getstr(const LV &lv)
Definition: printutil.cc:178
tuple msg
Definition: mps_check.py:286
string fname
main script
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LV
Definition: printutil.h:43
void end(int quiet=0)
Definition: printutil.cc:162