R__dummyintdefault13_c

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
//----------Author's Name:FX Gentit and B.Fabbro  DSM/IRFU/SPP CEA-Saclay
//----------Copyright:Those valid for CEA software
//----------Modified:24/03/2011

#include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaHeader.h"

//--------------------------------------
//  TEcnaHeader.cc
//  Class creation: 03 Dec 2002
//  Documentation: see TEcnaHeader.h
//--------------------------------------

ClassImp(TEcnaHeader);
//____________________________________________________________________________

TEcnaHeader::TEcnaHeader() { Init(); }  // constructor without arguments

TEcnaHeader::TEcnaHeader(TEcnaObject* pObjectManager, const Text_t* name, const Text_t* title) : TNamed(name, title) {
  // Constructor with arguments for reading ROOT file.
  // Called in FileParameters(...) of TEcnaRead
  // Please give a name and a title containing info about what
  // you are doing and saving in the ROOT file

  // std::cout << "[Info Management] CLASS: TEcnaHeader.        CREATE OBJECT: this = " << this << std::endl;

  Init();
  Long_t i_this = (Long_t)this;
  pObjectManager->RegisterPointer("TEcnaHeader", i_this);
}

TEcnaHeader::~TEcnaHeader() {
  //destructor

  // std::cout << "[Info Management] CLASS: TEcnaHeader.        DESTROY OBJECT: this = " << this << std::endl;
}

void TEcnaHeader::Init() {
  //Set default values in all variables and init the counters fxxxCalc

  //--------------------------------- INIT parameters

  fgMaxCar = (Int_t)512;

  //........................ RUN parameters

  fTypAna = "!Analysis name> no info";
  fNbOfSamples = (Int_t)0;
  fRunNumber = (Int_t)0;
  fFirstReqEvtNumber = (Int_t)0;
  fLastReqEvtNumber = (Int_t)0;
  fReqNbOfEvts = (Int_t)0;
  fStex = (Int_t)0;

  fStartTime = (time_t)0;
  fStopTime = (time_t)0;

  Int_t MaxCar = fgMaxCar;
  fStartDate.Resize(MaxCar);
  fStartDate = "!Start date> no info";
  MaxCar = fgMaxCar;
  fStopDate.Resize(MaxCar);
  fStopDate = "!Stop  date> no info";

  fRunType = 9999999;

  //--------------------------------- INIT counters
  fStinNumbersCalc = 0;
  fNbOfEvtsCalc = 0;
  fAdcEvtCalc = 0;
  fMSpCalc = 0;
  fSSpCalc = 0;

  fCovCssCalc = 0;
  fCorCssCalc = 0;
  fHfCovCalc = 0;
  fHfCorCalc = 0;
  fLfCovCalc = 0;
  fLfCorCalc = 0;
  fLFccMoStinsCalc = 0;
  fHFccMoStinsCalc = 0;
  fPedCalc = 0;
  fTnoCalc = 0;
  fMeanCorssCalc = 0;
  fLfnCalc = 0;
  fHfnCalc = 0;
  fSigCorssCalc = 0;

  fAvPedCalc = 0;
  fAvTnoCalc = 0;
  fAvLfnCalc = 0;
  fAvHfnCalc = 0;
  fAvMeanCorssCalc = 0;
  fAvSigCorssCalc = 0;
}
// ------------ end of Init() ------------

void TEcnaHeader::HeaderParameters(const TString& typ_ana,
                                   const Int_t& nb_of_samples,
                                   const Int_t& run_number,
                                   const Int_t& aFirstReqEvtNumber,
                                   const Int_t& aLastReqEvtNumber,
                                   const Int_t& aReqNbOfEvts,
                                   const Int_t& Stex,
                                   const Int_t& run_type) {
  // Constructor with arguments for reading DATA.
  // Called in GetReadyToReadData(...) of TEcnaRun
  // Please give a name and a title containing info about what
  // you are doing and saving in the ROOT file

  // std::cout << "[Info Management] CLASS: TEcnaHeader.        CREATE OBJECT: this = " << this << std::endl;

  Init();

  fTypAna = typ_ana;
  fRunNumber = run_number;
  fNbOfSamples = nb_of_samples;
  fFirstReqEvtNumber = aFirstReqEvtNumber;
  fLastReqEvtNumber = aLastReqEvtNumber;
  fReqNbOfEvts = aReqNbOfEvts;
  fStex = Stex;

  fRunType = run_type;
}
//------------------------------------------------------------------------------

