Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #pragma once
0002 
0003 #include <utility>
0004 using namespace std;
0005 namespace InttQa
0006 {
0007   /*!
0008     @brief A common header file for INTT QA
0009    */
0010   // common variables
0011   const int kFelix_num = 8; //! the number of our FELIX server
0012   const int kFee_num   = 14;  //! the number of half-ladders in a single FELIX server
0013   const int kChip_num  = 26; //! the number of chip in a half-ladder
0014   const int kChan_num  = 128; //! the number of channel in a single chip
0015   const int kFirst_pid = 3001; //! the first pid (packet ID), which means intt0
0016   const int kBco_max   = 128;
0017 
0018   const int kColors[10] = {
0019     kBlack,    kRed,       kBlue, 
0020     kGreen+2,  kMagenta+1, kYellow+1, 
0021     kCyan+1,   kOrange+1,  kBlue+9, 
0022     kGray + 2
0023   }; //! A list of nice colors
0024 
0025   // functions depending on variables above
0026 
0027   //! It returns int, which can be used as color in ROOT, for num-th graph/histograms. It checks if given parameter is in the range or not.
0028   template < class aaa >
0029   int GetColor( aaa num )
0030   {
0031     assert( 0 <= num && num < 10 );
0032     return InttQa::kColors[ num ];
0033   }
0034 
0035   //! Some configuration is done for a better-looking histogram
0036   template < class TH >
0037   void HistConfig( TH* hist, int index=0 )
0038   {
0039     hist->SetLineColor( InttQa::GetColor(index) );
0040     hist->SetFillColorAlpha( hist->GetLineColor(), 0.1 );
0041   }
0042 
0043 } // end of namespace InttQa