CMS 3D CMS Logo

TCnaParameters.cc

Go to the documentation of this file.
00001 //---------Author's Name: B.Fabbro DSM/DAPNIA/SPP CEA-Saclay
00002 //----------Copyright: Those valid for CEA sofware
00003 //----------Modified: 07/06/2007 - CNA version 3.1 -
00004 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaParameters.h"
00005 
00006 ClassImp(TCnaParameters)
00007 //______________________________________________________________________________
00008 //
00009 // TCnaParameters.
00010 //
00011 //    Values of different parameters for plots in the framework of TCnaViewEB
00012 //    (see description of this class)
00013 //
00014 //    Examples of parameters:  ymin and ymax values for histos, 
00015 //                             "Period of Run" description by TString
00016 //
00017 //-------------------------------------------------------------------------
00018 //
00019 //        For more details on other classes of the CNA package:
00020 //
00021 //                 https://www.cern.ch/cms-fabbro/cna
00022 //
00023 //-------------------------------------------------------------------------
00024 //
00025 
00026 //---------------------- TCnaParameters.cxx -----------------------------
00027 //  
00028 //   Creation (first version): 19 May 2005
00029 //
00030 //   For questions or comments, please send e-mail to Bernard Fabbro:
00031 //             
00032 //   fabbro@hep.saclay.cea.fr 
00033 //
00034 //------------------------------------------------------------------------
00035 
00036   TCnaParameters::~TCnaParameters()
00037 {
00038 //destructor
00039 
00040 }
00041 
00042 //===================================================================
00043 //
00044 //                   Constructor without arguments
00045 //
00046 //===================================================================
00047 TCnaParameters::TCnaParameters()
00048 {
00049   Init();
00050 }
00051 
00052 void  TCnaParameters::Init()
00053 {
00054   fgMaxCar = (Int_t)512;
00055 }
00056 
00057 //===================================================================
00058 //
00059 //                   Methods
00060 //
00061 //===================================================================
00062 
00063 //===========================================================================
00064 //
00065 //               SetPeriodTitles,  PeriodOfRun
00066 //
00067 //===========================================================================
00068 void TCnaParameters::SetPeriodTitles()
00069 {
00070 //Define the titles of the periods
00071 
00072   fPeriod2002   = "Test beam 2002. Module M0'";
00073 
00074   fPeriod2003   = "Test beam during 2003: SM0 and SM1";
00075 
00076   fPeriod2004_1 = "29 May - 08 June 2004: first period with E0'";
00077   fPeriod2004_2 = "08 - 22 June 2004: second period with E0'";
00078   fPeriod2004_3 = "27 June - 07 July 2004: third period with E0'";
00079   fPeriod2004_4 = "21 July - 05 August 2004: fourth period with E0'";
00080   fPeriod2004_5 = "02 - 06 Sept 2004: fifth period with E0'";
00081   fPeriod2004_6 = "05 Oct - 16 Nov: Test beam 2004 supermodule SM10 ";
00082 
00083   fPeriod2005   = "Cosmic ray test in H4";
00084   fPeriod2006_1 = "Cosmic ray test in H4";
00085   fPeriod2006_2 = "Test beam CMS/ECAL";
00086 
00087 }
00088 //..................................................................
00089 TString TCnaParameters::PeriodOfRun(const Int_t& run_number)
00090 {
00091 //Set the period of the run from the correspondance between
00092 //run numbers and period
00093 
00094   TString chperiod;
00095   Int_t MaxCar = fgMaxCar;
00096   chperiod.Resize(MaxCar);
00097   chperiod = "(no period info)";
00098 
00099   //......................................................... 2002
00100   if ( run_number >= 50000  &&  run_number < 59999 )
00101     {chperiod = fPeriod2002;}
00102   //......................................................... 2003
00103   if ( run_number >= 60000 && run_number < 68050 )
00104     {chperiod = fPeriod2003;}
00105 
00106   //......................................................... 2004
00107   if ( run_number >= 68051 && run_number < 69055 )
00108     {chperiod = fPeriod2004_1;}
00109 
00110   if ( run_number >= 69056 && run_number < 70299 )
00111     {chperiod = fPeriod2004_2;}
00112   
00113   if ( run_number >= 70300 && run_number < 71332 )
00114     {chperiod = fPeriod2004_3;}
00115   
00116   if ( run_number >= 71333 && run_number < 72188 )
00117     {chperiod = fPeriod2004_4;}
00118   
00119   if ( run_number >= 72189 && run_number < 72744 )
00120     {chperiod = fPeriod2004_5;}
00121 
00122   if ( run_number >= 72745 && run_number < 9999999 )
00123     {chperiod = fPeriod2004_6;}
00124 
00125   //......................................................... 2005
00126   // no test beam in 2005
00127 
00128   //......................................................... 2006
00129   if ( run_number > 0 )
00130     {chperiod = fPeriod2006_2;}
00131   
00132  return chperiod;
00133 }
00134 //===========================================================================
00135 //
00136 //        GetCodePrintNoComment(),   
00137 //
00138 //===========================================================================
00139 Int_t TCnaParameters::GetCodePrint(const TString chcode)
00140 {
00141 //Get the CodePrint values
00142 
00143   Int_t code_print = 101;  // => default value: print warnings
00144 
00145   // The  values must be different
00146 
00147   if( chcode == "NoComment"   ){code_print = 100;}
00148   if( chcode == "Warnings"    ){code_print = 101;}      // => default value
00149   if( chcode == "Comments"    ){code_print = 102;}
00150   if( chcode == "AllComments" ){code_print = 103;}
00151 
00152   return code_print;
00153 }

Generated on Tue Jun 9 17:25:16 2009 for CMSSW by  doxygen 1.5.4