Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:43

0001 //---------Author's Name: B.Fabbro DSM/IRFU/SPP CEA-Saclay
0002 //----------Copyright: Those valid for CEA sofware
0003 //----------Modified: 24/03/2010
0004 
0005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParCout.h"
0006 
0007 //--------------------------------------
0008 //  TEcnaParCout.cc
0009 //  Class creation: 11 March 2008
0010 //  Documentation: see TEcnaParCout.h
0011 //--------------------------------------
0012 
0013 ClassImp(TEcnaParCout);
0014 //______________________________________________________________________________
0015 //
0016 
0017 TEcnaParCout::~TEcnaParCout() {
0018   //destructor
0019   // std::cout << "[Info Management] CLASS: TEcnaParCout.       DESTROY OBJECT: this = " << this << std::endl;
0020 }
0021 //===================================================================
0022 //
0023 //                   Constructors
0024 //
0025 //===================================================================
0026 TEcnaParCout::TEcnaParCout() {
0027   // Constructor without argument
0028 
0029   // std::cout << "[Info Management] CLASS: TEcnaParCout.       CREATE OBJECT: this = " << this << std::endl;
0030 
0031   Init();
0032 }
0033 
0034 TEcnaParCout::TEcnaParCout(TEcnaObject* pObjectManager) {
0035   // Constructor with argument
0036 
0037   // std::cout << "[Info Management] CLASS: TEcnaParCout.       CREATE OBJECT: this = " << this << std::endl;
0038 
0039   Init();
0040   Long_t i_this = (Long_t)this;
0041   pObjectManager->RegisterPointer("TEcnaParCout", i_this);
0042 }
0043 
0044 void TEcnaParCout::Init() {
0045   fgMaxCar = (Int_t)512;  // max number of characters in TStrings
0046   fTTBELL = '\007';
0047 
0048   //................................................... Code Print
0049   fCodePrintNoComment = GetCodePrint("NoComment");
0050   fCodePrintWarnings = GetCodePrint("Warnings ");  // => default
0051   fCodePrintComments = GetCodePrint("Comments");
0052   fCodePrintAllComments = GetCodePrint("AllComments");
0053 
0054   fFlagPrint = fCodePrintWarnings;
0055 
0056   //................ Init CNA Command and error numbering
0057   fCnaCommand = 0;
0058   fCnaError = 0;
0059 }  // end of Init()
0060 
0061 //===========================================================================
0062 //
0063 //         GetCodePrint
0064 //
0065 //===========================================================================
0066 Int_t TEcnaParCout::GetCodePrint(const TString& chcode) {
0067   //Get the CodePrint values
0068 
0069   Int_t code_print = 101;  // => default: print warnings
0070 
0071   // The  values must be different
0072   if (chcode == "NoComment") {
0073     code_print = 100;
0074   }
0075   if (chcode == "Warnings") {
0076     code_print = 101;
0077   }  // => default
0078   if (chcode == "Comments") {
0079     code_print = 102;
0080   }
0081   if (chcode == "AllComments") {
0082     code_print = 103;
0083   }
0084 
0085   return code_print;
0086 }