void TEcnaHeader::HeaderParameters(const TString& typ_ana,
                                   const Int_t& nb_of_samples,
                                   const Int_t& run_number,
                                   const Int_t& aFirstReqEvtNumber,
                                   const Int_t& aLastReqEvtNumber,
                                   const Int_t& aReqNbOfEvts,
                                   const Int_t& Stex) {
  // std::cout << "[Info Management] CLASS: TEcnaHeader.        CREATE OBJECT: this = " << this << std::endl;

  Init();

  fTypAna = typ_ana;
  fRunNumber = run_number;
  fNbOfSamples = nb_of_samples;
  fFirstReqEvtNumber = aFirstReqEvtNumber;
  fLastReqEvtNumber = aLastReqEvtNumber;
  fReqNbOfEvts = aReqNbOfEvts;
  fStex = Stex;
}

void TEcnaHeader::Print() {
  // Print the header
  std::cout << std::endl;
  std::cout << "     Header parameters " << std::endl;
  std::cout << std::endl;
  std::cout << "Run number                   : " << fRunNumber << std::endl;
  std::cout << "First requested event number : " << fFirstReqEvtNumber << std::endl;
  std::cout << "Last requested event number  : " << fLastReqEvtNumber << std::endl;
  std::cout << "Requested number of events   : " << fReqNbOfEvts << std::endl;
  std::cout << "SM or Dee number             : " << fStex << std::endl;
  std::cout << "Time first event             : " << fStartTime << std::endl;
  std::cout << "Time last event              : " << fStopTime << std::endl;
  std::cout << "Date first event             : " << fStartDate.Data() << std::endl;
  std::cout << "Date last event              : " << fStopDate.Data() << std::endl;
  std::cout << "Run type                     : " << fRunType << std::endl;
  std::cout << std::endl;
  std::cout << "     Header counters " << std::endl;
  std::cout << std::endl;
  std::cout << "Stin Numbers                                 : " << fStinNumbersCalc << std::endl;
  std::cout << "Numbers of found evts                        : " << fNbOfEvtsCalc << std::endl;
  std::cout << "Samples as a function of time histograms     : " << fAdcEvtCalc << std::endl;
  std::cout << "Expectation values histogram                 : " << fMSpCalc << std::endl;
  std::cout << "Variances histogram                          : " << fSSpCalc << std::endl;
  std::cout << "Average total noise                         : " << fAvTnoCalc << std::endl;
  std::cout << "Average low frequency noise                 : " << fAvLfnCalc << std::endl;
  std::cout << "Average high frequency noise                : " << fAvHfnCalc << std::endl;

  std::cout << "Nb of (sample,sample) covariance  matrices   : " << fCovCssCalc << std::endl;
  std::cout << "Nb of (sample,sample) correlation matrices   : " << fCorCssCalc << std::endl;
  std::cout << "Nb of (channel,channel) covariance  matrices : " << fHfCovCalc << std::endl;
  std::cout << "Nb of (channel,channel) correlation matrices : " << fHfCorCalc << std::endl;
  std::cout << "Nb of (channel,channel) cov mat mean on samp : " << fLfCovCalc << std::endl;
  std::cout << "Nb of (channel,channel) cor mat mean on samp : " << fLfCorCalc << std::endl;
  std::cout << "Nb of mean cov(c,c) mean on samp, all Stins  : " << fLfCovCalc << std::endl;
  std::cout << "Nb of mean cor(c,c) mean on samp, all Stins  : " << fLfCorCalc << std::endl;

  std::cout << "Exp. val. of the exp. val. of the samples    : " << fPedCalc << std::endl;
  std::cout << "Expect. val. of the sigmas of the samples    : " << fTnoCalc << std::endl;
  std::cout << "Expect. val. of the (samp,samp) correlations : " << fMeanCorssCalc << std::endl;

  std::cout << "Sigmas of the exp. val. of the samples       : " << fLfnCalc << std::endl;
  std::cout << "Sigmas of the sigmas of the samples          : " << fHfnCalc << std::endl;
  std::cout << "Sigmas of the (samp,samp) correlations       : " << fSigCorssCalc << std::endl;

  std::cout << "Average pedestals                           : " << fAvPedCalc << std::endl;
  std::cout << "Average mean cor(s,s)                    : " << fAvMeanCorssCalc << std::endl;
  std::cout << "Average sigma of Cor(s,s)                   : " << fAvSigCorssCalc << std::endl;
  std::cout << std::endl;
}