CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TEcnaRead Class Reference

#include <TEcnaRead.h>

List of all members.

Public Member Functions

void Adelete (const TString)
void Anew (const TString)
Bool_t CloseRootFile (const Text_t *)
Bool_t DataExist ()
TString GetAnalysisName ()
Int_t GetFirstReqEvtNumber ()
Int_t GetNumberOfBinsSampleAsFunctionOfTime ()
void GetReadyToReadRootFile (TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, TString)
Int_t GetReqNbOfEvts ()
TString GetRootFileName ()
TString GetRootFileNameShort ()
TString GetRunType ()
TString GetStartDate ()
time_t GetStartTime ()
Int_t GetStexStinFromIndex (const Int_t &)
Int_t GetStinIndex (const Int_t &)
TString GetStopDate ()
time_t GetStopTime ()
TString GetTypeOfQuantity (const CnaResultTyp)
void Init ()
Bool_t LookAtRootFile ()
Bool_t OpenRootFile (const Text_t *, TString)
TEcnaReadoperator= (const TEcnaRead &)
void PrintAllComments ()
void PrintComments ()
void PrintNoComment ()
void PrintWarnings ()
TVectorD ReadAveragedHighFrequencyNoise (const Int_t &)
TVectorD ReadAveragedLowFrequencyNoise (const Int_t &)
TVectorD ReadAveragedMeanOfCorrelationsBetweenSamples (const Int_t &)
TVectorD ReadAveragedNumberOfEvents (const Int_t &)
TVectorD ReadAveragedPedestals (const Int_t &)
TVectorD ReadAveragedSigmaOfCorrelationsBetweenSamples (const Int_t &)
TVectorD ReadAveragedTotalNoise (const Int_t &)
TMatrixD ReadCorrelationsBetweenSamples (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadCovariancesBetweenSamples (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels (const Int_t &)
TMatrixD ReadHighFrequencyCovariancesBetweenChannels (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadHighFrequencyCovariancesBetweenChannels (const Int_t &)
TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins (const Int_t &)
TVectorD ReadHighFrequencyNoise (const Int_t &)
TMatrixD ReadLowFrequencyCorrelationsBetweenChannels (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyCorrelationsBetweenChannels (const Int_t &)
TMatrixD ReadLowFrequencyCovariancesBetweenChannels (const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyCovariancesBetweenChannels (const Int_t &)
TMatrixD ReadLowFrequencyMeanCorrelationsBetweenStins (const Int_t &)
TVectorD ReadLowFrequencyNoise (const Int_t &)
TVectorD ReadMeanOfCorrelationsBetweenSamples (const Int_t &)
TVectorD ReadNumberOfEvents (const Int_t &)
TMatrixD ReadNumberOfEventsForSamples (const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadPedestals (const Int_t &)
TVectorD ReadRelevantCorrelationsBetweenSamples (const Int_t &, const Int_t &, const Int_t &)
Bool_t ReadRootFileHeader (const Int_t &)
TVectorD ReadSampleMeans (const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSampleSigmas (const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSampleValues (const Int_t &, const Int_t &, const Int_t &)
Double_t *** ReadSampleValuesSameFile (const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSigmaOfCorrelationsBetweenSamples (const Int_t &)
TVectorD ReadStinNumbers (const Int_t &)
TVectorD ReadTotalNoise (const Int_t &)
void SetEcalSubDetector (const TString, const TEcnaNumbering *, const TEcnaWrite *)
 TEcnaRead (const TEcnaRead &)
 TEcnaRead ()
 TEcnaRead (const TString, const TEcnaParPaths *, const TEcnaParCout *, const TEcnaHeader *, const TEcnaNumbering *, const TEcnaWrite *)
virtual ~TEcnaRead ()

Private Member Functions

void fCopy (const TEcnaRead &)

Private Attributes

Int_t fCdelete
TEcnaParCoutfCnaParCout
TEcnaParPathsfCnaParPaths
TEcnaWritefCnaWrite
Int_t fCnew
Int_t fCodePrintAllComments
Int_t fCodePrintComments
Int_t fCodePrintNoComment
Int_t fCodePrintWarnings
Bool_t fDataExist
TEcnaParEcalfEcal
TEcnaNumberingfEcalNumbering
TEcnaHeaderfFileHeader
Int_t fFlagPrint
TString fFlagSubDet
Int_t fgMaxCar
Int_t fLookAtRootFile
Int_t fMemoStinNumbers
Int_t fNbChanByLine
Int_t fNbSampByLine
Bool_t fOpenRootFile
TString fPathRoot
Int_t fReadyToReadRootFile
Int_t fSectChanSizeX
Int_t fSectChanSizeY
Int_t fSectSampSizeX
Int_t fSectSampSizeY
TString fStexName
TString fStinName
Int_t * fT1d_StexStinFromIndex
Double_t * fT3d1_distribs
Double_t ** fT3d2_distribs
Double_t *** fT3d_distribs
Int_t * fTagStinNumbers
TString fTTBELL
Int_t fUserChan
Int_t fUserSamp

Detailed Description

Definition at line 38 of file TEcnaRead.h.


Constructor & Destructor Documentation

TEcnaRead::TEcnaRead ( )
TEcnaRead::TEcnaRead ( const TString  SubDet,
const TEcnaParPaths pCnaParPaths,
const TEcnaParCout pCnaParCout,
const TEcnaHeader pFileHeader,
const TEcnaNumbering pEcalNumbering,
const TEcnaWrite pCnaWrite 
)

Definition at line 272 of file TEcnaRead.cc.

References fCnaParCout, fCnaParPaths, fFileHeader, Init(), and SetEcalSubDetector().

{
//Constructor with argument

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

  fCnaParPaths = 0;
  if( pCnaParPaths == 0 )
    {fCnaParPaths = new TEcnaParPaths(); /* Anew("fCnaParPaths");*/ }
  else
    {fCnaParPaths = (TEcnaParPaths*)pCnaParPaths;}

  fCnaParCout  = 0;
  if( pCnaParCout == 0 )
    {fCnaParCout = new TEcnaParCout();   /*Anew("fCnaParCout");*/ }
  else
    {fCnaParCout = (TEcnaParCout*)pCnaParCout;}

  fFileHeader  = 0; 
  if( pFileHeader == 0 )
    {
      const Text_t *h_name  = "CnaHeader";  //==> voir cette question avec FXG
      const Text_t *h_title = "CnaHeader";  //==> voir cette question avec FXG
      fFileHeader = new TEcnaHeader(h_name, h_title);  // Anew("fFileHeader");
    }
  else
    {fFileHeader = (TEcnaHeader*)pFileHeader;}

  Init();
  SetEcalSubDetector(SubDet.Data(), pEcalNumbering, pCnaWrite);
}
TEcnaRead::TEcnaRead ( const TEcnaRead dcop)

Definition at line 452 of file TEcnaRead.cc.

References gather_cfg::cout.

{
  cout << "*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> "
       << " It is time to write a copy constructor" << endl
    // << " type an integer value and then RETURN to continue"
       << endl;
  
  // { Int_t cintoto;  cin >> cintoto; }
  
}
TEcnaRead::~TEcnaRead ( ) [virtual]

Definition at line 483 of file TEcnaRead.cc.

References Adelete(), gather_cfg::cout, fCdelete, fCnew, fCodePrintAllComments, fCodePrintComments, fFlagPrint, fT1d_StexStinFromIndex, fT3d1_distribs, fT3d2_distribs, fT3d_distribs, fTagStinNumbers, and fTTBELL.

{
//Destructor
  
  // cout << "[Info Management] CLASS: TEcnaRead.          DESTROY OBJECT: this = " << this << endl;

  if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){
    cout << "*TEcnaRead::~TEcnaRead()> Entering destructor" << endl;}
  
  //if (fFileHeader    != 0){delete fFileHeader;    Adelete("fFileHeader");}
  //if (fEcal          != 0){delete fEcal;          Adelete("fEcal");}
  //if (fCnaParCout    != 0){delete fCnaParCout;    Adelete("fCnaParCout");}
  //if (fCnaParPaths   != 0){delete fCnaParPaths;   Adelete("fCnaParPaths");}
  //if (fCnaWrite      != 0){delete fCnaWrite;      Adelete("fCnaWrite");}
  //if (fEcalNumbering != 0){delete fEcalNumbering; Adelete("fEcalNumbering");}

  if (fT1d_StexStinFromIndex != 0){delete [] fT1d_StexStinFromIndex; Adelete("fT1d_StexStinFromIndex");}
  if (fTagStinNumbers        != 0){delete [] fTagStinNumbers;        Adelete("fTagStinNumbers");}

  if (fT3d_distribs  != 0){delete [] fT3d_distribs;  Adelete("fT3d_distribs");}
  if (fT3d2_distribs != 0){delete [] fT3d2_distribs; Adelete("fT3d2_distribs");}
  if (fT3d1_distribs != 0){delete [] fT3d1_distribs; Adelete("fT3d1_distribs");}

  if ( fCnew != fCdelete )
    {
      cout << "!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = "
           << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl;
    }
  else
    {
      // cout << "*TEcnaRead/destructor> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = "
      //      << fCnew << ", fCdelete = " << fCdelete << endl;
    }
  
  if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){
    cout << "*TEcnaRead::~TEcnaRead()> End of destructor " << endl;}
}

Member Function Documentation

void TEcnaRead::Adelete ( const TString  VarName)

Definition at line 403 of file TEcnaRead.cc.

References fCdelete.

Referenced by CloseRootFile(), OpenRootFile(), and ~TEcnaRead().

{
  // allocation survey for delete
  
  fCdelete++;
  // cout << "TEcnaRead::Adelete> ========== delete" << setw(4) << fCdelete << " -> " << setw(25)
  //      << VarName.Data() << " / object(this): " << this << endl;
}
void TEcnaRead::Anew ( const TString  VarName)

Definition at line 394 of file TEcnaRead.cc.

References fCnew.

Referenced by LookAtRootFile(), and OpenRootFile().

{
  // allocation survey for new
  
  fCnew++;
  // cout << "TEcnaRead::Anew---> new " << setw(4) << fCnew << " --------------> " << setw(25)
  //      << VarName.Data() << " / object(this): " << this << endl;
}
Bool_t TEcnaRead::CloseRootFile ( const Text_t *  name)

Definition at line 844 of file TEcnaRead.cc.

References Adelete(), TCnaRootFile::CloseFile(), gather_cfg::cout, fCodePrintAllComments, fFlagPrint, fOpenRootFile, fTTBELL, and gCnaRootFile.

Referenced by ReadAveragedHighFrequencyNoise(), ReadAveragedLowFrequencyNoise(), ReadAveragedMeanOfCorrelationsBetweenSamples(), ReadAveragedPedestals(), ReadAveragedSigmaOfCorrelationsBetweenSamples(), ReadAveragedTotalNoise(), ReadCorrelationsBetweenSamples(), ReadCovariancesBetweenSamples(), ReadHighFrequencyCorrelationsBetweenChannels(), ReadHighFrequencyCovariancesBetweenChannels(), ReadHighFrequencyMeanCorrelationsBetweenStins(), ReadHighFrequencyNoise(), ReadLowFrequencyCorrelationsBetweenChannels(), ReadLowFrequencyCovariancesBetweenChannels(), ReadLowFrequencyMeanCorrelationsBetweenStins(), ReadLowFrequencyNoise(), ReadMeanOfCorrelationsBetweenSamples(), ReadNumberOfEventsForSamples(), ReadPedestals(), ReadRelevantCorrelationsBetweenSamples(), ReadRootFileHeader(), ReadSampleMeans(), ReadSampleSigmas(), ReadSampleValues(), ReadSampleValuesSameFile(), ReadSigmaOfCorrelationsBetweenSamples(), ReadStinNumbers(), and ReadTotalNoise().

                                                  {
//Close the Root file
 
  Bool_t ok_close = kFALSE;

  if (fOpenRootFile == kTRUE ) 
    {
      gCnaRootFile->CloseFile();
      
      if(fFlagPrint == fCodePrintAllComments){
        TString e_path;  e_path.Append(name);
        cout << "*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() << " OK " << endl;}
      
      if( gCnaRootFile != 0 ){delete gCnaRootFile;   gCnaRootFile = 0;  Adelete("gCnaRootFile");}
      fOpenRootFile = kFALSE;
      ok_close      = kTRUE;
    }
  else
    {
      cout << "*TEcnaRead::CloseRootFile(...)> no close since no file is open"
           << fTTBELL << endl;
    }

  return ok_close;
}
Bool_t TEcnaRead::DataExist ( )

Definition at line 876 of file TEcnaRead.cc.

References fDataExist.

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::GetOkViewHisto(), TEcnaRun::ReadEventDistributions(), TEcnaHistos::StexHocoVecoLHFCorcc(), TEcnaHistos::ViewHisto(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewStas(), TEcnaHistos::ViewStex(), and TEcnaHistos::ViewStin().

{
  // return kTRUE if the data are present in the ROOT file, kFALSE if not.
  // fDataExist is set in the read methods

  return fDataExist;
}
void TEcnaRead::fCopy ( const TEcnaRead rund) [private]
TString TEcnaRead::GetAnalysisName ( )

Definition at line 3188 of file TEcnaRead.cc.

References gather_cfg::cout, fFileHeader, and TEcnaHeader::fTypAna.

{
  TString astring = "?";
  if (fFileHeader != 0){astring = fFileHeader->fTypAna;}
  else {cout << "!TEcnaRead::GetAnalysisName()> fFileHeader pointer = "
             << fFileHeader << endl;}
  return astring;
}
Int_t TEcnaRead::GetFirstReqEvtNumber ( )

Definition at line 3197 of file TEcnaRead.cc.

References gather_cfg::cout, fFileHeader, and TEcnaHeader::fFirstReqEvtNumber.

{
  Int_t number = -1;
  if (fFileHeader != 0){number = fFileHeader->fFirstReqEvtNumber;}
  else {cout << "!TEcnaRead::GetFirstReqEvtNumber()> fFileHeader pointer = "
             << fFileHeader << endl;}
  return number;
}
Int_t TEcnaRead::GetNumberOfBinsSampleAsFunctionOfTime ( )

Definition at line 3216 of file TEcnaRead.cc.

References GetReqNbOfEvts().

{return GetReqNbOfEvts();}
void TEcnaRead::GetReadyToReadRootFile ( TString  typ_ana,
const Int_t &  nb_of_samples,
const Int_t &  run_number,
const Int_t &  nfirst,
const Int_t &  nlast,
const Int_t &  nreqevts,
const Int_t &  Stex,
TString  path_root 
)

Definition at line 532 of file TEcnaRead.cc.

References gather_cfg::cout, fCnaWrite, fCodePrintAllComments, fCodePrintComments, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagPrint, TEcnaHeader::fLastReqEvtNumber, TEcnaWrite::fMakeResultsFileName(), fMemoStinNumbers, TEcnaHeader::fNbOfSamples, fPathRoot, fReadyToReadRootFile, TEcnaHeader::fReqNbOfEvts, TEcnaHeader::fRunNumber, TEcnaHeader::fStex, TEcnaHeader::fTypAna, TEcnaHeader::HeaderParameters(), nlast, and TEcnaWrite::RegisterFileParameters().

Referenced by TEcnaRun::ReadEventDistributions(), TEcnaHistos::StexHocoVecoLHFCorcc(), TEcnaHistos::ViewHistime(), TEcnaHistos::ViewHisto(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewStas(), TEcnaHistos::ViewStex(), and TEcnaHistos::ViewStin().

{
  //Preparation for reading the ROOT file

  // Preliminary save of the arguments values because it can be of the form: fFileHeader->...
  // and because fFileHeader can be deleted and re-created in this method

  TString sTypAna      = typ_ana;
  Int_t   nNbOfSamples = nb_of_samples;
  Int_t   nRunNumber   = run_number;
  Int_t   nFirstEvt    = nfirst;
  Int_t   nLastEvt     = nlast;
  Int_t   nReqNbOfEvts = nreqevts;
  Int_t   nStexNumber  = Stex;

  //................................................................................................
  const Text_t *h_name  = "CnaHeader";   //==> voir cette question avec FXG
  const Text_t *h_title = "CnaHeader";   //==> voir cette question avec FXG

  //----------- old version, with arguments h_name, h_title, (FXG) -----(----
  //
  // fFileHeader->HeaderParameters(h_name,    h_title,
  //                               sTypAna,   nNbOfSamples, nRunNumber,
  //                               nFirstEvt, nLastEvt, nReqNbOfEvts, nStexNumber);
  //
  //-------------------------------------------------------------------------

  //---------- new version
  if( fFileHeader == 0 ){fFileHeader = new TEcnaHeader(h_name, h_title);  /* Anew("fFileHeader") */ ;}
  fFileHeader->HeaderParameters(sTypAna,   nNbOfSamples, nRunNumber,
                                nFirstEvt, nLastEvt,     nReqNbOfEvts, nStexNumber);

  // After this call to TEcnaHeader, we have:
  //     fFileHeader->fTypAna            = sTypAna
  //     fFileHeader->fNbOfSamples       = nNbOfSamples
  //     fFileHeader->fRunNumber         = nRunNumber
  //     fFileHeader->fFirstReqEvtNumber = nFirstEvt
  //     fFileHeader->fLastReqEvtNumber  = nLastEvt
  //     fFileHeader->fReqNbOfEvts       = nReqNbOfEvts
  //     fFileHeader->fStex              = nStexNumber                       ( GetReadyToReadRootFile(...) )
  //.......................... path_root
  fPathRoot = path_root;

  //-------- gets the arguments for the file names (long and short) and makes these names
  fCnaWrite->RegisterFileParameters(typ_ana, nb_of_samples, run_number, nfirst, nlast, nreqevts, Stex);
  fCnaWrite->fMakeResultsFileName();

  //------------------------- init Stin numbers memo flags
  fMemoStinNumbers = 0;

  if( fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments )
    {
      cout << endl;
      cout << "*TEcnaRead::GetReadyToReadRootFile(...)>" << endl
           << "          The method has been called with the following argument values:" << endl
           << "          Analysis name                = "
           << fFileHeader->fTypAna << endl
           << "          Nb of required samples       = "
           << fFileHeader->fNbOfSamples << endl
           << "          Run number                   = "
           << fFileHeader->fRunNumber << endl
           << "          First requested event number = "
           << fFileHeader->fFirstReqEvtNumber << endl
           << "          Last requested event number  = "
           << fFileHeader->fLastReqEvtNumber << endl
           << "          Requested number of events   = "
           << fFileHeader->fReqNbOfEvts << endl
           << "          Stex number                  = "
           << fFileHeader->fStex << endl
           << "          Path for the ROOT file       = "
           << fPathRoot << endl
           << endl;
    }
  
  fReadyToReadRootFile = 1;           // set flag
  
  if(fFlagPrint == fCodePrintAllComments){
    cout << "*TEcnaRead::GetReadyToReadRootFile(...)> Leaving the method."
         << endl;}
} //----------------- end of GetReadyToReadRootFile(...)
Int_t TEcnaRead::GetReqNbOfEvts ( )

Definition at line 3206 of file TEcnaRead.cc.

References gather_cfg::cout, fFileHeader, and TEcnaHeader::fReqNbOfEvts.

Referenced by GetNumberOfBinsSampleAsFunctionOfTime().

{
  Int_t number = -1;
  if (fFileHeader != 0){number = fFileHeader->fReqNbOfEvts;}
  else {cout << "!TEcnaRead::GetReqNbOfEvts()> fFileHeader pointer = "
             << fFileHeader << endl;}
  return number;
}
TString TEcnaRead::GetRootFileName ( )

Definition at line 3167 of file TEcnaRead.cc.

References fCnaWrite, and TEcnaWrite::GetRootFileName().

Referenced by TEcnaRun::ReadEventDistributions().

TString TEcnaRead::GetRootFileNameShort ( )
TString TEcnaRead::GetRunType ( )

Definition at line 625 of file TEcnaRead.cc.

References fFileHeader, and TEcnaHeader::fRunType.

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::StexHocoVecoLHFCorcc(), TEcnaHistos::ViewHisto(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewStas(), TEcnaHistos::ViewStex(), and TEcnaHistos::ViewStin().

{
  TString cType = "run type not defined";
  Int_t numtype = fFileHeader->fRunType;
  //----------------------------------------- run types

  if( numtype ==  0 ){cType = "COSMICS";}
  if( numtype ==  1 ){cType = "BEAMH4";}
  if( numtype ==  2 ){cType = "BEAMH2";}
  if( numtype ==  3 ){cType = "MTCC";}
  if( numtype ==  4 ){cType = "LASER_STD";}
  if( numtype ==  5 ){cType = "LASER_POWER_SCAN";}
  if( numtype ==  6 ){cType = "LASER_DELAY_SCAN";}
  if( numtype ==  7 ){cType = "TESTPULSE_SCAN_MEM";}
  if( numtype ==  8 ){cType = "TESTPULSE_MGPA";}
  if( numtype ==  9 ){cType = "PEDESTAL_STD";}
  if( numtype == 10 ){cType = "PEDESTAL_OFFSET_SCAN";}
  if( numtype == 11 ){cType = "PEDESTAL_25NS_SCAN";}
  if( numtype == 12 ){cType = "LED_STD";}

  if( numtype == 13 ){cType = "PHYSICS_GLOBAL";}
  if( numtype == 14 ){cType = "COSMICS_GLOBAL";}
  if( numtype == 15 ){cType = "HALO_GLOBAL";}

  if( numtype == 16 ){cType = "LASER_GAP";}
  if( numtype == 17 ){cType = "TESTPULSE_GAP";}
  if( numtype == 18 ){cType = "PEDESTAL_GAP";}
  if( numtype == 19 ){cType = "LED_GAP";}

  if( numtype == 20 ){cType = "PHYSICS_LOCAL";}
  if( numtype == 21 ){cType = "COSMICS_LOCAL";}
  if( numtype == 22 ){cType = "HALO_LOCAL";}
  if( numtype == 23 ){cType = "CALIB_LOCAL";}

  if( numtype == 24 ){cType = "PEDSIM";}

  return cType;
}
TString TEcnaRead::GetStartDate ( )
time_t TEcnaRead::GetStartTime ( )
Int_t TEcnaRead::GetStexStinFromIndex ( const Int_t &  i0StexStinEcna)

Definition at line 3176 of file TEcnaRead.cc.

References fEcal, i, TEcnaParEcal::MaxStinEcnaInStex(), and ReadStinNumbers().

Referenced by TEcnaRun::ReadEventDistributions(), and TEcnaHistos::ViewStex().

{
// Get the Stin number in Stex from the Stin index

  Int_t number = -1;
  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
  number = (Int_t)vec(i0StexStinEcna);
  return number;
}
Int_t TEcnaRead::GetStinIndex ( const Int_t &  n1StexStin)

Definition at line 3222 of file TEcnaRead.cc.

References gather_cfg::cout, fCodePrintAllComments, fEcal, fFlagPrint, fTTBELL, i, TEcnaParEcal::MaxStinEcnaInStex(), and ReadStinNumbers().

Referenced by ReadHighFrequencyCorrelationsBetweenChannels(), ReadHighFrequencyCovariancesBetweenChannels(), ReadLowFrequencyCorrelationsBetweenChannels(), ReadLowFrequencyCovariancesBetweenChannels(), and ReadNumberOfEventsForSamples().

{
//Get the index of the Stin from its number in Stex

  if(fFlagPrint == fCodePrintAllComments){
    cout << "*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = "
         << fEcal->MaxStinEcnaInStex() << endl
         << "                              n1StexStin = " << n1StexStin
         << endl << endl;}

  Int_t Stin_index = n1StexStin-1;    // suppose les 68 tours 

#define NOGT
#ifndef NOGT
  Int_t Stin_index = -1;
  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());

  //........................... Get the Stin index

  for(Int_t i=0; i < fEcal->MaxStinEcnaInStex(); i++)
    {
      if(fFlagPrint == fCodePrintAllComments){
        cout << "*TEcnaRead::GetStinIndex(...)> StinNumber[" << i << "] = "
             << vec[i] << endl;}
      if ( vec[i] == n1StexStin ){Stin_index = i;}
    }

  if(fFlagPrint == fCodePrintAllComments){
    cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;
    cout << "*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin  << endl
         << "                          Stin index : " << Stin_index << endl;
    cout << "~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;}

  if ( Stin_index < 0 )
    {
      if(fFlagPrint == fCodePrintAllComments){
        cout << "!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin << " : "
             << "index Stin not found"
             << fTTBELL << endl;}
    }
#endif // NOGT

  return Stin_index;
}
TString TEcnaRead::GetStopDate ( )
time_t TEcnaRead::GetStopTime ( )
TString TEcnaRead::GetTypeOfQuantity ( const CnaResultTyp  arg_typ)

Definition at line 3113 of file TEcnaRead.cc.

References cTypAdcEvt, cTypAvHfn, cTypAvLfn, cTypAvMeanCorss, cTypAvPed, cTypAvSigCorss, cTypAvTno, cTypCorCss, cTypCovCss, cTypHFccMoStins, cTypHfCor, cTypHfCov, cTypHfn, cTypLFccMoStins, cTypLfCor, cTypLfCov, cTypLfn, cTypMeanCorss, cTypMSp, cTypNbOfEvts, cTypNumbers, cTypPed, cTypSigCorss, cTypSSp, cTypTno, and fFlagSubDet.

Referenced by ReadAveragedHighFrequencyNoise(), ReadAveragedLowFrequencyNoise(), ReadAveragedMeanOfCorrelationsBetweenSamples(), ReadAveragedPedestals(), ReadAveragedSigmaOfCorrelationsBetweenSamples(), ReadAveragedTotalNoise(), ReadCorrelationsBetweenSamples(), ReadCovariancesBetweenSamples(), ReadHighFrequencyCorrelationsBetweenChannels(), ReadHighFrequencyCovariancesBetweenChannels(), ReadHighFrequencyMeanCorrelationsBetweenStins(), ReadHighFrequencyNoise(), ReadLowFrequencyCorrelationsBetweenChannels(), ReadLowFrequencyCovariancesBetweenChannels(), ReadLowFrequencyMeanCorrelationsBetweenStins(), ReadLowFrequencyNoise(), ReadMeanOfCorrelationsBetweenSamples(), ReadNumberOfEventsForSamples(), ReadPedestals(), ReadRelevantCorrelationsBetweenSamples(), ReadSampleMeans(), ReadSampleSigmas(), ReadSampleValues(), ReadSampleValuesSameFile(), ReadSigmaOfCorrelationsBetweenSamples(), ReadStinNumbers(), and ReadTotalNoise().

{
  TString quantity_name = "?";

  if( arg_typ == cTypNumbers)
    {
      if( fFlagSubDet == "EB" ){quantity_name = "SM numbers";}
      if( fFlagSubDet == "EE" ){quantity_name = "Dee numbers";}
    }
  if( arg_typ == cTypMSp    ){quantity_name = "Mean of samples";}
  if( arg_typ == cTypSSp    ){quantity_name = "Sigma of samples";}

  if( arg_typ == cTypNbOfEvts ){quantity_name = "Number of events";}
  if( arg_typ == cTypPed      ){quantity_name = "Pedestals";}
  if( arg_typ == cTypTno      ){quantity_name = "Total noise";}
  if( arg_typ == cTypLfn      ){quantity_name = "LF noise";}
  if( arg_typ == cTypHfn      ){quantity_name = "HF noise";}
  if( arg_typ == cTypMeanCorss){quantity_name = "Mean of cor(s,s')";}
  if( arg_typ == cTypSigCorss ){quantity_name = "Sigma of cor(s,s')";}

  if( arg_typ == cTypAvPed      ){quantity_name = "Averaged pedestals";}
  if( arg_typ == cTypAvTno      ){quantity_name = "Averaged total noise";}
  if( arg_typ == cTypAvLfn      ){quantity_name = "Averaged LF noise";}
  if( arg_typ == cTypAvHfn      ){quantity_name = "Averaged HF noise";}
  if( arg_typ == cTypAvMeanCorss){quantity_name = "Averaged mean of cor(s,s')";}
  if( arg_typ == cTypAvSigCorss ){quantity_name = "Averaged sigma of cor(s,s')";}

  if( arg_typ == cTypAdcEvt ){quantity_name = "Sample ADC a.f.o event number";}

  if( arg_typ == cTypCovCss ){quantity_name = "Cov(s,s')";}
  if( arg_typ == cTypCorCss ){quantity_name = "Cor(s,s')";}
  if( arg_typ == cTypLfCov  ){quantity_name = "LF Cov(c,c')";}
  if( arg_typ == cTypLfCor  ){quantity_name = "LF Cor(c,c')";}
  if( arg_typ == cTypHfCov  ){quantity_name = "HF Cov(c,c')";}
  if( arg_typ == cTypHfCor  ){quantity_name = "HF Cor(c,c')";}

  if( fFlagSubDet == "EB" )
    {
      if( arg_typ == cTypLFccMoStins){quantity_name = "Mean LF |Cor(c,c')| in (tow,tow')";}
      if( arg_typ == cTypHFccMoStins){quantity_name = "Mean HF |Cor(c,c')| in (tow,tow')";}
    }
  if( fFlagSubDet == "EE" )
    {
      if( arg_typ == cTypLFccMoStins){quantity_name = "Mean LF |Cor(c,c')| in (SC,SC')";}
      if( arg_typ == cTypHFccMoStins){quantity_name = "Mean HF |Cor(c,c')| in (SC,SC')";}
    }
  return quantity_name;
}
void TEcnaRead::Init ( void  )

Definition at line 309 of file TEcnaRead.cc.

References fCdelete, fCnaParCout, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fDataExist, fFlagPrint, fgMaxCar, fLookAtRootFile, fMemoStinNumbers, fOpenRootFile, fPathRoot, fReadyToReadRootFile, fSectChanSizeX, fSectChanSizeY, fSectSampSizeX, fSectSampSizeY, fT1d_StexStinFromIndex, fT3d1_distribs, fT3d2_distribs, fT3d_distribs, fTagStinNumbers, fTTBELL, fUserChan, fUserSamp, and TEcnaParCout::GetCodePrint().

Referenced by TEcnaRead().

{
//Initialisation concerning the ROOT file

  fCnew    = 0;
  fCdelete = 0;

  fTTBELL = '\007';

  fgMaxCar = (Int_t)512;

  fCodePrintNoComment   = fCnaParCout->GetCodePrint("NoComment");
  fCodePrintWarnings    = fCnaParCout->GetCodePrint("Warnings ");
  fCodePrintComments    = fCnaParCout->GetCodePrint("Comments");
  fCodePrintAllComments = fCnaParCout->GetCodePrint("AllComments");

  //.................................. Set flag print to "Warnings"   (Init)
  fFlagPrint = fCodePrintWarnings;

  fUserSamp      = -1;
  fUserChan      = -1;
 
  fSectChanSizeX = 0;
  fSectChanSizeY = 0;
  fSectSampSizeX = 0;
  fSectSampSizeY = 0;

  //.................................. Flags for Root File   (Init)
  fOpenRootFile = kFALSE;

  fReadyToReadRootFile = 0;
  fLookAtRootFile      = 0;

  fT1d_StexStinFromIndex = 0;

  //................................ tags Stin numbers
  fTagStinNumbers  = 0;
  fMemoStinNumbers = 0;

  //.......................... flag data exist
  fDataExist = kFALSE;

  //......................... transfert Sample ADC Values 3D array   (Init)
  fT3d_distribs  = 0;
  fT3d2_distribs = 0;
  fT3d1_distribs = 0;

  //................................. others
  Int_t MaxCar = fgMaxCar;

  MaxCar = fgMaxCar;
  fPathRoot.Resize(MaxCar);
  fPathRoot  = "fPathRoot> not defined";

}// end of Init()
Bool_t TEcnaRead::LookAtRootFile ( )

Definition at line 675 of file TEcnaRead.cc.

References Anew(), gather_cfg::cout, fEcal, fFileHeader, fLookAtRootFile, fReadyToReadRootFile, TEcnaHeader::fStinNumbersCalc, fT1d_StexStinFromIndex, fTagStinNumbers, fTTBELL, i, TEcnaParEcal::MaxStinEcnaInStex(), ReadRootFileHeader(), and ReadStinNumbers().

Referenced by TEcnaRun::ReadEventDistributions(), TEcnaHistos::StexHocoVecoLHFCorcc(), TEcnaHistos::ViewHistime(), TEcnaHistos::ViewHisto(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewStas(), TEcnaHistos::ViewStex(), and TEcnaHistos::ViewStin().

{
//---------- Reads the ROOT file header and makes allocations and some other things

  fLookAtRootFile = 0;          // set flag to zero before looking for the file

  Bool_t ok_read = kFALSE;

  if(fReadyToReadRootFile == 1)
    {
      //------------ Call to ReadRootFileHeader
      if( ReadRootFileHeader(0) == kTRUE )   //    (1) = print, (0) = no print
        {
          //........................................ allocation tags      
          if( fTagStinNumbers == 0 ){fTagStinNumbers = new Int_t[1]; Anew("fTagStinNumbers");}

          //...................... allocation for fT1d_StexStinFromIndex[]
          if(fT1d_StexStinFromIndex == 0)
            {fT1d_StexStinFromIndex = new Int_t[fEcal->MaxStinEcnaInStex()]; Anew("fT1d_StexStinFromIndex");}
          
          //.. recover of the Stin numbers from the ROOT file (= init fT1d_StexStinFromIndex+init TagStin)
          TVectorD vec(fEcal->MaxStinEcnaInStex());
          for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
          vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
          
          for (Int_t i = 0; i < fEcal->MaxStinEcnaInStex(); i++ ){
            fT1d_StexStinFromIndex[i] = (Int_t)vec(i);}

          fTagStinNumbers[0] = 1;                fFileHeader->fStinNumbersCalc++;
          ok_read = kTRUE;
          
          fLookAtRootFile = 1;           // set flag
        }
      else
        {
          cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
               << " ROOT file not found " << fTTBELL << endl;
          ok_read = kFALSE; 
        }
    }
  else
    {
      cout << "!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
           << " GetReadyToReadRootFile not called " << fTTBELL << endl;
      ok_read = kFALSE;      
    }
  return ok_read;
} //----------------- end of LookAtRootFile()
Bool_t TEcnaRead::OpenRootFile ( const Text_t *  name,
TString  status 
)

Definition at line 808 of file TEcnaRead.cc.

References Adelete(), Anew(), gather_cfg::cout, fCodePrintAllComments, fFlagPrint, fOpenRootFile, fPathRoot, TCnaRootFile::fRootFileStatus, gCnaRootFile, TCnaRootFile::OpenR(), TCnaRootFile::OpenW(), and ntuplemaker::status.

Referenced by ReadAveragedHighFrequencyNoise(), ReadAveragedLowFrequencyNoise(), ReadAveragedMeanOfCorrelationsBetweenSamples(), ReadAveragedPedestals(), ReadAveragedSigmaOfCorrelationsBetweenSamples(), ReadAveragedTotalNoise(), ReadCorrelationsBetweenSamples(), ReadCovariancesBetweenSamples(), ReadHighFrequencyCorrelationsBetweenChannels(), ReadHighFrequencyCovariancesBetweenChannels(), ReadHighFrequencyMeanCorrelationsBetweenStins(), ReadHighFrequencyNoise(), ReadLowFrequencyCorrelationsBetweenChannels(), ReadLowFrequencyCovariancesBetweenChannels(), ReadLowFrequencyMeanCorrelationsBetweenStins(), ReadLowFrequencyNoise(), ReadMeanOfCorrelationsBetweenSamples(), ReadNumberOfEventsForSamples(), ReadPedestals(), ReadRelevantCorrelationsBetweenSamples(), ReadRootFileHeader(), ReadSampleMeans(), ReadSampleSigmas(), ReadSampleValues(), ReadSampleValuesSameFile(), ReadSigmaOfCorrelationsBetweenSamples(), ReadStinNumbers(), and ReadTotalNoise().

                                                                 {
//Open the Root file

  TString s_path;
  s_path = fPathRoot;
  s_path.Append('/');
  s_path.Append(name);

  gCnaRootFile = 0; gCnaRootFile = new TEcnaRootFile(s_path.Data(), status);     Anew("gCnaRootFile");

  Bool_t ok_open = kFALSE;

  if ( gCnaRootFile->fRootFileStatus == "RECREATE" ){ok_open = gCnaRootFile->OpenW();}
  if ( gCnaRootFile->fRootFileStatus == "READ"     ){ok_open = gCnaRootFile->OpenR();}

  if (!ok_open)
    {
      cout << "!TEcnaRead::OpenRootFile> " << s_path.Data() << ": file not found." << endl;
      if( gCnaRootFile != 0 ){delete gCnaRootFile; gCnaRootFile = 0;  Adelete("gCnaRootFile");}
    }
  else
    {
      if(fFlagPrint == fCodePrintAllComments){
        TString e_path;  e_path.Append(name);
        cout << "*TEcnaRead::OpenRootFile>  Open  ROOT file " << e_path.Data() << " OK " << endl;}      
      fOpenRootFile  = kTRUE;
    }

  return ok_open;
}                     // end of OpenRootFile()
TEcnaRead & TEcnaRead::operator= ( const TEcnaRead dcop)

Definition at line 469 of file TEcnaRead.cc.

References fCopy().

{
//Overloading of the operator=

  fCopy(dcop);
  return *this;
}
void TEcnaRead::PrintAllComments ( )

Definition at line 3291 of file TEcnaRead.cc.

References gather_cfg::cout, fCodePrintAllComments, and fFlagPrint.

{
// Set flags to authorize printing of the comments of all the methods

  fFlagPrint = fCodePrintAllComments;
  cout << "*TEcnaRead::PrintAllComments()> All the comments will be printed" << endl;
}
void TEcnaRead::PrintComments ( )

Definition at line 3275 of file TEcnaRead.cc.

References gather_cfg::cout, fCodePrintComments, and fFlagPrint.

{
// Set flags to authorize printing of some comments concerning initialisations (default)

  fFlagPrint = fCodePrintComments;
  cout << "*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << endl;
}
void TEcnaRead::PrintNoComment ( )
void TEcnaRead::PrintWarnings ( )

Definition at line 3283 of file TEcnaRead.cc.

References gather_cfg::cout, fCodePrintWarnings, and fFlagPrint.

{
// Set flags to authorize printing of warnings

  fFlagPrint = fCodePrintWarnings;
  cout << "*TEcnaRead::PrintWarnings()> Warnings will be printed" << endl;
}
TVectorD TEcnaRead::ReadAveragedHighFrequencyNoise ( const Int_t &  VecDim)

Definition at line 2933 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvHfn, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Pedestals
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
 for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvHfn;    // averaged High FrequencyNoise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedHighFrequencyNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedHighFrequencyNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
} // end of ReadAveragedHighFrequencyNoise
TVectorD TEcnaRead::ReadAveragedLowFrequencyNoise ( const Int_t &  VecDim)

Definition at line 2878 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvLfn, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Pedestals
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvLfn;    // averaged Low FrequencyNoise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedLowFrequencyNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedLowFrequencyNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
} // end of ReadAveragedLowFrequencyNoise
TVectorD TEcnaRead::ReadAveragedMeanOfCorrelationsBetweenSamples ( const Int_t &  VecDim)

Definition at line 2988 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvMeanCorss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Pedestals
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
 for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvMeanCorss;    // averaged MeanOfCorrelationsBetweenSamples type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
} // end of ReadAveragedMeanOfCorrelationsBetweenSamples
TVectorD TEcnaRead::ReadAveragedNumberOfEvents ( const Int_t &  VecDim)

Definition at line 2708 of file TEcnaRead.cc.

References fEcal, fEcalNumbering, fFileHeader, TEcnaHeader::fStex, fStexName, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), i, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), and ReadNumberOfEvents().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the numbers of found events in the data
//for the crystals and for the samples for all the Stin's in the Stex
//in the ROOT file, compute the average on the samples and on the crystals
//and return them in a TVectorD(MaxStinEcnaInStex)
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vecAveraged(VecDim);
  for(Int_t i=0; i<VecDim; i++){vecAveraged(i)=(Double_t)0.;}

  TVectorD vecMean(fEcal->MaxCrysEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxCrysEcnaInStex(); i++){vecMean(i)=(Double_t)0.;}

  vecMean = ReadNumberOfEvents(fEcal->MaxCrysEcnaInStex());

  for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
    {
      Int_t n1StexStin = i0StexStin+1;
      vecAveraged(i0StexStin) = 0;
      //.... average value over the crystals
      for(Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++)
        {
          Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(i0StexStin+1, i0StinEcha);
          
          if( fStexName == "SM" )
            {vecAveraged(i0StexStin) += vecMean(i0StexEcha);}

          if( fStexName == "Dee" )
            {
              //--------- EE --> Special translation for mixed SCEcna (29 and 32)
              //                 Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
              //                 Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
              Int_t n1StinEcha = i0StinEcha+1;
              if( n1StexStin == 10 && n1StinEcha == 11 )
                {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
              if( n1StexStin == 11 && n1StinEcha == 11 )
                {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
              if( !( (n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11 )  )
                {vecAveraged(i0StexStin) += vecMean(i0StexEcha);}
            }
        }

      Double_t xdivis = (Double_t)0.;
      if( fStexName == "SM"  )
        {xdivis = (Double_t)fEcal->MaxCrysInStin();}
      if( fStexName == "Dee" )
        {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, i0StexStin+1, "TEcnaRead");}

      vecAveraged(i0StexStin) = vecAveraged(i0StexStin)/xdivis;   
    }
  return vecAveraged;
}
TVectorD TEcnaRead::ReadAveragedPedestals ( const Int_t &  VecDim)

Definition at line 2768 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvPed, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Pedestals
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvPed;    // averaged pedestals type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedPedestals(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedPedestals(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
} // end of ReadAveragedPedestals
TVectorD TEcnaRead::ReadAveragedSigmaOfCorrelationsBetweenSamples ( const Int_t &  VecDim)

Definition at line 3043 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvSigCorss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Pedestals
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
 for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvSigCorss;    // averaged SigmaOfCorrelationsBetweenSamples type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
} // end of ReadAveragedSigmaOfCorrelationsBetweenSamples
TVectorD TEcnaRead::ReadAveragedTotalNoise ( const Int_t &  VecDim)

Definition at line 2823 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAvTno, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewHisto(), and TEcnaHistos::ViewStas().

{
//Read the expectation values of the Total Noise
//for all the Stins of a given Stex
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAvTno;    // averaged Total Noise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadAveragedTotalNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
            {
              vec(i0StexStin)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i0StexStin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadAveragedTotalNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
}
TMatrixD TEcnaRead::ReadCorrelationsBetweenSamples ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  MatDim 
)

Definition at line 1466 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypCorCss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcalNumbering, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewMatrix(), and TEcnaHistos::ViewStin().

{
//Read the (sample,sample) correlations for a given channel
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fFileHeader->fNbOfSamples

  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
 
  CnaResultTyp typ = cTypCorCss;
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");
      ok_read = gCnaRootFile->ReadElement(typ, i0StexEcha);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_samp = 0; i_samp < MatDim; i_samp++){
            for ( Int_t j_samp = 0; j_samp < MatDim; j_samp++){
              mat(i_samp, j_samp) = gCnaRootFile->fCnaIndivResult->fMatMat(i_samp,j_samp);}}
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               << " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return mat;
}
TMatrixD TEcnaRead::ReadCovariancesBetweenSamples ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  MatDim 
)

Definition at line 1403 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypCovCss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcalNumbering, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewMatrix(), and TEcnaHistos::ViewStin().

{
//Read the (sample,sample) covariances for a given channel
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fFileHeader->fNbOfSamples

  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
  
  CnaResultTyp typ = cTypCovCss;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      ok_read = gCnaRootFile->ReadElement(typ, i0StexEcha);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for( Int_t i_samp = 0; i_samp < MatDim; i_samp++ )
            {
              for ( Int_t j_samp = 0; j_samp < MatDim; j_samp++)
                {
                 mat(i_samp, j_samp) = gCnaRootFile->fCnaIndivResult->fMatMat(i_samp,j_samp);
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               << " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels ( const Int_t &  n1StexStin_a,
const Int_t &  n1StexStin_b,
const Int_t &  MatDim 
)

Definition at line 1784 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHfCor, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetStinIndex(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::StexHocoVecoLHFCorcc(), and TEcnaHistos::ViewMatrix().

{
//Read the High Frequency Cor(i0StinEcha of Stin_a, i0StinEcha of Stin b)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysInStin()

  Int_t   index_Stin_a = GetStinIndex(n1StexStin_a);
  Int_t   index_Stin_b = GetStinIndex(n1StexStin_b);

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
  
  CnaResultTyp typ = cTypHfCor;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;

      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
            {
              Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
              for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
                {
                  Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
                  mat(i_crys, j_crys) = gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels ( const Int_t &  MatDim)

Definition at line 2103 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHfCor, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

{
//Read all the High Frequency correlations
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  //=====> WARNING: BIG MATRIX (1700x1700)
  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++){for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
  
  CnaResultTyp typ = cTypHfCor;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
            {
              if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
                {
                  for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
                    {
                      if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
                        {
                          for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
                            {
                              Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
                              Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() + i_crys;
                              for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
                                {
                                  Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
                                  Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() + j_crys;
                                  mat(i_chan_sm, j_chan_sm) =
                                    gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                                }
                            }
                        }
                    }
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels ( const Int_t &  n1StexStin_a,
const Int_t &  n1StexStin_b,
const Int_t &  MatDim 
)

Definition at line 1715 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHfCov, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetStinIndex(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewMatrix().

{
//Read the High Frequency cov(i0StinEcha of Stin_a, i0StinEcha of Stin b)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysInStin()

  Int_t   index_Stin_a = GetStinIndex(n1StexStin_a);
  Int_t   index_Stin_b = GetStinIndex(n1StexStin_b);

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
  
  CnaResultTyp typ = cTypHfCov;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ,i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
            {
              Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
              for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
                {
                  Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
                  mat(i_crys, j_crys) = gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels ( const Int_t &  MatDim)

Definition at line 2020 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHfCov, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

{
//Read all the High Frequency covariances
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  //=====> WARNING: BIG MATRIX (1700x1700)
  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++){for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
  
  CnaResultTyp typ = cTypHfCov;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
            {
              if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
                {
                  for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
                    {
                      if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
                        {
                          for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
                            {
                              Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
                              Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() +i_crys;
                              for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
                                {
                                  Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
                                  Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() +j_crys;
                                  mat(i_chan_sm, j_chan_sm) =
                                    gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                                }
                            }
                        }
                    }
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins ( const Int_t &  MatDim)

Definition at line 2260 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHFccMoStins, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

Referenced by TEcnaHistos::ViewMatrix().

{
//Read all the High Frequency Mean Correlations Between Towers the for all (Stin_X, Stin_Y)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());

  CnaResultTyp typ = cTypHFccMoStins;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for(Int_t index_Stin_a = 0; index_Stin_a < MatDim; index_Stin_a++)
            {
              for(Int_t index_Stin_b = 0; index_Stin_b < MatDim; index_Stin_b++)   
                {
                  if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
                    {
                      if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
                        {
                          mat((Int_t)vec(index_Stin_a)-1, (Int_t)vec(index_Stin_b)-1) =
                            gCnaRootFile->fCnaIndivResult->fMatMat(index_Stin_a,index_Stin_b);
                        }
                    }
                }
            }
        } 
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }

      CloseRootFile(file_name);
    }

  return mat;
}
TVectorD TEcnaRead::ReadHighFrequencyNoise ( const Int_t &  VecDim)

Definition at line 2593 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypHfn, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the sigmas of the sigmas of the samples
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()
  
  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypHfn;        // high frequency noise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero,i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);
  return vec;
}
TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels ( const Int_t &  MatDim)

Definition at line 1937 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLfCor, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

{
//Read all the Low Frequency correlations
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  //=====> WARNING: BIG MATRIX (1700x1700)
  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++){for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
  
  CnaResultTyp typ = cTypLfCor;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
            {
              if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
                {
                  for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
                    {
                      if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
                        {
                          for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
                            {
                              Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
                              Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() + i_crys;
                              for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
                                {
                                  Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
                                  Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() + j_crys;
                                  mat(i_chan_sm, j_chan_sm) =
                                    gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                                }
                            }
                        }
                    }
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels ( const Int_t &  n1StexStin_a,
const Int_t &  n1StexStin_b,
const Int_t &  MatDim 
)

Definition at line 1645 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLfCor, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetStinIndex(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::StexHocoVecoLHFCorcc(), and TEcnaHistos::ViewMatrix().

{
//Read the Low Frequency cor(i0StinEcha of Stin_a, i0StinEcha of Stin b)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysInStin()

  Int_t   index_Stin_a = GetStinIndex(n1StexStin_a);
  Int_t   index_Stin_b = GetStinIndex(n1StexStin_b);

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
  
  CnaResultTyp typ = cTypLfCor;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;

      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
            {
              Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
              for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
                {
                  Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
                  mat(i_crys, j_crys) = gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels ( const Int_t &  n1StexStin_a,
const Int_t &  n1StexStin_b,
const Int_t &  MatDim 
)

Definition at line 1576 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLfCov, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetStinIndex(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::ViewMatrix().

{
//Read the Low Frequency cov(i0StinEcha of Stin_a, i0StinEcha of Stin b)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysInStin()

  Int_t   index_Stin_a = GetStinIndex(n1StexStin_a);
  Int_t   index_Stin_b = GetStinIndex(n1StexStin_b);

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}
  
  CnaResultTyp typ = cTypLfCov;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ,i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
            {
              Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
              for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
                {
                  Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
                  mat(i_crys, j_crys) = gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels ( const Int_t &  MatDim)

Definition at line 1854 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLfCov, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

{
//Read all the Low Frequency covariances
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  //=====> WARNING: BIG MATRIX (1700x1700)
  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++){for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
  
  CnaResultTyp typ = cTypLfCov;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
            {
              if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
                {
                  for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
                    {
                      if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
                        {
                          for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
                            {
                              Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
                              Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() +i_crys;
                              for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
                                {
                                  Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
                                  Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() +j_crys;
                                  mat(i_chan_sm, j_chan_sm) =
                                    gCnaRootFile->fCnaIndivResult->fMatMat(i_cna_chan,j_cna_chan);
                                }
                            }
                        }
                    }
                }
            }
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);

  return mat;
}
TMatrixD TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins ( const Int_t &  MatDim)

Definition at line 2187 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLFccMoStins, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcal, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, j, TEcnaParEcal::MaxStinEcnaInStex(), OpenRootFile(), TCnaRootFile::ReadElement(), and ReadStinNumbers().

Referenced by TEcnaHistos::ViewMatrix().

{
//Read all the Low Frequency Mean Correlations Between Towers the for all (Stin_X, Stin_Y)
//in ROOT file and return them in a TMatrixD
//
//Possible values for MatDim: (1) MatDim = fEcal->MaxStinEcnaInStex()

  TMatrixD mat(MatDim, MatDim);
  for(Int_t i=0; i<MatDim; i++)
    {for(Int_t j=0; j<MatDim; j++){mat(i,j)=(Double_t)0.;}}

  TVectorD vec(fEcal->MaxStinEcnaInStex());
  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
  vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());

  CnaResultTyp typ = cTypLFccMoStins;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>"
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for(Int_t index_Stin_a = 0; index_Stin_a < MatDim; index_Stin_a++)
            {
              for(Int_t index_Stin_b = 0; index_Stin_b < MatDim; index_Stin_b++)   
                {
                  if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
                    {
                      if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
                        {
                          mat((Int_t)vec(index_Stin_a)-1, (Int_t)vec(index_Stin_b)-1) =
                            gCnaRootFile->fCnaIndivResult->fMatMat(index_Stin_a,index_Stin_b);
                        }
                    }
                }
            }
        } 
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }

      CloseRootFile(file_name);
    }

  return mat;
}
TVectorD TEcnaRead::ReadLowFrequencyNoise ( const Int_t &  VecDim)

Definition at line 2539 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypLfn, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the sigmas of the expectation values of the samples
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypLfn;        // low frequency noise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero,i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadMeanOfCorrelationsBetweenSamples ( const Int_t &  VecDim)

Definition at line 2485 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypMeanCorss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the Expectation values of the (sample,sample) correlations
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypMeanCorss;     // mean of corss type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero,i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadNumberOfEvents ( const Int_t &  VecDim)

Definition at line 2338 of file TEcnaRead.cc.

References fEcal, fEcalNumbering, fFileHeader, TEcnaHeader::fNbOfSamples, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), i, j, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), and ReadNumberOfEventsForSamples().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::GetNumberOfEvents(), ReadAveragedNumberOfEvents(), and TEcnaHistos::ViewStex().

{
//Read the numbers of found events in the data
//for the crystals and for the samples for all the Stin's in the Stex
//in the ROOT file, compute the average on the samples
//and return them in a TVectorD(MaxCrysEcnaInStex)
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  TMatrixD mat(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);

  for(Int_t iStexStin=0; iStexStin<fEcal->MaxStinEcnaInStex(); iStexStin++)
    {
      //............. set mat(,) to zero before reading it
      for(Int_t i=0; i<fEcal->MaxCrysInStin(); i++)
        {for(Int_t j=0; j<fFileHeader->fNbOfSamples; j++){mat(i,j)=(Double_t)0.;}}
      //............. read mat(,)
      mat = ReadNumberOfEventsForSamples(iStexStin+1, fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);

      for(Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++)
        {
          Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(iStexStin+1, i0StinEcha);
          vec(i0StexEcha) = 0; 
          //.... average value over the samples
          for(Int_t i_samp=0; i_samp<fFileHeader->fNbOfSamples; i_samp++)
            {vec(i0StexEcha) += mat(i0StinEcha, i_samp);}
          vec(i0StexEcha) = vec(i0StexEcha)/fFileHeader->fNbOfSamples;
        } 
    }
  return vec;
}
TMatrixD TEcnaRead::ReadNumberOfEventsForSamples ( const Int_t &  n1StexStin,
const Int_t &  MatDimX,
const Int_t &  MatDimY 
)

Definition at line 973 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypNbOfEvts, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fLookAtRootFile, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetStinIndex(), GetTypeOfQuantity(), i, j, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaRun::ReadEventDistributions(), and ReadNumberOfEvents().

{
//Read the numbers of found events in the data
//for the crystals and for the samples, for a given Stin in the Stex
//in the ROOT file and return them in a TMatrixD(MaxCrysInStin,NbOfSamples)
//
//Possible values for MatDimX and MatDimY:
//  (1) MatDimX = fEcal->MaxCrysInStin(), MatDimY = fFileHeader->fNbOfSamples

  TMatrixD mat(MatDimX, MatDimY);
  for(Int_t i=0; i<MatDimX; i++)
    {for(Int_t j=0; j<MatDimY; j++){mat(i,j)=(Double_t)0.;}}

  Int_t Stin_index = GetStinIndex(n1StexStin);
  if( Stin_index >= 0 )
    {
      if(fLookAtRootFile == 1)
        {
          CnaResultTyp typ = cTypNbOfEvts;
          const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();
          
          Bool_t ok_open = kFALSE;
          Bool_t ok_read = kFALSE;
          
          if ( fOpenRootFile )
            {
              cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
                   << " Reading on file already open." << fTTBELL << endl;
            } 
          else
            {
              ok_open = OpenRootFile(file_name, "READ");
              
              Int_t i_zero = 0;
              ok_read = gCnaRootFile->ReadElement(typ, i_zero);
              
              if ( ok_read == kTRUE )
                {
                  fDataExist = kTRUE;
                  for (Int_t i_crys=0; i_crys<MatDimX; i_crys++)
                    {                 
                      Int_t j_cna_chan = Stin_index*MatDimX + i_crys;
                      for ( Int_t i_samp=0; i_samp<MatDimY; i_samp++)
                        {
                          mat(i_crys, i_samp) = gCnaRootFile->fCnaIndivResult->fMatHis(j_cna_chan, i_samp);
                        }
                    }
                }
              else
                {
                  fDataExist = kFALSE;
                  cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
                   << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
                   <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
                   << fTTBELL << endl;
                }
            }
          CloseRootFile(file_name);
        }
      else
        {
          cout << "!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
               << "It is not possible to access the number of found events: the ROOT file has not been read."
               << fTTBELL << endl;
        }
    }  // end of if (Stin_index >= 0)
  return mat;
}
TVectorD TEcnaRead::ReadPedestals ( const Int_t &  VecDim)

Definition at line 2378 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypPed, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the expectation values of the expectation values of the samples
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypPed;    // pedestals type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero, i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadRelevantCorrelationsBetweenSamples ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  InPutMatDim 
)

Definition at line 1519 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypCorCss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcalNumbering, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

{
//Read the (sample,sample) correlations for a given channel
//in ROOT file and return the relevant correlations in a TVectorD
//
//Possible values for InPutMatDim: (1) InPutMatDim = fFileHeader->fNbOfSamples
//
//  *===>  OutPut TVectorD dimension value = InPutMatDim*(InPutMatDim-1)/2

  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
  Int_t nb_of_relevant = InPutMatDim*(InPutMatDim-1)/2;
  TVectorD vec_rel(nb_of_relevant); for(Int_t i=0; i<nb_of_relevant; i++){vec_rel(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypCorCss;
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");
      ok_read = gCnaRootFile->ReadElement(typ, i0StexEcha);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          Int_t k_cor = 0;
          for ( Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++){
            for ( Int_t j_samp = 0; j_samp < i_samp; j_samp++){
              vec_rel(k_cor) = gCnaRootFile->fCnaIndivResult->fMatMat(i_samp,j_samp);
              k_cor++;}}
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec_rel;
}
Bool_t TEcnaRead::ReadRootFileHeader ( const Int_t &  i_print)

Definition at line 729 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, TEcnaHeader::fAdcEvtCalc, TEcnaHeader::fAvHfnCalc, TEcnaHeader::fAvLfnCalc, TEcnaHeader::fAvMeanCorssCalc, TEcnaHeader::fAvPedCalc, TEcnaHeader::fAvSigCorssCalc, TEcnaHeader::fAvTnoCalc, fCnaWrite, TEcnaHeader::fCorCssCalc, TEcnaHeader::fCovCssCalc, fFileHeader, TEcnaHeader::fHFccMoStinsCalc, TEcnaHeader::fHfCorCalc, TEcnaHeader::fHfCovCalc, cmsPerfSuiteHarvest::file_name, TEcnaHeader::fLFccMoStinsCalc, TEcnaHeader::fLfCorCalc, TEcnaHeader::fLfCovCalc, TEcnaHeader::fMeanCorssCalc, TEcnaHeader::fMSpCalc, fOpenRootFile, TCnaRootFile::fRootFile, TEcnaWrite::fRootFileNameShort, TEcnaHeader::fRunType, TEcnaHeader::fSigCorssCalc, TEcnaHeader::fSSpCalc, TEcnaHeader::fStartDate, TEcnaHeader::fStartTime, TEcnaHeader::fStinNumbersCalc, TEcnaHeader::fStopDate, TEcnaHeader::fStopTime, fTTBELL, gCnaRootFile, h, OpenRootFile(), and TEcnaHeader::Print().

Referenced by LookAtRootFile().

{
//Read the header of the Root file

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  if( i_print == 1 ){cout << "*TEcnaRead::ReadRootFileHeader> file_name = "
                         << fCnaWrite->fRootFileNameShort.Data() << endl;}

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadRootFileHeader(...)*** ERROR ***> "
           << "Reading header on file already open." << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      if(ok_open)
        {
          TEcnaHeader *h;
          h =(TEcnaHeader*)gCnaRootFile->fRootFile->Get("CnaHeader");

          //..... get the attributes which are not already set by the call to TEcnaHeader
          //      in GetReadyToReadRootFile(...) and are only available in the ROOT file

          fFileHeader->fStartTime = h->fStartTime;
          fFileHeader->fStopTime  = h->fStopTime;
          fFileHeader->fStartDate = h->fStartDate;
          fFileHeader->fStopDate  = h->fStopDate;

          fFileHeader->fRunType   = h->fRunType;

          //........................................................................
          fFileHeader->fStinNumbersCalc = h->fStinNumbersCalc;
          fFileHeader->fAdcEvtCalc      = h->fAdcEvtCalc;
          fFileHeader->fMSpCalc         = h->fMSpCalc;
          fFileHeader->fSSpCalc         = h->fSSpCalc;
          fFileHeader->fAvTnoCalc       = h->fAvTnoCalc;
          fFileHeader->fAvLfnCalc       = h->fAvLfnCalc;
          fFileHeader->fAvHfnCalc       = h->fAvHfnCalc;

          fFileHeader->fCovCssCalc      = h->fCovCssCalc;
          fFileHeader->fCorCssCalc      = h->fCorCssCalc;
          fFileHeader->fHfCovCalc       = h->fHfCovCalc;
          fFileHeader->fHfCorCalc       = h->fHfCorCalc;
          fFileHeader->fLfCovCalc       = h->fLfCovCalc;
          fFileHeader->fLfCorCalc       = h->fLfCorCalc;
          fFileHeader->fLFccMoStinsCalc = h->fLFccMoStinsCalc;
          fFileHeader->fHFccMoStinsCalc = h->fHFccMoStinsCalc;
          fFileHeader->fMeanCorssCalc   = h->fMeanCorssCalc;
          fFileHeader->fSigCorssCalc    = h->fSigCorssCalc;

          fFileHeader->fAvPedCalc       = h->fAvPedCalc;
          fFileHeader->fAvMeanCorssCalc = h->fAvMeanCorssCalc;
          fFileHeader->fAvSigCorssCalc  = h->fAvSigCorssCalc;
          
          if(i_print == 1){fFileHeader->Print();}
          CloseRootFile(file_name);
          ok_read = kTRUE;
        }
      else
        {
          cout << "!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open ROOT file failed for file: "
               << file_name << fTTBELL << endl;
          ok_read = kFALSE;
        }
    }
  return ok_read;
}
TVectorD TEcnaRead::ReadSampleMeans ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  VecDim 
)

Definition at line 1215 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypMSp, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcalNumbering, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues().

{
//Read the expectation values of the samples
//for a given Stin and a given channel
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim : (1) VecDim = fFileHeader->fNbOfSamples

  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
  
  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypMSp;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
           << " Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
            {
              vec(i_samp) = gCnaRootFile->fCnaIndivResult->fMatHis(i0StexEcha, i_samp);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadSampleSigmas ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  VecDim 
)

Definition at line 1274 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypSSp, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, fEcalNumbering, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues().

{
//Read the expectation values of the samples
//for a given Stin and a given channel
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim : (1) VecDim = fFileHeader->fNbOfSamples

  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
  
  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypSSp;

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
            {
              vec(i_samp) = gCnaRootFile->fCnaIndivResult->fMatHis(i0StexEcha,i_samp);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
                   << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
                   <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
                   << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadSampleValues ( const Int_t &  i0StexEcha,
const Int_t &  sample,
const Int_t &  VecDim 
)

Definition at line 1048 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAdcEvt, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues().

{
//Read the event distribution for a given i0StexEcha and a given sample
//in the results ROOT file and return it in a TVectorD(nb of evts in burst)
//
//Possible values for VecDim: (1) VecDim = fFileHeader->fReqNbOfEvts

  TVectorD vec(VecDim);
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  CnaResultTyp typ = cTypAdcEvt;   //  sample as a function of time type

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadSampleValues(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");
      ok_read = gCnaRootFile->ReadElement(typ, i0StexEcha);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_bin=0; i_bin<VecDim; i_bin++)
            {
              vec(i_bin) = gCnaRootFile->fCnaIndivResult->fMatHis(sample, i_bin);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadSampleValues(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);

  return vec;
}
Double_t *** TEcnaRead::ReadSampleValuesSameFile ( const Int_t &  DimX,
const Int_t &  DimY,
const Int_t &  DimZ 
)

Definition at line 1104 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypAdcEvt, TCnaRootFile::fCnaIndivResult, fCnaWrite, fCnew, fDataExist, cmsPerfSuiteHarvest::file_name, TEcnaWrite::fRootFileNameShort, fT3d1_distribs, fT3d2_distribs, fT3d_distribs, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaRun::ReadEventDistributions().

{

//Possible values for DimX, DimY, DimZ : (1) DimX = fEcal->MaxCrysEcnaInStex()
//                                           DimY = fFileHeader->fNbOfSamples
//                                           DimZ = fFileHeader->fReqNbOfEvts

  if(fT3d_distribs == 0)
    {
      //............ Allocation for the 3d array 
      fT3d_distribs   = new Double_t**[DimX];                         fCnew++;  
      fT3d2_distribs  = new  Double_t*[DimX*DimY];                    fCnew++;  
      fT3d1_distribs  = new   Double_t[DimX*DimY*DimZ];               fCnew++;
      
      for(Int_t i0StexEcha = 0 ; i0StexEcha < DimX ; i0StexEcha++){
        fT3d_distribs[i0StexEcha] = &fT3d2_distribs[0] + i0StexEcha*DimY;
        for(Int_t j_samp = 0 ; j_samp < DimY ; j_samp++){
          fT3d2_distribs[DimY*i0StexEcha + j_samp] = &fT3d1_distribs[0]+
            DimZ*(DimY*i0StexEcha+j_samp);}}
    }
  
  //................................. Init to zero                 (ReadSampleValuesSameFile)
  for (Int_t iza=0; iza<DimX; iza++)
    {
      for (Int_t izb=0; izb<DimY; izb++)
        {
          for (Int_t izc=0; izc<DimZ; izc++)
            {
              if( fT3d_distribs[iza][izb][izc] != (Double_t)0 )
                {
                  fT3d_distribs[iza][izb][izc] = (Double_t)0;
                }
            }
        }
    }     
  
  //-------------------------------------------------------------------------- (ReadSampleValuesSameFile)
  CnaResultTyp typ = cTypAdcEvt;   //  sample as a function of time type

  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;

  Int_t  i_entry      = 0;  
  Int_t  i_entry_fail = 0;  

  ok_open = OpenRootFile(file_name, "READ");
  
  if( ok_open == kTRUE )
    {
      for(Int_t i0StexEcha=0; i0StexEcha<DimX; i0StexEcha++)
        {
          if( i0StexEcha == 0 )
            {
              i_entry = gCnaRootFile->ReadElementNextEntryNumber(typ, i0StexEcha);
              if( i_entry >= 0 ){ok_read = kTRUE;}
            }
          if( i_entry >= 0 )                                                //  (ReadSampleValuesSameFile)
            {
              if( i0StexEcha > 0 ){ok_read = gCnaRootFile->ReadElement(i_entry); i_entry++;}
              
              if ( ok_read == kTRUE )
                {
                  fDataExist = kTRUE;     
                  for(Int_t sample=0; sample<DimY; sample++)
                    {
                      for ( Int_t i_bin=0; i_bin<DimZ; i_bin++)
                        {
                          fT3d_distribs[i0StexEcha][sample][i_bin]
                            = gCnaRootFile->fCnaIndivResult->fMatHis(sample, i_bin);
                        }  
                    }
                } 
              else                                                        //  (ReadSampleValuesSameFile)
                {
                  fDataExist = kFALSE;
                  cout << "!TEcnaRead::ReadSampleValuesSameFile(...) *** ERROR ***> "
                       << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
                       <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
                       << fTTBELL << endl;
                }
            }
          else
            {
              i_entry_fail++;
            }
        }
      CloseRootFile(file_name);
    }
  else
    {
      cout  << "*TEcnaRead::ReadSampleValuesSameFile(...)> *ERROR* =====> "
            << " ROOT file not found" << fTTBELL << endl;
    }

  if(i_entry_fail > 0 )
    {
      cout  << "*TEcnaRead::ReadSampleValuesSameFile(...)> *ERROR* =====> "
            << " Entry reading failure(s). i_entry_fail = "
            << i_entry_fail << fTTBELL << endl;
    }
  return fT3d_distribs;
}
TVectorD TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples ( const Int_t &  VecDim)

Definition at line 2647 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypSigCorss, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the Expectation values of the (sample,sample) correlations
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypSigCorss;  // sigma of corss type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero,i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }

  CloseRootFile(file_name);
  return vec;
}
TVectorD TEcnaRead::ReadStinNumbers ( const Int_t &  VecDim)

Definition at line 888 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypNumbers, TCnaRootFile::fCnaIndivResult, fCnaWrite, fCodePrintAllComments, fDataExist, fFlagPrint, cmsPerfSuiteHarvest::file_name, fMemoStinNumbers, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fT1d_StexStinFromIndex, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetOkViewHisto(), GetStexStinFromIndex(), GetStinIndex(), LookAtRootFile(), TEcnaRun::ReadEventDistributions(), ReadHighFrequencyCorrelationsBetweenChannels(), ReadHighFrequencyCovariancesBetweenChannels(), ReadHighFrequencyMeanCorrelationsBetweenStins(), ReadLowFrequencyCorrelationsBetweenChannels(), ReadLowFrequencyCovariancesBetweenChannels(), ReadLowFrequencyMeanCorrelationsBetweenStins(), TEcnaHistos::StexHocoVecoLHFCorcc(), TEcnaHistos::ViewMatrix(), and TEcnaHistos::ViewStin().

{
//Get the Stin numbers and put them in a TVectorD
//Read the ROOT file at first call and load in a TVectorD attribute
//Get directly the TVectorD attribute at other times
//
// Possible values for VecDim:
//          (1) VecDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim); 
  for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}

  if (fMemoStinNumbers == 0)
    {
      CnaResultTyp typ = cTypNumbers;
      const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

      //.............. reading of the ROOT file data type TResultTyp = cTypStinsNumbers
      //               to get the conversion: Stin index -> Stin number (n1StexStin)

      Bool_t ok_open = kFALSE;
      Bool_t ok_read = kFALSE;

      if ( fOpenRootFile )
        {
          cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Reading on file already open."
               << fTTBELL << endl;
        } 
      else
        {
          ok_open = OpenRootFile(file_name, "READ");
          
          Int_t i_zero = 0;
          ok_read = gCnaRootFile->ReadElement(typ, i_zero);
          
          if ( ok_read == kTRUE )
            {
              fDataExist = kTRUE;
              //......... Get the Stin numbers and put them in TVectorD vec()
              for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
                {
                  vec(i_Stin) = gCnaRootFile->fCnaIndivResult->fMatHis(0,i_Stin);
                  fT1d_StexStinFromIndex[i_Stin] = (Int_t)vec(i_Stin);
                }
              fMemoStinNumbers++;
            }
          else
            {
              fDataExist = kFALSE;
              cout << "!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> "
                   << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
                   <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
                   << fTTBELL << endl;
            }
        }
      CloseRootFile(file_name);
      
      if( ok_read == kTRUE )
        {
          //........................... Print the Stin numbers 
          if(fFlagPrint == fCodePrintAllComments)
            {
              for(Int_t i=0; i < VecDim; i++)
                {
                  cout << "*TEcnaRead::ReadStinNumbers(...)> StinNumber[" << i << "] = "
                       << vec[i] << endl;
                }
            }
        }
    }
  else
    {
      fDataExist = kTRUE;
      for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
        {vec(i_Stin) = fT1d_StexStinFromIndex[i_Stin];}
    }

  return vec;
} // ----------------- ( end of ReadStinNumbers(...) ) -----------------
TVectorD TEcnaRead::ReadTotalNoise ( const Int_t &  VecDim)

Definition at line 2433 of file TEcnaRead.cc.

References CloseRootFile(), gather_cfg::cout, cTypTno, TCnaRootFile::fCnaIndivResult, fCnaWrite, fDataExist, cmsPerfSuiteHarvest::file_name, fOpenRootFile, TEcnaWrite::fRootFileNameShort, fTTBELL, gCnaRootFile, GetTypeOfQuantity(), i, OpenRootFile(), and TCnaRootFile::ReadElement().

Referenced by TEcnaHistos::GetHistoValues(), TEcnaHistos::ViewHistime(), and TEcnaHistos::ViewStex().

{
//Read the expectation values of the sigmas of the samples
//for all the channels of a given Stin
//in the ROOT file and return them in a TVectorD
//
//Possible values for VecDim: (1) MatDim = fEcal->MaxCrysEcnaInStex()

  TVectorD vec(VecDim); for(Int_t i=0; i<VecDim; i++){vec(i)=(Double_t)0.;}
  CnaResultTyp typ = cTypTno;   // Total noise type
  const Text_t *file_name = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();

  Bool_t ok_open = kFALSE;
  Bool_t ok_read = kFALSE;
  
  if ( fOpenRootFile )
    {
      cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
           << "Reading on file already open." << fTTBELL << endl;
    } 
  else
    {
      ok_open = OpenRootFile(file_name, "READ");

      Int_t i_zero = 0;
      ok_read = gCnaRootFile->ReadElement(typ, i_zero);
      
      if ( ok_read == kTRUE )
        {
          fDataExist = kTRUE;
          for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
            {
              vec(i_StexCrys)  = gCnaRootFile->fCnaIndivResult->fMatHis(i_zero,i_StexCrys);
            }   
        }
      else
        {
          fDataExist = kFALSE;
          cout << "!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
               << fCnaWrite->fRootFileNameShort.Data() << ": ROOT file failed ->"
               <<  " quantity: <" << GetTypeOfQuantity(typ) << "> not available in file."
               << fTTBELL << endl;
        }
    }
  CloseRootFile(file_name);
  return vec;
}
void TEcnaRead::SetEcalSubDetector ( const TString  SubDet,
const TEcnaNumbering pEcalNumbering,
const TEcnaWrite pCnaWrite 
)

Definition at line 366 of file TEcnaRead.cc.

References fCnaParCout, fCnaParPaths, fCnaWrite, fEcal, fEcalNumbering, fFlagSubDet, fgMaxCar, fStexName, fStinName, and TEcnaParEcal::GetEcalSubDetector().

Referenced by TEcnaRead().

{
 // Set Subdetector (EB or EE)

  fEcal = 0; fEcal = new TEcnaParEcal(SubDet.Data());            // Anew("fEcal");
  Int_t MaxCar = fgMaxCar;
  fFlagSubDet.Resize(MaxCar);
  fFlagSubDet = fEcal->GetEcalSubDetector();

  if( fFlagSubDet == "EB" ){fStexName = "SM";  fStinName = "tower";}
  if( fFlagSubDet == "EE" ){fStexName = "Dee"; fStinName = "SC";}

  fEcalNumbering = 0;
  if( pEcalNumbering == 0 )
    {fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal);   /*Anew("fEcalNumbering")*/ ;}
  else
    {fEcalNumbering = (TEcnaNumbering*)pEcalNumbering;}

  fCnaWrite = 0;
  if( pCnaWrite == 0 )
    {fCnaWrite =
       new TEcnaWrite(fFlagSubDet.Data(), fCnaParPaths, fCnaParCout, fEcal, fEcalNumbering); /*Anew("fCnaWrite")*/ ;}
  else
    {fCnaWrite = (TEcnaWrite*)pCnaWrite;}
}

Member Data Documentation

Int_t TEcnaRead::fCdelete [private]

Definition at line 49 of file TEcnaRead.h.

Referenced by Adelete(), fCopy(), Init(), and ~TEcnaRead().

Definition at line 53 of file TEcnaRead.h.

Referenced by Init(), SetEcalSubDetector(), and TEcnaRead().

Definition at line 54 of file TEcnaRead.h.

Referenced by SetEcalSubDetector(), and TEcnaRead().

Int_t TEcnaRead::fCnew [private]

Definition at line 48 of file TEcnaRead.h.

Referenced by Anew(), fCopy(), Init(), ReadSampleValuesSameFile(), and ~TEcnaRead().

Definition at line 84 of file TEcnaRead.h.

Referenced by fCopy(), GetReadyToReadRootFile(), Init(), PrintComments(), and ~TEcnaRead().

Definition at line 84 of file TEcnaRead.h.

Referenced by fCopy(), Init(), and PrintNoComment().

Definition at line 84 of file TEcnaRead.h.

Referenced by fCopy(), Init(), and PrintWarnings().

Bool_t TEcnaRead::fDataExist [private]
Int_t TEcnaRead::fFlagPrint [private]
TString TEcnaRead::fFlagSubDet [private]

Definition at line 61 of file TEcnaRead.h.

Referenced by GetTypeOfQuantity(), and SetEcalSubDetector().

Int_t TEcnaRead::fgMaxCar [private]

Definition at line 46 of file TEcnaRead.h.

Referenced by Init(), and SetEcalSubDetector().

Int_t TEcnaRead::fLookAtRootFile [private]

Definition at line 67 of file TEcnaRead.h.

Referenced by Init(), LookAtRootFile(), and ReadNumberOfEventsForSamples().

Int_t TEcnaRead::fMemoStinNumbers [private]

Definition at line 71 of file TEcnaRead.h.

Referenced by GetReadyToReadRootFile(), Init(), and ReadStinNumbers().

Int_t TEcnaRead::fNbChanByLine [private]

Definition at line 78 of file TEcnaRead.h.

Int_t TEcnaRead::fNbSampByLine [private]

Definition at line 79 of file TEcnaRead.h.

Bool_t TEcnaRead::fOpenRootFile [private]
TString TEcnaRead::fPathRoot [private]

Definition at line 73 of file TEcnaRead.h.

Referenced by fCopy(), GetReadyToReadRootFile(), Init(), and OpenRootFile().

Definition at line 66 of file TEcnaRead.h.

Referenced by GetReadyToReadRootFile(), Init(), and LookAtRootFile().

Int_t TEcnaRead::fSectChanSizeX [private]

Definition at line 75 of file TEcnaRead.h.

Referenced by fCopy(), and Init().

Int_t TEcnaRead::fSectChanSizeY [private]

Definition at line 75 of file TEcnaRead.h.

Referenced by fCopy(), and Init().

Int_t TEcnaRead::fSectSampSizeX [private]

Definition at line 75 of file TEcnaRead.h.

Referenced by fCopy(), and Init().

Int_t TEcnaRead::fSectSampSizeY [private]

Definition at line 75 of file TEcnaRead.h.

Referenced by fCopy(), and Init().

TString TEcnaRead::fStexName [private]

Definition at line 62 of file TEcnaRead.h.

Referenced by ReadAveragedNumberOfEvents(), and SetEcalSubDetector().

TString TEcnaRead::fStinName [private]

Definition at line 62 of file TEcnaRead.h.

Referenced by SetEcalSubDetector().

Definition at line 69 of file TEcnaRead.h.

Referenced by Init(), LookAtRootFile(), ReadStinNumbers(), and ~TEcnaRead().

Double_t* TEcnaRead::fT3d1_distribs [private]

Definition at line 93 of file TEcnaRead.h.

Referenced by Init(), ReadSampleValuesSameFile(), and ~TEcnaRead().

Double_t** TEcnaRead::fT3d2_distribs [private]

Definition at line 92 of file TEcnaRead.h.

Referenced by Init(), ReadSampleValuesSameFile(), and ~TEcnaRead().

Double_t*** TEcnaRead::fT3d_distribs [private]

Definition at line 91 of file TEcnaRead.h.

Referenced by Init(), ReadSampleValuesSameFile(), and ~TEcnaRead().

Int_t* TEcnaRead::fTagStinNumbers [private]

Definition at line 70 of file TEcnaRead.h.

Referenced by fCopy(), Init(), LookAtRootFile(), and ~TEcnaRead().

TString TEcnaRead::fTTBELL [private]
Int_t TEcnaRead::fUserChan [private]

Definition at line 81 of file TEcnaRead.h.

Referenced by fCopy(), and Init().

Int_t TEcnaRead::fUserSamp [private]

Definition at line 80 of file TEcnaRead.h.

Referenced by fCopy(), and Init().