-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprintutil.h
70 lines (60 loc) · 1.77 KB
/
printutil.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// .
// ..: P. Chang, [email protected]
#ifndef printutil_cc
#define printutil_cc
// C/C++
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <unordered_map>
#include <vector>
#include <stdarg.h>
#include <functional>
#include <cmath>
// ROOT
#include "TBenchmark.h"
#include "TBits.h"
#include "TChain.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TLeaf.h"
#include "TH1.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TChainElement.h"
#include "TTreeCache.h"
#include "TTreePerfStats.h"
#include "TStopwatch.h"
#include "TSystem.h"
#include "TString.h"
#include "TLorentzVector.h"
#include "Math/LorentzVector.h"
#include "Math/PtEtaPhiM4D.h"
#ifdef LorentzVectorPtEtaPhiM4D
typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> > LV;
#else
typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float> > LV;
#endif
#include "json.h"
using json = nlohmann::json;
namespace RooUtil
{
///////////////////////////////////////////////////////////////////////////////////////////////
// Printing functions
///////////////////////////////////////////////////////////////////////////////////////////////
// No namespace given in order to minimize typing
// (e.g. RooUtil::print v. RooUtil::NAMESPACE::print)
void clearline(int numchar=100);
void print (TString msg="", const char* fname="", int flush_before=0, int flush_after=0);
void error (TString msg, const char* fname="", int is_error=1);
void warning (TString msg, const char* fname="");
void announce (TString msg="", int quiet=0);
void start (int quiet=0, int sleep_time=0);
void end (int quiet=0);
void jsoncheck(json& j, TString field);
std::string getstr(const LV& lv);
}
#endif