Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:14:01

0001 #pragma once
0002 #include <sPhenixStyle.C>
0003 
0004 #include "Event.hh"
0005 
0006 class Analysis
0007 {
0008 private:
0009   string root_path_ = "";
0010   string text_path_ = "";
0011   string output_ = "results/streaming_timing_run00050889";
0012   
0013   bool is_preliminary_ = false;
0014   bool is_logy_ = false;
0015   
0016   int shift_value_ = 5;
0017   int process_num_ = 10000;
0018   int streaming_offset_ = 23;
0019   int event_num_;
0020   
0021   double top_margin_ = 0.05; // 0.1;
0022   double right_margin_ = 0.05; // 0.15;
0023   double ymin_ = 0.1;
0024   double ymax_ = 5e5;
0025   
0026   TH1D* hist_fphx_bco_;
0027   TH1D* hist_fphx_bco_raw_;
0028   
0029   vector < Event* > events_;
0030   
0031   void Init( string data_no_suffix );
0032   void InitRoot();
0033   void InitText();
0034 
0035   template < class T >
0036   void ConfigureHist( T* hist )
0037   {
0038     hist->GetXaxis()->CenterTitle();
0039     hist->GetYaxis()->CenterTitle();
0040     hist->SetLineWidth( 3 );
0041 
0042     hist->GetXaxis()->SetLabelSize( 0.05 );
0043     hist->GetXaxis()->SetTitleSize( 0.05 );
0044     //  hist->GetXaxis()->SetRangeUser( 0, 500 );
0045     
0046     hist->GetYaxis()->SetLabelSize( 0.05 );
0047     hist->GetYaxis()->SetTitleSize( 0.05 );
0048     //  hist->GetYaxis()->SetRangeUser( 0, 500 );  
0049   }
0050   
0051   string GetDate();
0052   void DrawWords( Event* event );
0053   void DrawGl1Timing( Event* event );
0054   TH1D* GetShiftedHist( TH1D* hist_arg );
0055 
0056 public:
0057   Analysis( string text, bool is_preliminary=false );
0058   
0059   void Draw();
0060 
0061   void SetPreliminary( bool flag ){ is_preliminary_ = flag;};
0062 };
0063 
0064 
0065 #ifndef Analysis_cc
0066 #include "Analysis.cc"
0067 #endif