@@ -38,7 +38,7 @@ def main(config):
3838 hist_rawy_name = cfg ["rawyields" ]["histoname" ]
3939 hist_rawy .append (infile_rawy .Get (hist_rawy_name ))
4040 if not isinstance (hist_rawy [- 1 ], ROOT .TH1 ):
41- sys .exit (f"Fatal error: Histogram with raw yield \" { hist_rawy_name } \" is absent. Exit." )
41+ sys .exit (f"\33 [31mFatal error: Histogram with raw yield \" { hist_rawy_name } \" is absent. Exit.\33 [0m " )
4242 hist_rawy [- 1 ].SetDirectory (0 )
4343 infile_rawy .Close ()
4444
@@ -48,18 +48,18 @@ def main(config):
4848 hist_effp .append (infile_eff .Get (hist_effp_name ))
4949 hist_effnp .append (infile_eff .Get (hist_effnp_name ))
5050 if not isinstance (hist_effp [- 1 ], ROOT .TH1 ):
51- sys .exit (f"Fatal error: Histogram with efficiency for prompt \" { hist_effp_name } \" is absent. Exit." )
51+ sys .exit (f"\33 [31mFatal error: Histogram with efficiency for prompt \" { hist_effp_name } \" is absent. Exit.\33 [0m " )
5252 if not isinstance (hist_effnp [- 1 ], ROOT .TH1 ):
53- sys .exit (f"Fatal error: Histogram with efficiency for nonprompt \" { hist_effnp } \" is absent. Exit." )
53+ sys .exit (f"\33 [31mFatal error: Histogram with efficiency for nonprompt \" { hist_effnp } \" is absent. Exit.\33 [0m " )
5454 hist_effp [- 1 ].SetDirectory (0 )
5555 hist_effnp [- 1 ].SetDirectory (0 )
5656 infile_eff .Close ()
5757
5858 pt_bin_to_process = cfg .get ("pt_bin_to_process" , - 1 )
5959 if not isinstance (pt_bin_to_process , int ):
60- sys .exit ("Fatal error: pt_bin_to_process must be an integer value. Exit." )
60+ sys .exit ("\33 [31mFatal error: pt_bin_to_process must be an integer value. Exit." )
6161 if (pt_bin_to_process != - 1 and pt_bin_to_process < 1 ) or pt_bin_to_process > hist_rawy [0 ].GetNbinsX ():
62- sys .exit ("Fatal error: pt_bin_to_process must be a positive value up to number of bins in raw yield histogram. Exit." )
62+ sys .exit ("\33 [31mFatal error: pt_bin_to_process must be a positive value up to number of bins in raw yield histogram. Exit." )
6363
6464 is_draw_title_rawy = cfg .get ("is_draw_title" , {}).get ("rawy" , True )
6565 is_draw_title_eff = cfg .get ("is_draw_title" , {}).get ("eff" , False )
@@ -73,11 +73,11 @@ def main(config):
7373 hist_central_effp_name = cfg ["central_efficiency" ]["histonames" ]["prompt" ]
7474 hist_central_effp = infile_central_eff .Get (hist_central_effp_name )
7575 if not isinstance (hist_central_effp [- 1 ], ROOT .TH1 ):
76- sys .exit (f"Fatal error: Histogram with central efficiency for prompt \" { hist_central_effp_name } \" is absent. Exit." )
76+ sys .exit (f"\33 [31mFatal error: Histogram with central efficiency for prompt \" { hist_central_effp_name } \" is absent. Exit.\33 [0m " )
7777 hist_central_effnp_name = cfg ["central_efficiency" ]["histonames" ]["nonprompt" ]
7878 hist_central_effnp = infile_central_eff .Get (hist_central_effnp_name )
7979 if not isinstance (hist_central_effnp [- 1 ], ROOT .TH1 ):
80- sys .exit (f"Fatal error: Histogram with central efficiency for nonprompt \" { hist_central_effnp_name } \" is absent. Exit." )
80+ sys .exit (f"\33 [31mFatal error: Histogram with central efficiency for nonprompt \" { hist_central_effnp_name } \" is absent. Exit.\33 [0m " )
8181 hist_central_effp .SetDirectory (0 )
8282 hist_central_effnp .SetDirectory (0 )
8383 infile_central_eff .Close ()
@@ -177,10 +177,10 @@ def main(config):
177177
178178 if cfg ["minimisation" ]["correlated" ]:
179179 if not (np .all (rawy [1 :] > rawy [:- 1 ]) or np .all (rawy [1 :] < rawy [:- 1 ])):
180- print ("WARNING ! main(): the raw yield vector is not monotonous. Check the input for stability." )
180+ print ("\0 \33 [33mWARNING ! main(): the raw yield vector is not monotonous. Check the input for stability.\0 \33 [0m " )
181181 print (f"raw yield vector elements = { rawy } \n " )
182182 if not (np .all (unc_rawy [1 :] > unc_rawy [:- 1 ]) or np .all (unc_rawy [1 :] < unc_rawy [:- 1 ])):
183- print ("WARNING ! main(): the raw yield uncertainties vector is not monotonous. Check the input for stability." )
183+ print ("\0 \33 [33mWARNING ! main(): the raw yield uncertainties vector is not monotonous. Check the input for stability.\0 \33 [0m " )
184184 print (f"raw yield uncertainties vector elements = { unc_rawy } \n " )
185185
186186 minimiser = CutVarMinimiser (rawy , effp , effnp , unc_rawy , unc_effp , unc_effnp )
0 commit comments