30 Long_t i_this = (Long_t)
this;
37 if( iCnaParCout == 0 )
45 if( iCnaParPaths == 0 )
52 Long_t iEcalNumbering = pObjectManager->
GetPointerValue(
"TEcnaNumbering");
53 if( iEcalNumbering == 0 )
54 {fEcalNumbering =
new TEcnaNumbering(pObjectManager, SubDet.Data()); }
60 Long_t iCnaParHistos = pObjectManager->
GetPointerValue(
"TEcnaParHistos");
61 if( iCnaParHistos == 0 )
62 {fCnaParHistos =
new TEcnaParHistos(pObjectManager, SubDet.Data()); }
70 {fCnaWrite =
new TEcnaWrite(pObjectManager, SubDet.Data()); }
79 {fEcal =
new TEcnaParEcal(pObjectManager, SubDet.Data()); }
89 const Text_t *h_name =
"CnaHeader";
90 const Text_t *h_title =
"CnaHeader";
100 if( iFileHeader == 0 )
101 {fFileHeader =
new TEcnaHeader(pObjectManager, h_name, h_title); }
106 SetEcalSubDetector(SubDet.Data());
120 fgMaxCar = (Int_t)512;
122 fCodePrintNoComment = fCnaParCout->GetCodePrint(
"NoComment");
123 fCodePrintWarnings = fCnaParCout->GetCodePrint(
"Warnings ");
124 fCodePrintComments = fCnaParCout->GetCodePrint(
"Comments");
125 fCodePrintAllComments = fCnaParCout->GetCodePrint(
"AllComments");
128 fFlagPrint = fCodePrintWarnings;
132 fMemoStinNumbers = 0;
133 fT1d_StexStinFromIndex = 0;
147 Int_t MaxCar = fgMaxCar;
149 fPathRoot.Resize(MaxCar);
150 fPathRoot =
"fPathRoot not defined";
155 fOpenRootFile = kFALSE;
156 fReadyToReadRootFile = 0;
161 fFlagNoFileOpen.Resize(MaxCar);
162 fFlagNoFileOpen =
"No file is open";
165 fCurrentlyOpenFileName.Resize(MaxCar);
166 fCurrentlyOpenFileName = fFlagNoFileOpen;
176 Int_t MaxCar = fgMaxCar;
177 fFlagSubDet.Resize(MaxCar);
178 fFlagSubDet = fEcal->GetEcalSubDetector();
180 if( fFlagSubDet ==
"EB" ){fStexName =
"SM"; fStinName =
"tower";}
181 if( fFlagSubDet ==
"EE" ){fStexName =
"Dee"; fStinName =
"SC";}
237 cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> "
238 <<
" It is time to write a copy constructor"
271 if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){
272 cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << endl;}
281 if (fT1d_StexStinFromIndex != 0){
delete [] fT1d_StexStinFromIndex; Adelete(
"fT1d_StexStinFromIndex");}
282 if (fTagStinNumbers != 0){
delete [] fTagStinNumbers; Adelete(
"fTagStinNumbers");}
284 if (fT3d_AdcValues != 0){
delete [] fT3d_AdcValues; Adelete(
"fT3d_AdcValues");}
285 if (fT3d2_AdcValues != 0){
delete [] fT3d2_AdcValues; Adelete(
"fT3d2_AdcValues");}
286 if (fT3d1_AdcValues != 0){
delete [] fT3d1_AdcValues; Adelete(
"fT3d1_AdcValues");}
288 if ( fCnew != fCdelete )
290 cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = "
291 << fCnew <<
", fCdelete = " << fCdelete << fTTBELL << endl;
299 if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){
300 cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << endl;}
315 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample)
317 Int_t VecDimTest = fFileHeader->fReqNbOfEvts;
319 if( VecDim == VecDimTest )
321 TVectorD vec(VecDim);
323 TString CallingMethod =
"1D";
324 TString StandardQuantity = fCnaParHistos->BuildStandard1DHistoCodeY(CallingMethod, UserQuantity);
326 if( StandardQuantity ==
"Adc" )
328 Int_t i0Sample = n1Sample-1;
329 vec = ReadSampleAdcValues(n1StexStin, i0StinEcha, i0Sample, VecDim);
333 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
334 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
335 <<
"(StandardQuantity = " << StandardQuantity
336 <<
"). Wrong code, no file reading." << fTTBELL << endl;
342 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
343 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
344 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")"
345 <<
". Wrong code or array dimension. No file reading." << fTTBELL << endl;
352 Int_t VecDimTest = fEcal->MaxCrysInStin()*fEcal->MaxSampADC();
353 if( VecDim == VecDimTest )
355 TVectorD vec(VecDim);
357 TString CallingMethod =
"1D";
358 TString StandardQuantity = fCnaParHistos->BuildStandard1DHistoCodeY(CallingMethod, UserQuantity);
360 if( StandardQuantity ==
"MSp" || StandardQuantity ==
"SSp" )
362 if( StandardQuantity ==
"MSp" ){vec = ReadSampleMeans(n1StexStin, VecDim);}
363 if( StandardQuantity ==
"SSp" ){vec = ReadSampleSigmas(n1StexStin, VecDim);}
367 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
368 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
369 <<
", StandardQuantity = " << StandardQuantity
370 <<
". Wrong code, no file reading." << fTTBELL << endl;
376 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
377 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
378 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")"
379 <<
". Wrong code or array dimension. No file reading." << fTTBELL << endl;
389 Int_t VecDimTest = 1;
390 TString StandardDetector = fCnaParHistos->BuildStandardDetectorCode(UserDetector);
391 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee"){VecDimTest = fEcal->MaxCrysEcnaInStex();}
392 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" ){VecDimTest = fEcal->MaxStinEcnaInStas();}
394 if( VecDim == VecDimTest )
396 TVectorD vec(VecDim);
398 TString CallingMethod =
"1D";
399 TString StandardQuantity =
"?";
400 StandardQuantity = fCnaParHistos->BuildStandard1DHistoCodeY(CallingMethod, UserQuantity);
401 TString rTechReadCode = GetTechReadCode(StandardQuantity, StandardDetector);
403 if( rTechReadCode !=
"?" )
405 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee")
407 if( rTechReadCode ==
"NOEStex" ){vec = ReadNumberOfEvents(fEcal->MaxCrysEcnaInStex());}
408 if( rTechReadCode ==
"PedStex" ){vec = ReadPedestals(fEcal->MaxCrysEcnaInStex());}
409 if( rTechReadCode ==
"TNoStex" ){vec = ReadTotalNoise(fEcal->MaxCrysEcnaInStex());}
410 if( rTechReadCode ==
"LFNStex" ){vec = ReadLowFrequencyNoise(fEcal->MaxCrysEcnaInStex());}
411 if( rTechReadCode ==
"HFNStex" ){vec = ReadHighFrequencyNoise(fEcal->MaxCrysEcnaInStex());}
412 if( rTechReadCode ==
"MCsStex" ){vec = ReadMeanCorrelationsBetweenSamples(fEcal->MaxCrysEcnaInStex());}
413 if( rTechReadCode ==
"SCsStex" ){vec = ReadSigmaOfCorrelationsBetweenSamples(fEcal->MaxCrysEcnaInStex());}
416 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" )
418 TVectorD vecStex(fEcal->MaxStinEcnaInStex());
419 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vecStex(
i)=(Double_t)0.;}
421 time_t xStartTime = GetStartTime();
422 time_t xStopTime = GetStopTime();
423 TString xStartDate =
"sStartDate";
424 TString xStopDate =
"sStopDate";
426 for(Int_t i0Stex=0; i0Stex<fEcal->MaxStexInStas(); i0Stex++)
428 Int_t n1Stex = i0Stex+1;
429 FileParameters(fFileHeader->fTypAna, fFileHeader->fNbOfSamples,
430 fFileHeader->fRunNumber, fFileHeader->fFirstReqEvtNumber,
431 fFileHeader->fLastReqEvtNumber, fFileHeader->fReqNbOfEvts,
434 if( LookAtRootFile() == kTRUE )
436 if( rTechReadCode ==
"NOEStas" ){vecStex = ReadAverageNumberOfEvents(fEcal->MaxStinEcnaInStex());}
437 if( rTechReadCode ==
"PedStas" ){vecStex = ReadAveragePedestals(fEcal->MaxStinEcnaInStex());}
438 if( rTechReadCode ==
"TNoStas" ){vecStex = ReadAverageTotalNoise(fEcal->MaxStinEcnaInStex());}
439 if( rTechReadCode ==
"LFNStas" ){vecStex = ReadAverageLowFrequencyNoise(fEcal->MaxStinEcnaInStex());}
440 if( rTechReadCode ==
"HFNStas" ){vecStex = ReadAverageHighFrequencyNoise(fEcal->MaxStinEcnaInStex());}
441 if( rTechReadCode ==
"MCsStas" )
442 {vecStex = ReadAverageMeanCorrelationsBetweenSamples(fEcal->MaxStinEcnaInStex());}
443 if( rTechReadCode ==
"SCsStas" )
444 {vecStex = ReadAverageSigmaOfCorrelationsBetweenSamples(fEcal->MaxStinEcnaInStex());}
446 for(Int_t i0Stin=0; i0Stin<fEcal->MaxStinEcnaInStex(); i0Stin++)
448 vec(fEcal->MaxStinEcnaInStex()*i0Stex+i0Stin) = vecStex(i0Stin);
454 xStartTime = GetStartTime();
455 xStopTime = GetStopTime();
456 xStartDate = GetStartDate();
457 xStopDate = GetStopDate();
459 time_t cStartTime = GetStartTime();
460 time_t cStopTime = GetStopTime();
461 TString cStartDate = GetStartDate();
462 TString cStopDate = GetStopDate();
464 if( cStartTime < xStartTime ){xStartTime = cStartTime; xStartDate = cStartDate;}
465 if( cStopTime > xStopTime ){xStopTime = cStopTime; xStopDate = cStopDate;}
467 fFileHeader->fStartDate = xStartDate;
468 fFileHeader->fStopDate = xStopDate;
472 cout <<
"!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> "
473 <<
" ROOT file not found" << fTTBELL << endl;
480 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
481 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
482 <<
", UserDetector = " << UserDetector
483 <<
". Wrong code(s). No file reading." << fTTBELL << endl;
489 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
490 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
491 <<
", UserDetector = " << UserDetector <<
", VecDim = " << VecDim
492 <<
". Wrong code(s) or array dimension. No file reading." << fTTBELL << endl;
503 const Int_t& nb_arg_1,
const Int_t& nb_arg_2)
505 TMatrixD mat(MatDim, MatDim);
506 TString CallingMethod =
"2D";
507 TString StandardMatrixType =
"?";
508 TString StandardBetweenWhat =
"?";
510 StandardMatrixType = fCnaParHistos->BuildStandardCovOrCorCode(CallingMethod, UserCorOrCov);
511 StandardBetweenWhat = fCnaParHistos->BuildStandardBetweenWhatCode(CallingMethod, UserBetweenWhat);
513 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
515 if( StandardBetweenWhat ==
"Mss" )
517 Int_t n1StexStin = nb_arg_1;
518 Int_t i0StinEcha = nb_arg_2;
520 if( StandardMatrixType ==
"Cov" )
521 {mat = ReadCovariancesBetweenSamples(n1StexStin, i0StinEcha, MatDim);}
523 if( StandardMatrixType ==
"Cor" )
524 {mat = ReadCorrelationsBetweenSamples(n1StexStin, i0StinEcha, MatDim);}
527 if( StandardBetweenWhat !=
"Mss" )
529 Int_t n1StexStin_a = nb_arg_1;
530 Int_t n1StexStin_b = nb_arg_2;
532 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
533 {mat = ReadLowFrequencyCovariancesBetweenChannels(n1StexStin_a, n1StexStin_b, MatDim);}
535 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
536 {mat = ReadLowFrequencyCorrelationsBetweenChannels(n1StexStin_a, n1StexStin_b, MatDim);}
538 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
539 {mat = ReadHighFrequencyCovariancesBetweenChannels(n1StexStin_a, n1StexStin_b, MatDim);}
541 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
542 {mat = ReadHighFrequencyCorrelationsBetweenChannels(n1StexStin_a, n1StexStin_b, MatDim);}
547 for(Int_t
i=0;
i-MatDim<0;
i++)
548 {
for(Int_t
j=0;
j-MatDim<0;
j++)
549 {mat(
i,
j) = (double_t)0.;}}
550 cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
551 <<
", UserBetweenWhat = " << UserBetweenWhat
552 <<
". Wrong code(s), no file reading." << fTTBELL << endl;
560 TMatrixD mat(MatDim, MatDim);
561 TString CallingMethod =
"2D";
562 TString StandardMatrixType =
"?";
563 TString StandardBetweenWhat =
"?";
565 StandardMatrixType = fCnaParHistos->BuildStandardCovOrCorCode(CallingMethod, UserCorOrCov);
566 StandardBetweenWhat = fCnaParHistos->BuildStandardBetweenWhatCode(CallingMethod, UserBetweenWhat);
568 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
571 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
572 {mat = ReadLowFrequencyCovariancesBetweenChannels(MatDim);}
574 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
575 {mat = ReadLowFrequencyCorrelationsBetweenChannels(MatDim);}
577 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
578 {mat = ReadHighFrequencyCovariancesBetweenChannels(MatDim);}
580 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
581 {mat = ReadHighFrequencyCorrelationsBetweenChannels(MatDim);}
584 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttLF" )
585 {mat = ReadLowFrequencyMeanCorrelationsBetweenStins(MatDim);}
587 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttHF" )
588 {mat = ReadHighFrequencyMeanCorrelationsBetweenStins(MatDim);}
592 for(Int_t
i=0;
i-MatDim<0;
i++)
593 {
for(Int_t
j=0;
j-MatDim<0;
j++)
594 {mat(
i,
j) = (double_t)0.;}}
595 cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
596 <<
", UserBetweenWhat = " << UserBetweenWhat
597 <<
". Wrong code(s), no file reading." << fTTBELL << endl;
605 TString rTechReadCode =
"?";
606 TString dTechDetector =
"?";
608 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee"){dTechDetector =
"Stex";}
609 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" ){dTechDetector =
"Stas";}
611 if( dTechDetector ==
"?")
613 cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = "
614 << dTechDetector <<
", StandardDetector = " << StandardDetector
619 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stex" ){rTechReadCode =
"NOEStex";}
620 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stas" ){rTechReadCode =
"NOEStas";}
621 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stex" ){rTechReadCode =
"PedStex";}
622 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stas" ){rTechReadCode =
"PedStas";}
623 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stex" ){rTechReadCode =
"TNoStex";}
624 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stas" ){rTechReadCode =
"TNoStas";}
625 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"LFNStex";}
626 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"LFNStas";}
627 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"HFNStex";}
628 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"HFNStas";}
629 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"MCsStex";}
630 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"MCsStas";}
631 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"SCsStex";}
632 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"SCsStas";}
635 if( rTechReadCode ==
"?")
637 cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " << rTechReadCode
638 <<
", StandardQuantity = " << StandardQuantity
642 return rTechReadCode;
651 const Int_t& run_number,
const Int_t& nfirst,
652 const Int_t&
nlast,
const Int_t& nreqevts,
653 const Int_t& Stex,
const TString& path_root)
659 TString sTypAna = typ_ana;
660 Int_t nNbOfSamples = nb_of_samples;
661 Int_t nRunNumber = run_number;
662 Int_t nFirstEvt = nfirst;
663 Int_t nLastEvt =
nlast;
664 Int_t nReqNbOfEvts = nreqevts;
665 Int_t nStexNumber = Stex;
668 const Text_t *h_name =
"CnaHeader";
669 const Text_t *h_title =
"CnaHeader";
686 if( fFileHeader == 0 ){fFileHeader =
new TEcnaHeader(fObjectManager, h_name, h_title); ;}
687 fFileHeader->HeaderParameters(sTypAna, nNbOfSamples, nRunNumber,
688 nFirstEvt, nLastEvt, nReqNbOfEvts, nStexNumber);
699 fPathRoot = path_root;
702 fCnaWrite->RegisterFileParameters(typ_ana, nb_of_samples, run_number, nfirst, nlast, nreqevts, Stex);
703 fCnaWrite->fMakeResultsFileName();
707 fMemoStinNumbers = 0;
709 if( fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments )
712 cout <<
"*TEcnaRead::FileParameters(...)>" << endl
713 <<
" The method has been called with the following argument values:" << endl
714 <<
" Analysis name = "
715 << fFileHeader->fTypAna << endl
716 <<
" Nb of required samples = "
717 << fFileHeader->fNbOfSamples << endl
719 << fFileHeader->fRunNumber << endl
720 <<
" First requested event number = "
721 << fFileHeader->fFirstReqEvtNumber << endl
722 <<
" Last requested event number = "
723 << fFileHeader->fLastReqEvtNumber << endl
724 <<
" Requested number of events = "
725 << fFileHeader->fReqNbOfEvts << endl
727 << fFileHeader->fStex << endl
728 <<
" Path for the ROOT file = "
733 fReadyToReadRootFile = 1;
761 TString cType =
"run type not defined";
762 Int_t numtype = fFileHeader->fRunType;
765 if( numtype == 0 ){cType =
"COSMICS";}
766 if( numtype == 1 ){cType =
"BEAMH4";}
767 if( numtype == 2 ){cType =
"BEAMH2";}
768 if( numtype == 3 ){cType =
"MTCC";}
769 if( numtype == 4 ){cType =
"LASER_STD";}
770 if( numtype == 5 ){cType =
"LASER_POWER_SCAN";}
771 if( numtype == 6 ){cType =
"LASER_DELAY_SCAN";}
772 if( numtype == 7 ){cType =
"TESTPULSE_SCAN_MEM";}
773 if( numtype == 8 ){cType =
"TESTPULSE_MGPA";}
774 if( numtype == 9 ){cType =
"PEDESTAL_STD";}
775 if( numtype == 10 ){cType =
"PEDESTAL_OFFSET_SCAN";}
776 if( numtype == 11 ){cType =
"PEDESTAL_25NS_SCAN";}
777 if( numtype == 12 ){cType =
"LED_STD";}
779 if( numtype == 13 ){cType =
"PHYSICS_GLOBAL";}
780 if( numtype == 14 ){cType =
"COSMICS_GLOBAL";}
781 if( numtype == 15 ){cType =
"HALO_GLOBAL";}
783 if( numtype == 16 ){cType =
"LASER_GAP";}
784 if( numtype == 17 ){cType =
"TESTPULSE_GAP";}
785 if( numtype == 18 ){cType =
"PEDESTAL_GAP";}
786 if( numtype == 19 ){cType =
"LED_GAP";}
788 if( numtype == 20 ){cType =
"PHYSICS_LOCAL";}
789 if( numtype == 21 ){cType =
"COSMICS_LOCAL";}
790 if( numtype == 22 ){cType =
"HALO_LOCAL";}
791 if( numtype == 23 ){cType =
"CALIB_LOCAL";}
793 if( numtype == 24 ){cType =
"PEDSIM";}
811 Bool_t ok_open = kFALSE;
832 Long_t iCnaRootFile = fObjectManager->GetPointerValue(
"TEcnaRootFile");
833 if( iCnaRootFile == 0 )
847 if ( ok_open == kFALSE )
849 cout <<
"!TEcnaRead::OpenRootFile> " << s_name.Data() <<
": file not found." << endl;
855 if(fFlagPrint == fCodePrintAllComments)
857 cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() <<
" OK "
860 fOpenRootFile = kTRUE;
861 fCurrentlyOpenFileName = s_name;
862 if(fFlagPrint == fCodePrintAllComments)
864 cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file: " << fCurrentlyOpenFileName.Data() <<
" => OK "
879 Bool_t ok_close = kFALSE;
881 if (fOpenRootFile == kTRUE )
887 if(fFlagPrint == fCodePrintAllComments){
888 TString e_path; e_path.Append(name);
889 cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << endl;}
890 if(fFlagPrint == fCodePrintAllComments){
892 cout <<
"*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " <<
gCnaRootFile
893 <<
", pointer = " << pointer_value << endl;}
898 fOpenRootFile = kFALSE;
899 fCurrentlyOpenFileName = fFlagNoFileOpen;
900 fReadyToReadRootFile = 0;
904 cout <<
"*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = "
911 cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " << fOpenRootFile
929 if(fReadyToReadRootFile == 1)
933 if( ReadRootFileHeader(iprint) == kTRUE )
936 if( fTagStinNumbers == 0 ){fTagStinNumbers =
new Int_t[1]; Anew(
"fTagStinNumbers");}
939 if(fT1d_StexStinFromIndex == 0)
940 {fT1d_StexStinFromIndex =
new Int_t[fEcal->MaxStinEcnaInStex()]; Anew(
"fT1d_StexStinFromIndex");}
943 TVectorD vec(fEcal->MaxStinEcnaInStex());
944 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
945 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
947 for (Int_t
i = 0;
i < fEcal->MaxStinEcnaInStex();
i++ ){
948 fT1d_StexStinFromIndex[
i] = (Int_t)vec(
i);}
950 fTagStinNumbers[0] = 1; fFileHeader->fStinNumbersCalc++;
957 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
958 <<
" ROOT file not found " << fTTBELL << endl;
964 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
965 <<
" FileParameters not called " << fTTBELL << endl;
993 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
994 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
996 if( i_print == 1 ){
cout <<
"*TEcnaRead::ReadRootFileHeader> file_name = "
997 << fCnaWrite->fRootFileNameShort.Data() << endl;}
999 Bool_t ok_open = kFALSE;
1001 TString FileNameLong = fCnaWrite->GetRootFileName();
1002 Bool_t allowed_to_read = kFALSE;
1010 if( FileNameLong == fCurrentlyOpenFileName )
1012 allowed_to_read = kTRUE;
1016 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1017 ok_open = OpenRootFile(file_name,
"READ");
1020 allowed_to_read = kTRUE;
1024 cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: "
1025 << file_name << fTTBELL << endl;
1026 allowed_to_read = kFALSE;
1030 if( allowed_to_read == kTRUE )
1038 fFileHeader->fStartTime = headerFile->
fStartTime;
1039 fFileHeader->fStopTime = headerFile->
fStopTime;
1040 fFileHeader->fStartDate = headerFile->
fStartDate;
1041 fFileHeader->fStopDate = headerFile->
fStopDate;
1043 fFileHeader->fRunType = headerFile->
fRunType;
1047 fFileHeader->fAdcEvtCalc = headerFile->
fAdcEvtCalc;
1048 fFileHeader->fMSpCalc = headerFile->
fMSpCalc;
1049 fFileHeader->fSSpCalc = headerFile->
fSSpCalc;
1050 fFileHeader->fAvTnoCalc = headerFile->
fAvTnoCalc;
1051 fFileHeader->fAvLfnCalc = headerFile->
fAvLfnCalc;
1052 fFileHeader->fAvHfnCalc = headerFile->
fAvHfnCalc;
1054 fFileHeader->fCovCssCalc = headerFile->
fCovCssCalc;
1055 fFileHeader->fCorCssCalc = headerFile->
fCorCssCalc;
1056 fFileHeader->fHfCovCalc = headerFile->
fHfCovCalc;
1057 fFileHeader->fHfCorCalc = headerFile->
fHfCorCalc;
1058 fFileHeader->fLfCovCalc = headerFile->
fLfCovCalc;
1059 fFileHeader->fLfCorCalc = headerFile->
fLfCorCalc;
1065 fFileHeader->fAvPedCalc = headerFile->
fAvPedCalc;
1069 if(i_print == 1){fFileHeader->Print();}
1071 CloseRootFile(file_name);
1078 const Int_t& MaxValue,
const Int_t& VecDim)
1082 if( MaxValue != VecDim)
1084 cout <<
"!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1085 <<
", MaxName: " << MaxName.Data()
1086 <<
", Maxvalue = " << MaxValue
1087 <<
", VecDim = " << VecDim << fTTBELL << endl;
1093 cout <<
"!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1094 <<
", MaxName: " << MaxName.Data()
1095 <<
", Maxvalue = " << MaxValue
1096 <<
", VecDim = " << VecDim << endl;
1102 const Int_t& MaxValue,
const Int_t& MatDim)
1106 if( MaxValue != MatDim)
1108 cout <<
"!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1109 <<
", MaxName: " << MaxName.Data()
1110 <<
", Maxvalue = " << MaxValue
1111 <<
", MatDim = " << MatDim << fTTBELL << endl;
1117 cout <<
"!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1118 <<
", MaxName: " << MaxName.Data()
1119 <<
", Maxvalue = " << MaxValue
1120 <<
", MatDim = " << MatDim << endl;
1139 TVectorD vec(VecDim);
1141 TestArrayDimH1(
"ReadStinNumbers",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
1143 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1145 if (fMemoStinNumbers == 0)
1148 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1149 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1154 Bool_t ok_open = kFALSE;
1155 Bool_t ok_read = kFALSE;
1157 TString FileNameLong = fCnaWrite->GetRootFileName();
1158 Bool_t allowed_to_read = kFALSE;
1166 if( FileNameLong == fCurrentlyOpenFileName )
1168 allowed_to_read = kTRUE;
1172 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1173 ok_open = OpenRootFile(file_name,
"READ");
1177 allowed_to_read = kTRUE;
1181 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: "
1182 << file_name << fTTBELL << endl;
1183 allowed_to_read = kFALSE;
1188 if( allowed_to_read == kTRUE )
1193 if( ok_read == kTRUE )
1197 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1200 fT1d_StexStinFromIndex[i_Stin] = (Int_t)vec(i_Stin);
1206 fDataExist = kFALSE;
1207 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> "
1208 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1209 <<
" -> quantity: <"
1210 << GetTypeOfQuantity(typ) <<
"> not available in file."
1213 CloseRootFile(file_name);
1216 if( ok_read == kTRUE )
1219 if(fFlagPrint == fCodePrintAllComments)
1221 for(Int_t
i=0;
i < VecDim;
i++)
1223 cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = "
1232 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1233 {vec(i_Stin) = fT1d_StexStinFromIndex[i_Stin];}
1250 const Int_t&
sample,
const Int_t& VecDim)
1257 TestArrayDimH1(
"ReadSampleAdcValues",
"fFileHeader->fReqNbOfEvts", fFileHeader->fReqNbOfEvts, VecDim);
1259 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1261 TVectorD vec(VecDim);
1262 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1266 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1267 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1269 Bool_t ok_open = kFALSE;
1270 Bool_t ok_read = kFALSE;
1272 TString FileNameLong = fCnaWrite->GetRootFileName();
1273 Bool_t allowed_to_read = kFALSE;
1281 if( FileNameLong == fCurrentlyOpenFileName )
1283 allowed_to_read = kTRUE;
1287 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1288 ok_open = OpenRootFile(file_name,
"READ");
1292 allowed_to_read = kTRUE;
1296 cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: "
1297 << file_name << fTTBELL << endl;
1298 allowed_to_read = kFALSE;
1303 if( allowed_to_read == kTRUE )
1307 if ( ok_read == kTRUE )
1310 for ( Int_t i_bin=0; i_bin<VecDim; i_bin++)
1317 fDataExist = kFALSE;
1318 cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> "
1319 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1320 <<
" -> quantity: <"
1321 << GetTypeOfQuantity(typ) <<
"> not available in file."
1324 CloseRootFile(file_name);
1337 const Int_t & VecDim)
1345 TestArrayDimH1(
"ReadSampleMeans",
"fFileHeader->fNbOfSamples", fFileHeader->fNbOfSamples, VecDim);
1347 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1349 TVectorD vec(VecDim);
1350 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1354 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1355 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1357 Bool_t ok_open = kFALSE;
1358 Bool_t ok_read = kFALSE;
1360 TString FileNameLong = fCnaWrite->GetRootFileName();
1361 Bool_t allowed_to_read = kFALSE;
1369 if( FileNameLong == fCurrentlyOpenFileName )
1371 allowed_to_read = kTRUE;
1375 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1376 ok_open = OpenRootFile(file_name,
"READ");
1379 allowed_to_read = kTRUE;
1383 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: "
1384 << file_name << fTTBELL << endl;
1385 allowed_to_read = kFALSE;
1390 if( allowed_to_read == kTRUE )
1395 if ( ok_read == kTRUE )
1398 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1405 fDataExist = kFALSE;
1406 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1407 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1409 << GetTypeOfQuantity(typ) <<
"> not available in file."
1412 CloseRootFile(file_name);
1425 TestArrayDimH1(
"ReadSampleMeans",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1426 fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin() , VecDim);
1428 TVectorD vec(VecDim);
1429 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1433 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1434 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1436 Bool_t ok_open = kFALSE;
1437 Bool_t ok_read = kFALSE;
1439 TString FileNameLong = fCnaWrite->GetRootFileName();
1440 Bool_t allowed_to_read = kFALSE;
1448 if( FileNameLong == fCurrentlyOpenFileName )
1450 allowed_to_read = kTRUE;
1454 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1455 ok_open = OpenRootFile(file_name,
"READ");
1459 allowed_to_read = kTRUE;
1463 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: "
1464 << file_name << fTTBELL << endl;
1465 allowed_to_read = kFALSE;
1470 if( allowed_to_read == kTRUE )
1475 if ( ok_read == kTRUE )
1479 for( Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++ )
1481 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1482 for ( Int_t i_samp=0; i_samp<fFileHeader->fNbOfSamples; i_samp++ )
1484 vec(i0StinEcha*fFileHeader->fNbOfSamples+i_samp) =
1491 fDataExist = kFALSE;
1492 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1493 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1494 <<
" -> quantity: <"
1495 << GetTypeOfQuantity(typ) <<
"> not available in file."
1498 CloseRootFile(file_name);
1509 const Int_t & VecDim)
1517 TestArrayDimH1(
"ReadSampleSigmas",
"fFileHeader->fNbOfSamples", fFileHeader->fNbOfSamples, VecDim);
1519 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1521 TVectorD vec(VecDim);
1526 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1527 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1529 TString FileNameLong = fCnaWrite->GetRootFileName();
1537 if (FileNameLong != fCurrentlyOpenFileName)
1539 if( fCurrentlyOpenFileName != fFlagNoFileOpen )
1540 CloseRootFile(current_file_name);
1542 if(!(OpenRootFile(file_name,
"READ")))
1544 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: "
1545 << file_name << fTTBELL << endl;
1555 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1562 fDataExist = kFALSE;
1563 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1564 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1565 <<
" -> quantity: <"
1566 << GetTypeOfQuantity(typ) <<
"> not available in file."
1569 CloseRootFile(file_name);
1581 TestArrayDimH1(
"ReadSampleSigmas",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1582 fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin(), VecDim);
1584 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1588 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1589 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1591 Bool_t ok_open = kFALSE;
1592 Bool_t ok_read = kFALSE;
1594 TString FileNameLong = fCnaWrite->GetRootFileName();
1595 Bool_t allowed_to_read = kFALSE;
1603 if( FileNameLong == fCurrentlyOpenFileName )
1605 allowed_to_read = kTRUE;
1609 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1610 ok_open = OpenRootFile(file_name,
"READ");
1614 allowed_to_read = kTRUE;
1618 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: "
1619 << file_name << fTTBELL << endl;
1620 allowed_to_read = kFALSE;
1625 if( allowed_to_read == kTRUE )
1630 if ( ok_read == kTRUE )
1634 for( Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++ )
1636 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1637 for ( Int_t i_samp = 0; i_samp < fFileHeader->fNbOfSamples; i_samp++)
1639 vec(i0StinEcha*fFileHeader->fNbOfSamples+i_samp) =
1646 fDataExist = kFALSE;
1647 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1648 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1649 <<
" -> quantity: <"
1650 << GetTypeOfQuantity(typ) <<
"> not available in file."
1653 CloseRootFile(file_name);
1672 TestArrayDimH1(
"ReadNumberOfEvents",
"fEcal->MaxCrysEcnaInStex()", fEcal->MaxCrysEcnaInStex(), VecDim);
1674 TVectorD vec(VecDim);
1675 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1677 TMatrixD mat(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1679 for(Int_t iStexStin=0; iStexStin<fEcal->MaxStinEcnaInStex(); iStexStin++)
1682 for(Int_t
i=0;
i<fEcal->MaxCrysInStin();
i++)
1683 {
for(Int_t
j=0;
j<fFileHeader->fNbOfSamples;
j++){mat(
i,
j)=(Double_t)0.;}}
1685 Int_t n1StexStin = iStexStin+1;
1686 mat = ReadNumberOfEventsForSamples(n1StexStin, fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1688 for(Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++)
1690 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
1691 vec(i0StexEcha) = 0;
1693 for(Int_t i_samp=0; i_samp<fFileHeader->fNbOfSamples; i_samp++)
1694 {vec(i0StexEcha) += mat(i0StinEcha, i_samp);}
1695 vec(i0StexEcha) = vec(i0StexEcha)/fFileHeader->fNbOfSamples;
1707 const Int_t& MatDimX,
const Int_t& MatDimY)
1718 TMatrixD mat(MatDimX, MatDimY);
1719 for(Int_t
i=0;
i-MatDimX<0;
i++)
1720 {
for(Int_t
j=0;
j-MatDimY<0;
j++){mat(
i,
j)=(Double_t)0.;}}
1722 Int_t Stin_index = GetStinIndex(n1StexStin);
1723 if( Stin_index >= 0 )
1725 if(fLookAtRootFile == 1)
1728 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1729 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1731 Bool_t ok_open = kFALSE;
1732 Bool_t ok_read = kFALSE;
1734 TString FileNameLong = fCnaWrite->GetRootFileName();
1735 Bool_t allowed_to_read = kFALSE;
1743 if( FileNameLong == fCurrentlyOpenFileName )
1745 allowed_to_read = kTRUE;
1749 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1750 ok_open = OpenRootFile(file_name,
"READ");
1753 allowed_to_read = kTRUE;
1757 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: "
1758 << file_name << fTTBELL << endl;
1759 allowed_to_read = kFALSE;
1764 if( allowed_to_read == kTRUE )
1769 if ( ok_read == kTRUE )
1772 for (Int_t i_crys=0; i_crys-MatDimX<0; i_crys++)
1774 Int_t j_cna_chan = Stin_index*MatDimX + i_crys;
1775 for ( Int_t i_samp=0; i_samp-MatDimY<0; i_samp++)
1783 fDataExist = kFALSE;
1784 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1785 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1786 <<
" -> quantity: <"
1787 << GetTypeOfQuantity(typ) <<
"> not available in file."
1791 CloseRootFile(file_name);
1795 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1796 <<
"It is not possible to access the number of found events: the ROOT file has not been read."
1816 TestArrayDimH1(
"ReadPedestals",
"fEcal->MaxCrysEcnaInStex()", fEcal->MaxCrysEcnaInStex(), VecDim);
1818 TVectorD vec(VecDim);
1819 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1822 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1823 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1825 Bool_t ok_open = kFALSE;
1826 Bool_t ok_read = kFALSE;
1828 TString FileNameLong = fCnaWrite->GetRootFileName();
1829 Bool_t allowed_to_read = kFALSE;
1837 if( FileNameLong == fCurrentlyOpenFileName )
1839 allowed_to_read = kTRUE;
1843 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1844 ok_open = OpenRootFile(file_name,
"READ");
1847 allowed_to_read = kTRUE;
1851 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: "
1852 << file_name << fTTBELL << endl;
1853 allowed_to_read = kFALSE;
1858 if( allowed_to_read == kTRUE )
1863 if ( ok_read == kTRUE )
1866 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1873 fDataExist = kFALSE;
1874 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
1875 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1876 <<
" -> quantity: <"
1877 << GetTypeOfQuantity(typ) <<
"> not available in file."
1880 CloseRootFile(file_name);
1898 TestArrayDimH1(
"ReadTotalNoise",
"fEcal->MaxCrysEcnaInStex()", fEcal->MaxCrysEcnaInStex(), VecDim);
1900 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1902 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1903 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1905 Bool_t ok_open = kFALSE;
1906 Bool_t ok_read = kFALSE;
1908 TString FileNameLong = fCnaWrite->GetRootFileName();
1909 Bool_t allowed_to_read = kFALSE;
1917 if( FileNameLong == fCurrentlyOpenFileName )
1919 allowed_to_read = kTRUE;
1923 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
1924 ok_open = OpenRootFile(file_name,
"READ");
1927 allowed_to_read = kTRUE;
1931 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: "
1932 << file_name << fTTBELL << endl;
1933 allowed_to_read = kFALSE;
1938 if( allowed_to_read == kTRUE )
1943 if ( ok_read == kTRUE )
1946 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1953 fDataExist = kFALSE;
1954 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
1955 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
1956 <<
" -> quantity: <"
1957 << GetTypeOfQuantity(typ) <<
"> not available in file."
1960 CloseRootFile(file_name);
1977 TestArrayDimH1(
"ReadMeanCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
1978 fEcal->MaxCrysEcnaInStex(), VecDim);
1980 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1982 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
1983 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
1985 Bool_t ok_open = kFALSE;
1986 Bool_t ok_read = kFALSE;
1988 TString FileNameLong = fCnaWrite->GetRootFileName();
1989 Bool_t allowed_to_read = kFALSE;
1997 if( FileNameLong == fCurrentlyOpenFileName )
1999 allowed_to_read = kTRUE;
2003 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2004 ok_open = OpenRootFile(file_name,
"READ");
2007 allowed_to_read = kTRUE;
2011 cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2012 << file_name << fTTBELL << endl;
2013 allowed_to_read = kFALSE;
2018 if( allowed_to_read == kTRUE )
2023 if ( ok_read == kTRUE )
2026 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2033 fDataExist = kFALSE;
2034 cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> "
2035 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2036 <<
" -> quantity: <"
2037 << GetTypeOfQuantity(typ) <<
"> not available in file."
2040 CloseRootFile(file_name);
2058 TestArrayDimH1(
"ReadLowFrequencyNoise",
"fEcal->MaxCrysEcnaInStex()", fEcal->MaxCrysEcnaInStex(), VecDim);
2060 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2062 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2063 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2065 Bool_t ok_open = kFALSE;
2066 Bool_t ok_read = kFALSE;
2068 TString FileNameLong = fCnaWrite->GetRootFileName();
2069 Bool_t allowed_to_read = kFALSE;
2077 if( FileNameLong == fCurrentlyOpenFileName )
2079 allowed_to_read = kTRUE;
2083 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2084 ok_open = OpenRootFile(file_name,
"READ");
2088 allowed_to_read = kTRUE;
2092 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2093 << file_name << fTTBELL << endl;
2094 allowed_to_read = kFALSE;
2099 if( allowed_to_read == kTRUE )
2104 if ( ok_read == kTRUE )
2107 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2114 fDataExist = kFALSE;
2115 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
2116 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2117 <<
" -> quantity: <"
2118 << GetTypeOfQuantity(typ) <<
"> not available in file."
2121 CloseRootFile(file_name);
2139 TestArrayDimH1(
"ReadHighFrequencyNoise",
"fEcal->MaxCrysEcnaInStex()", fEcal->MaxCrysEcnaInStex(), VecDim);
2141 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2143 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2144 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2146 Bool_t ok_open = kFALSE;
2147 Bool_t ok_read = kFALSE;
2149 TString FileNameLong = fCnaWrite->GetRootFileName();
2150 Bool_t allowed_to_read = kFALSE;
2158 if( FileNameLong == fCurrentlyOpenFileName )
2160 allowed_to_read = kTRUE;
2164 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2165 ok_open = OpenRootFile(file_name,
"READ");
2169 allowed_to_read = kTRUE;
2173 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2174 << file_name << fTTBELL << endl;
2175 allowed_to_read = kFALSE;
2180 if( allowed_to_read == kTRUE )
2185 if ( ok_read == kTRUE )
2188 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2195 fDataExist = kFALSE;
2196 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
2197 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2198 <<
" -> quantity: <"
2199 << GetTypeOfQuantity(typ) <<
"> not available in file."
2202 CloseRootFile(file_name);
2220 TestArrayDimH1(
"ReadSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
2221 fEcal->MaxCrysEcnaInStex(), VecDim);
2223 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2225 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2226 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2228 Bool_t ok_open = kFALSE;
2229 Bool_t ok_read = kFALSE;
2231 TString FileNameLong = fCnaWrite->GetRootFileName();
2232 Bool_t allowed_to_read = kFALSE;
2240 if( FileNameLong == fCurrentlyOpenFileName )
2242 allowed_to_read = kTRUE;
2246 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2247 ok_open = OpenRootFile(file_name,
"READ");
2251 allowed_to_read = kTRUE;
2255 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2256 << file_name << fTTBELL << endl;
2257 allowed_to_read = kFALSE;
2262 if( allowed_to_read == kTRUE )
2267 if ( ok_read == kTRUE )
2270 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2277 fDataExist = kFALSE;
2278 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2279 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2280 <<
" -> quantity: <"
2281 << GetTypeOfQuantity(typ) <<
"> not available in file."
2284 CloseRootFile(file_name);
2306 TestArrayDimH1(
"ReadAverageNumberOfEvents",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
2308 TVectorD vecAverage(VecDim);
2309 for(Int_t
i=0;
i<VecDim;
i++){vecAverage(
i)=(Double_t)0.;}
2311 TVectorD vecMean(fEcal->MaxCrysEcnaInStex());
2312 for(Int_t
i=0;
i<fEcal->MaxCrysEcnaInStex();
i++){vecMean(
i)=(Double_t)0.;}
2314 vecMean = ReadNumberOfEvents(fEcal->MaxCrysEcnaInStex());
2316 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2318 vecAverage(i0StexStin) = 0;
2320 for(Int_t i0StinEcha=0; i0StinEcha<fEcal->MaxCrysInStin(); i0StinEcha++)
2322 Int_t n1StexStin = i0StexStin+1;
2323 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
2325 if( fStexName ==
"SM" )
2326 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2328 if( fStexName ==
"Dee" )
2333 Int_t n1StinEcha = i0StinEcha+1;
2334 if( n1StexStin == 10 && n1StinEcha == 11 )
2335 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2336 if( n1StexStin == 11 && n1StinEcha == 11 )
2337 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2338 if( !( (n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11 ) )
2339 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2343 Double_t xdivis = (Double_t)0.;
2344 if( fStexName ==
"SM" )
2345 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2346 if( fStexName ==
"Dee" )
2348 Int_t n1StexStin = i0StexStin+1;
2349 xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStin,
"TEcnaRead");
2352 vecAverage(i0StexStin) = vecAverage(i0StexStin)/xdivis;
2370 TestArrayDimH1(
"ReadAveragePedestals",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
2372 TVectorD vec(VecDim);
2373 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2376 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2377 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2379 Bool_t ok_open = kFALSE;
2380 Bool_t ok_read = kFALSE;
2382 TString FileNameLong = fCnaWrite->GetRootFileName();
2383 Bool_t allowed_to_read = kFALSE;
2391 if( FileNameLong == fCurrentlyOpenFileName )
2393 allowed_to_read = kTRUE;
2397 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2398 ok_open = OpenRootFile(file_name,
"READ");
2402 allowed_to_read = kTRUE;
2406 cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: "
2407 << file_name << fTTBELL << endl;
2408 allowed_to_read = kFALSE;
2413 if( allowed_to_read == kTRUE )
2418 if ( ok_read == kTRUE )
2421 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2428 fDataExist = kFALSE;
2429 cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> "
2430 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2431 <<
" -> quantity: <"
2432 << GetTypeOfQuantity(typ) <<
"> not available in file."
2435 CloseRootFile(file_name);
2453 TestArrayDimH1(
"ReadAverageTotalNoise",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
2455 TVectorD vec(VecDim);
2456 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2459 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2460 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2462 Bool_t ok_open = kFALSE;
2463 Bool_t ok_read = kFALSE;
2465 TString FileNameLong = fCnaWrite->GetRootFileName();
2466 Bool_t allowed_to_read = kFALSE;
2474 if( FileNameLong == fCurrentlyOpenFileName )
2476 allowed_to_read = kTRUE;
2480 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2481 ok_open = OpenRootFile(file_name,
"READ");
2485 allowed_to_read = kTRUE;
2489 cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: "
2490 << file_name << fTTBELL << endl;
2491 allowed_to_read = kFALSE;
2496 if( allowed_to_read == kTRUE )
2501 if ( ok_read == kTRUE )
2504 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2511 fDataExist = kFALSE;
2512 cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> "
2513 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2514 <<
" -> quantity: <"
2515 << GetTypeOfQuantity(typ) <<
"> not available in file."
2518 CloseRootFile(file_name);
2536 TestArrayDimH1(
"ReadAverageLowFrequencyNoise",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
2538 TVectorD vec(VecDim);
2539 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2542 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2543 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2545 Bool_t ok_open = kFALSE;
2546 Bool_t ok_read = kFALSE;
2548 TString FileNameLong = fCnaWrite->GetRootFileName();
2549 Bool_t allowed_to_read = kFALSE;
2557 if( FileNameLong == fCurrentlyOpenFileName )
2559 allowed_to_read = kTRUE;
2563 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2564 ok_open = OpenRootFile(file_name,
"READ");
2568 allowed_to_read = kTRUE;
2572 cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2573 << file_name << fTTBELL << endl;
2574 allowed_to_read = kFALSE;
2579 if( allowed_to_read == kTRUE )
2584 if ( ok_read == kTRUE )
2587 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2594 fDataExist = kFALSE;
2595 cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> "
2596 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2597 <<
" -> quantity: <"
2598 << GetTypeOfQuantity(typ) <<
"> not available in file."
2601 CloseRootFile(file_name);
2619 TestArrayDimH1(
"ReadAverageHighFrequencyNoise",
"fEcal->MaxStinEcnaInStex()", fEcal->MaxStinEcnaInStex(), VecDim);
2621 TVectorD vec(VecDim);
2622 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2625 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2626 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2628 Bool_t ok_open = kFALSE;
2629 Bool_t ok_read = kFALSE;
2631 TString FileNameLong = fCnaWrite->GetRootFileName();
2632 Bool_t allowed_to_read = kFALSE;
2640 if( FileNameLong == fCurrentlyOpenFileName )
2642 allowed_to_read = kTRUE;
2646 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2647 ok_open = OpenRootFile(file_name,
"READ");
2651 allowed_to_read = kTRUE;
2655 cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2656 << file_name << fTTBELL << endl;
2657 allowed_to_read = kFALSE;
2662 if( allowed_to_read == kTRUE )
2667 if ( ok_read == kTRUE )
2670 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2677 fDataExist = kFALSE;
2678 cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> "
2679 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2680 <<
" -> quantity: <"
2681 << GetTypeOfQuantity(typ) <<
"> not available in file."
2684 CloseRootFile(file_name);
2702 TestArrayDimH1(
"ReadAverageMeanCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2703 fEcal->MaxStinEcnaInStex(), VecDim);
2705 TVectorD vec(VecDim);
2706 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2709 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2710 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2712 Bool_t ok_open = kFALSE;
2713 Bool_t ok_read = kFALSE;
2715 TString FileNameLong = fCnaWrite->GetRootFileName();
2716 Bool_t allowed_to_read = kFALSE;
2724 if( FileNameLong == fCurrentlyOpenFileName )
2726 allowed_to_read = kTRUE;
2730 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2731 ok_open = OpenRootFile(file_name,
"READ");
2735 allowed_to_read = kTRUE;
2739 cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2740 << file_name << fTTBELL << endl;
2741 allowed_to_read = kFALSE;
2746 if( allowed_to_read == kTRUE )
2751 if ( ok_read == kTRUE )
2754 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2761 fDataExist = kFALSE;
2762 cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> "
2763 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2764 <<
" -> quantity: <"
2765 << GetTypeOfQuantity(typ) <<
"> not available in file."
2768 CloseRootFile(file_name);
2786 TestArrayDimH1(
"ReadAverageSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2787 fEcal->MaxStinEcnaInStex(), VecDim);
2789 TVectorD vec(VecDim);
2790 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2793 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2794 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2796 Bool_t ok_open = kFALSE;
2797 Bool_t ok_read = kFALSE;
2799 TString FileNameLong = fCnaWrite->GetRootFileName();
2800 Bool_t allowed_to_read = kFALSE;
2808 if( FileNameLong == fCurrentlyOpenFileName )
2810 allowed_to_read = kTRUE;
2814 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2815 ok_open = OpenRootFile(file_name,
"READ");
2819 allowed_to_read = kTRUE;
2823 cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2824 << file_name << fTTBELL << endl;
2825 allowed_to_read = kFALSE;
2830 if( allowed_to_read == kTRUE )
2835 if ( ok_read == kTRUE )
2838 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2845 fDataExist = kFALSE;
2846 cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2847 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2848 <<
" -> quantity: <"
2849 << GetTypeOfQuantity(typ) <<
"> not available in file."
2852 CloseRootFile(file_name);
2869 const Int_t& MatDim)
2876 TestArrayDimH2(
"ReadCovariancesBetweenSamples",
"fFileHeader->fNbOfSamples", fFileHeader->fNbOfSamples, MatDim);
2878 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
2880 TMatrixD mat(MatDim, MatDim);
2881 for(Int_t
i=0;
i-MatDim<0;
i++)
2882 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
2886 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2887 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2889 Bool_t ok_open = kFALSE;
2890 Bool_t ok_read = kFALSE;
2892 TString FileNameLong = fCnaWrite->GetRootFileName();
2893 Bool_t allowed_to_read = kFALSE;
2901 if( FileNameLong == fCurrentlyOpenFileName )
2903 allowed_to_read = kTRUE;
2907 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2908 ok_open = OpenRootFile(file_name,
"READ");
2912 allowed_to_read = kTRUE;
2916 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2917 << file_name << fTTBELL << endl;
2918 allowed_to_read = kFALSE;
2923 if( allowed_to_read == kTRUE )
2927 if ( ok_read == kTRUE )
2930 for( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++ )
2932 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++)
2940 fDataExist = kFALSE;
2941 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> "
2942 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
2943 <<
" -> quantity: <"
2944 << GetTypeOfQuantity(typ) <<
"> not available in file."
2947 CloseRootFile(file_name);
2958 const Int_t& MatDim)
2965 TestArrayDimH2(
"ReadCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples", fFileHeader->fNbOfSamples, MatDim);
2967 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
2968 TMatrixD mat(MatDim, MatDim);
2969 for(Int_t
i=0;
i- MatDim <0;
i++)
2970 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
2973 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
2974 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
2976 Bool_t ok_open = kFALSE;
2977 Bool_t ok_read = kFALSE;
2979 TString FileNameLong = fCnaWrite->GetRootFileName();
2980 Bool_t allowed_to_read = kFALSE;
2988 if( FileNameLong == fCurrentlyOpenFileName )
2990 allowed_to_read = kTRUE;
2994 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
2995 ok_open = OpenRootFile(file_name,
"READ");
2999 allowed_to_read = kTRUE;
3003 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
3004 << file_name << fTTBELL << endl;
3005 allowed_to_read = kFALSE;
3010 if( allowed_to_read == kTRUE )
3014 if ( ok_read == kTRUE )
3017 for ( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++){
3018 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++){
3023 fDataExist = kFALSE;
3024 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> "
3025 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3026 <<
" -> quantity: <"
3027 << GetTypeOfQuantity(typ) <<
"> not available in file."
3030 CloseRootFile(file_name);
3040 const Int_t & InPutMatDim )
3049 TestArrayDimH2(
"ReadRelevantCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples",
3050 fFileHeader->fNbOfSamples, InPutMatDim);
3052 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStin, i0StinEcha);
3053 Int_t nb_of_relevant = InPutMatDim*(InPutMatDim-1)/2;
3054 TVectorD vec_rel(nb_of_relevant);
for(Int_t
i=0;
i<nb_of_relevant;
i++){vec_rel(
i)=(Double_t)0.;}
3056 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3057 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3059 Bool_t ok_open = kFALSE;
3060 Bool_t ok_read = kFALSE;
3062 TString FileNameLong = fCnaWrite->GetRootFileName();
3063 Bool_t allowed_to_read = kFALSE;
3071 if( FileNameLong == fCurrentlyOpenFileName )
3073 allowed_to_read = kTRUE;
3077 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3078 ok_open = OpenRootFile(file_name,
"READ");
3082 allowed_to_read = kTRUE;
3086 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
3087 << file_name << fTTBELL << endl;
3088 allowed_to_read = kFALSE;
3093 if( allowed_to_read == kTRUE )
3097 if ( ok_read == kTRUE )
3101 for ( Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++){
3102 for ( Int_t j_samp = 0; j_samp < i_samp; j_samp++){
3108 fDataExist = kFALSE;
3109 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> "
3110 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3111 <<
" -> quantity: <"
3112 << GetTypeOfQuantity(typ) <<
"> not available in file."
3115 CloseRootFile(file_name);
3127 const Int_t& n1StexStin_b,
3128 const Int_t& MatDim)
3135 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3136 fEcal->MaxCrysInStin(), MatDim);
3138 Int_t index_Stin_a = GetStinIndex(n1StexStin_a);
3139 Int_t index_Stin_b = GetStinIndex(n1StexStin_b);
3141 TMatrixD mat(MatDim, MatDim);
3142 for(Int_t
i=0;
i-MatDim<0;
i++)
3143 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3147 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3148 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3150 Bool_t ok_open = kFALSE;
3151 Bool_t ok_read = kFALSE;
3153 TString FileNameLong = fCnaWrite->GetRootFileName();
3154 Bool_t allowed_to_read = kFALSE;
3162 if( FileNameLong == fCurrentlyOpenFileName )
3164 allowed_to_read = kTRUE;
3168 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3169 ok_open = OpenRootFile(file_name,
"READ");
3173 allowed_to_read = kTRUE;
3177 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3178 << file_name << fTTBELL << endl;
3179 allowed_to_read = kFALSE;
3184 if( allowed_to_read == kTRUE )
3189 if ( ok_read == kTRUE )
3192 for ( Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++)
3194 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3195 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3197 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3204 fDataExist = kFALSE;
3205 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
3206 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3207 <<
" -> quantity: <"
3208 << GetTypeOfQuantity(typ) <<
"> not available in file."
3211 CloseRootFile(file_name);
3223 const Int_t & n1StexStin_b,
3224 const Int_t& MatDim)
3231 TestArrayDimH2(
"ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()", fEcal->MaxCrysInStin(), MatDim);
3233 Int_t index_Stin_a = GetStinIndex(n1StexStin_a);
3234 Int_t index_Stin_b = GetStinIndex(n1StexStin_b);
3236 TMatrixD mat(MatDim, MatDim);
3237 for(Int_t
i=0;
i-MatDim<0;
i++)
3238 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3242 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3243 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3245 Bool_t ok_open = kFALSE;
3246 Bool_t ok_read = kFALSE;
3248 TString FileNameLong = fCnaWrite->GetRootFileName();
3249 Bool_t allowed_to_read = kFALSE;
3257 if( FileNameLong == fCurrentlyOpenFileName )
3259 allowed_to_read = kTRUE;
3263 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3264 ok_open = OpenRootFile(file_name,
"READ");
3268 allowed_to_read = kTRUE;
3272 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3273 << file_name << fTTBELL << endl;
3274 allowed_to_read = kFALSE;
3279 if( allowed_to_read == kTRUE )
3285 if ( ok_read == kTRUE )
3288 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3290 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3291 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3293 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3300 fDataExist = kFALSE;
3301 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
3302 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3303 <<
" -> quantity: <"
3304 << GetTypeOfQuantity(typ) <<
"> not available in file."
3307 CloseRootFile(file_name);
3319 const Int_t & n1StexStin_b,
3320 const Int_t& MatDim)
3327 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3328 fEcal->MaxCrysInStin(), MatDim);
3330 Int_t index_Stin_a = GetStinIndex(n1StexStin_a);
3331 Int_t index_Stin_b = GetStinIndex(n1StexStin_b);
3333 TMatrixD mat(MatDim, MatDim);
3334 for(Int_t
i=0;
i-MatDim<0;
i++)
3335 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3339 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3340 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3342 Bool_t ok_open = kFALSE;
3343 Bool_t ok_read = kFALSE;
3345 TString FileNameLong = fCnaWrite->GetRootFileName();
3346 Bool_t allowed_to_read = kFALSE;
3354 if( FileNameLong == fCurrentlyOpenFileName )
3356 allowed_to_read = kTRUE;
3360 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3361 ok_open = OpenRootFile(file_name,
"READ");
3365 allowed_to_read = kTRUE;
3369 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3370 << file_name << fTTBELL << endl;
3371 allowed_to_read = kFALSE;
3376 if( allowed_to_read == kTRUE )
3381 if ( ok_read == kTRUE )
3384 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3386 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3387 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3389 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3396 fDataExist = kFALSE;
3397 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
3398 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3399 <<
" -> quantity: <"
3400 << GetTypeOfQuantity(typ) <<
"> not available in file."
3403 CloseRootFile(file_name);
3415 const Int_t & n1StexStin_b,
3416 const Int_t& MatDim)
3423 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
3424 fEcal->MaxCrysInStin(), MatDim);
3426 Int_t index_Stin_a = GetStinIndex(n1StexStin_a);
3427 Int_t index_Stin_b = GetStinIndex(n1StexStin_b);
3429 TMatrixD mat(MatDim, MatDim);
3430 for(Int_t
i=0;
i-MatDim<0;
i++)
3431 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3435 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3436 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3438 Bool_t ok_open = kFALSE;
3439 Bool_t ok_read = kFALSE;
3441 TString FileNameLong = fCnaWrite->GetRootFileName();
3442 Bool_t allowed_to_read = kFALSE;
3450 if( FileNameLong == fCurrentlyOpenFileName )
3452 allowed_to_read = kTRUE;
3456 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3457 ok_open = OpenRootFile(file_name,
"READ");
3461 allowed_to_read = kTRUE;
3465 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3466 << file_name << fTTBELL << endl;
3467 allowed_to_read = kFALSE;
3472 if( allowed_to_read == kTRUE )
3478 if ( ok_read == kTRUE )
3481 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3483 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3484 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3486 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3493 fDataExist = kFALSE;
3494 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
3495 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3496 <<
" -> quantity: <"
3497 << GetTypeOfQuantity(typ) <<
"> not available in file."
3500 CloseRootFile(file_name);
3518 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3519 fEcal->MaxCrysEcnaInStex(), MatDim);
3522 TMatrixD mat(MatDim, MatDim);
3523 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3525 TVectorD vec(fEcal->MaxStinEcnaInStex());
3526 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
3527 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
3531 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3532 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3534 Bool_t ok_open = kFALSE;
3535 Bool_t ok_read = kFALSE;
3537 TString FileNameLong = fCnaWrite->GetRootFileName();
3538 Bool_t allowed_to_read = kFALSE;
3546 if( FileNameLong == fCurrentlyOpenFileName )
3548 allowed_to_read = kTRUE;
3552 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3553 ok_open = OpenRootFile(file_name,
"READ");
3557 allowed_to_read = kTRUE;
3561 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3562 << file_name << fTTBELL << endl;
3563 allowed_to_read = kFALSE;
3568 if( allowed_to_read == kTRUE )
3573 if ( ok_read == kTRUE )
3576 for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
3578 if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
3580 for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
3582 if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
3584 for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
3586 Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
3587 Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() +i_crys;
3588 for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
3590 Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
3591 Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() +j_crys;
3592 mat(i_chan_sm, j_chan_sm) =
3603 fDataExist = kFALSE;
3604 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> "
3605 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3606 <<
" -> quantity: <"
3607 << GetTypeOfQuantity(typ) <<
"> not available in file."
3610 CloseRootFile(file_name);
3628 TestArrayDimH2(
"ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3629 fEcal->MaxCrysEcnaInStex(), MatDim);
3632 TMatrixD mat(MatDim, MatDim);
3633 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3635 TVectorD vec(fEcal->MaxStinEcnaInStex());
3636 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
3637 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
3641 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3642 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3644 Bool_t ok_open = kFALSE;
3645 Bool_t ok_read = kFALSE;
3647 TString FileNameLong = fCnaWrite->GetRootFileName();
3648 Bool_t allowed_to_read = kFALSE;
3656 if( FileNameLong == fCurrentlyOpenFileName )
3658 allowed_to_read = kTRUE;
3662 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3663 ok_open = OpenRootFile(file_name,
"READ");
3667 allowed_to_read = kTRUE;
3671 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3672 << file_name << fTTBELL << endl;
3673 allowed_to_read = kFALSE;
3678 if( allowed_to_read == kTRUE )
3683 if ( ok_read == kTRUE )
3686 for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
3688 if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
3690 for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
3692 if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
3694 for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
3696 Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
3697 Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() + i_crys;
3698 for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
3700 Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
3701 Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() + j_crys;
3702 mat(i_chan_sm, j_chan_sm) =
3713 fDataExist = kFALSE;
3714 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
3715 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3716 <<
" -> quantity: <"
3717 << GetTypeOfQuantity(typ) <<
"> not available in file."
3720 CloseRootFile(file_name);
3738 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3739 fEcal->MaxCrysEcnaInStex(), MatDim);
3742 TMatrixD mat(MatDim, MatDim);
3743 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3745 TVectorD vec(fEcal->MaxStinEcnaInStex());
3746 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
3747 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
3751 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3752 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3754 Bool_t ok_open = kFALSE;
3755 Bool_t ok_read = kFALSE;
3757 TString FileNameLong = fCnaWrite->GetRootFileName();
3758 Bool_t allowed_to_read = kFALSE;
3766 if( FileNameLong == fCurrentlyOpenFileName )
3768 allowed_to_read = kTRUE;
3772 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3773 ok_open = OpenRootFile(file_name,
"READ");
3777 allowed_to_read = kTRUE;
3781 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3782 << file_name << fTTBELL << endl;
3783 allowed_to_read = kFALSE;
3788 if( allowed_to_read == kTRUE )
3793 if ( ok_read == kTRUE )
3796 for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
3798 if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
3800 for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
3802 if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
3804 for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
3806 Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
3807 Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() +i_crys;
3808 for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
3810 Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
3811 Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() +j_crys;
3812 mat(i_chan_sm, j_chan_sm) =
3823 fDataExist = kFALSE;
3824 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> "
3825 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3826 <<
" -> quantity: <"
3827 << GetTypeOfQuantity(typ) <<
"> not available in file."
3830 CloseRootFile(file_name);
3848 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3849 fEcal->MaxCrysEcnaInStex(), MatDim);
3852 TMatrixD mat(MatDim, MatDim);
3853 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3855 TVectorD vec(fEcal->MaxStinEcnaInStex());
3856 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
3857 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
3861 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3862 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3864 Bool_t ok_open = kFALSE;
3865 Bool_t ok_read = kFALSE;
3867 TString FileNameLong = fCnaWrite->GetRootFileName();
3868 Bool_t allowed_to_read = kFALSE;
3876 if( FileNameLong == fCurrentlyOpenFileName )
3878 allowed_to_read = kTRUE;
3882 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3883 ok_open = OpenRootFile(file_name,
"READ");
3887 allowed_to_read = kTRUE;
3891 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3892 << file_name << fTTBELL << endl;
3893 allowed_to_read = kFALSE;
3898 if( allowed_to_read == kTRUE )
3903 if ( ok_read == kTRUE )
3906 for (Int_t index_Stin_a = 0; index_Stin_a < fEcal->MaxStinEcnaInStex(); index_Stin_a++)
3908 if ( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= fEcal->MaxStinEcnaInStex())
3910 for (Int_t index_Stin_b = 0; index_Stin_b < fEcal->MaxStinEcnaInStex(); index_Stin_b++)
3912 if ( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= fEcal->MaxStinEcnaInStex())
3914 for ( Int_t i_crys = 0; i_crys < fEcal->MaxCrysInStin(); i_crys++)
3916 Int_t i_cna_chan = index_Stin_a*fEcal->MaxCrysInStin() + i_crys;
3917 Int_t i_chan_sm = (Int_t)(vec(index_Stin_a)-1)*fEcal->MaxCrysInStin() + i_crys;
3918 for ( Int_t j_crys = 0; j_crys < fEcal->MaxCrysInStin(); j_crys++)
3920 Int_t j_cna_chan = index_Stin_b*fEcal->MaxCrysInStin() + j_crys;
3921 Int_t j_chan_sm = (Int_t)(vec(index_Stin_b)-1)*fEcal->MaxCrysInStin() + j_crys;
3922 mat(i_chan_sm, j_chan_sm) =
3933 fDataExist = kFALSE;
3934 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
3935 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
3936 <<
" -> quantity: <"
3937 << GetTypeOfQuantity(typ) <<
"> not available in file."
3940 CloseRootFile(file_name);
3959 TestArrayDimH2(
"ReadLowFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
3960 fEcal->MaxStinEcnaInStex(), MatDim);
3962 TMatrixD mat(MatDim, MatDim);
3963 for(Int_t
i=0;
i-MatDim<0;
i++)
3964 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3966 TVectorD vec(fEcal->MaxStinEcnaInStex());
3967 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
3968 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
3972 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3973 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
3975 Bool_t ok_open = kFALSE;
3976 Bool_t ok_read = kFALSE;
3978 TString FileNameLong = fCnaWrite->GetRootFileName();
3979 Bool_t allowed_to_read = kFALSE;
3987 if( FileNameLong == fCurrentlyOpenFileName )
3989 allowed_to_read = kTRUE;
3993 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
3994 ok_open = OpenRootFile(file_name,
"READ");
3998 allowed_to_read = kTRUE;
4002 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: "
4003 << file_name << fTTBELL << endl;
4004 allowed_to_read = kFALSE;
4009 if( allowed_to_read == kTRUE )
4014 if( ok_read == kTRUE )
4017 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++)
4019 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++)
4021 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4023 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4025 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4026 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4027 mat((Int_t)vec_ia_m, vec_ib_m) =
4036 fDataExist = kFALSE;
4037 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
4038 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
4039 <<
" -> quantity: <"
4040 << GetTypeOfQuantity(typ) <<
"> not available in file."
4043 CloseRootFile(file_name);
4061 TestArrayDimH2(
"ReadHighFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
4062 fEcal->MaxStinEcnaInStex(), MatDim);
4064 TMatrixD mat(MatDim, MatDim);
4065 for(Int_t
i=0;
i-MatDim<0;
i++)
4066 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
4068 TVectorD vec(fEcal->MaxStinEcnaInStex());
4069 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
4070 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
4074 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
4075 const Text_t *current_file_name = (
const Text_t *)fCurrentlyOpenFileName.Data();
4077 Bool_t ok_open = kFALSE;
4078 Bool_t ok_read = kFALSE;
4080 TString FileNameLong = fCnaWrite->GetRootFileName();
4081 Bool_t allowed_to_read = kFALSE;
4089 if( FileNameLong == fCurrentlyOpenFileName )
4091 allowed_to_read = kTRUE;
4095 if( fCurrentlyOpenFileName != fFlagNoFileOpen ){CloseRootFile(current_file_name);}
4096 ok_open = OpenRootFile(file_name,
"READ");
4100 allowed_to_read = kTRUE;
4104 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: "
4105 << file_name << fTTBELL << endl;
4106 allowed_to_read = kFALSE;
4111 if( allowed_to_read == kTRUE )
4116 if( ok_read == kTRUE )
4119 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim<0; index_Stin_a++)
4121 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim<0; index_Stin_b++)
4123 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4125 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4127 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4128 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4129 mat((Int_t)vec_ia_m, (Int_t)vec_ib_m) =
4138 fDataExist = kFALSE;
4139 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
4140 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
4141 <<
" -> quantity: <"
4142 << GetTypeOfQuantity(typ) <<
"> not available in file."
4145 CloseRootFile(file_name);
4170 if(fT3d_AdcValues == 0)
4173 fT3d_AdcValues =
new Double_t**[DimX]; fCnew++;
4174 fT3d2_AdcValues =
new Double_t*[DimX*DimY]; fCnew++;
4175 fT3d1_AdcValues =
new Double_t[DimX*DimY*DimZ]; fCnew++;
4177 for(Int_t i0StexEcha = 0 ; i0StexEcha < DimX ; i0StexEcha++){
4178 fT3d_AdcValues[i0StexEcha] = &fT3d2_AdcValues[0] + i0StexEcha*DimY;
4179 for(Int_t j_samp = 0 ; j_samp < DimY ; j_samp++){
4180 fT3d2_AdcValues[DimY*i0StexEcha + j_samp] = &fT3d1_AdcValues[0]+
4181 DimZ*(DimY*i0StexEcha+j_samp);}}
4185 for (Int_t iza=0; iza<DimX; iza++)
4187 for (Int_t izb=0; izb<DimY; izb++)
4189 for (Int_t izc=0; izc<DimZ; izc++)
4191 if( fT3d_AdcValues[iza][izb][izc] != (Double_t)0 )
4193 fT3d_AdcValues[iza][izb][izc] = (Double_t)0;
4202 const Text_t *
file_name = (
const Text_t *)fCnaWrite->fRootFileNameShort.Data();
4204 Bool_t ok_open = kFALSE;
4205 Bool_t ok_read = kFALSE;
4208 Int_t i_entry_fail = 0;
4210 ok_open = OpenRootFile(file_name,
"READ");
4212 if( ok_open == kTRUE )
4214 for(Int_t i0StexEcha=0; i0StexEcha<DimX; i0StexEcha++)
4216 if( i0StexEcha == 0 )
4219 if( i_entry >= 0 ){ok_read = kTRUE;}
4225 if ( ok_read == kTRUE )
4230 for ( Int_t i_bin=0; i_bin<DimZ; i_bin++)
4232 fT3d_AdcValues[i0StexEcha][
sample][i_bin]
4239 fDataExist = kFALSE;
4240 cout <<
"!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> "
4241 << fCnaWrite->fRootFileNameShort.Data() <<
": .root file failed" << endl
4242 <<
" -> quantity: <"
4243 << GetTypeOfQuantity(typ) <<
"> not available in file."
4252 CloseRootFile(file_name);
4256 cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> "
4257 <<
" ROOT file not found" << fTTBELL << endl;
4260 if(i_entry_fail > 0 )
4262 cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> "
4263 <<
" Entry reading failure(s). i_entry_fail = "
4264 << i_entry_fail << fTTBELL << endl;
4266 return fT3d_AdcValues;
4279 Int_t xFapNbOfEvts = 0;
4281 TVectorD NOFE_histp(fEcal->MaxCrysEcnaInStex());
4282 for(Int_t
i=0;
i<fEcal->MaxCrysEcnaInStex();
i++){NOFE_histp(
i)=(Double_t)0.;}
4283 NOFE_histp = ReadNumberOfEvents(fEcal->MaxCrysEcnaInStex());
4287 Int_t* NOFE_int =
new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
4288 for(Int_t
i=0;
i<fEcal->MaxCrysEcnaInStex();
i++){NOFE_int[
i]=(Int_t)NOFE_histp(
i);}
4291 fCnaWrite->NumberOfEventsAnalysis(NOFE_int, fEcal->MaxCrysEcnaInStex(), xFapNbOfReqEvts, xStexNumber);
4293 delete [] NOFE_int; NOFE_int = 0; fCdelete++;
4295 return xFapNbOfEvts;
4305 TString quantity_name =
"?";
4309 if( fFlagSubDet ==
"EB" ){quantity_name =
"SM numbers";}
4310 if( fFlagSubDet ==
"EE" ){quantity_name =
"Dee numbers";}
4312 if( arg_typ ==
cTypMSp ){quantity_name =
"Mean samples";}
4313 if( arg_typ ==
cTypSSp ){quantity_name =
"Sigma of samples";}
4315 if( arg_typ ==
cTypNbOfEvts ){quantity_name =
"Number of events";}
4316 if( arg_typ ==
cTypPed ){quantity_name =
"Pedestals";}
4317 if( arg_typ ==
cTypTno ){quantity_name =
"Total noise";}
4318 if( arg_typ ==
cTypLfn ){quantity_name =
"LF noise";}
4319 if( arg_typ ==
cTypHfn ){quantity_name =
"HF noise";}
4320 if( arg_typ ==
cTypMeanCorss){quantity_name =
"Mean cor(s,s')";}
4321 if( arg_typ ==
cTypSigCorss ){quantity_name =
"Sigma of cor(s,s')";}
4323 if( arg_typ ==
cTypAvPed ){quantity_name =
"Average pedestals";}
4324 if( arg_typ ==
cTypAvTno ){quantity_name =
"Average total noise";}
4325 if( arg_typ ==
cTypAvLfn ){quantity_name =
"Average LF noise";}
4326 if( arg_typ ==
cTypAvHfn ){quantity_name =
"Average HF noise";}
4327 if( arg_typ ==
cTypAvMeanCorss){quantity_name =
"Average mean cor(s,s')";}
4328 if( arg_typ ==
cTypAvSigCorss ){quantity_name =
"Average sigma of cor(s,s')";}
4330 if( arg_typ ==
cTypAdcEvt ){quantity_name =
"Sample ADC a.f.o event number";}
4332 if( arg_typ ==
cTypCovCss ){quantity_name =
"Cov(s,s')";}
4333 if( arg_typ ==
cTypCorCss ){quantity_name =
"Cor(s,s')";}
4334 if( arg_typ ==
cTypLfCov ){quantity_name =
"LF Cov(c,c')";}
4335 if( arg_typ ==
cTypLfCor ){quantity_name =
"LF Cor(c,c')";}
4336 if( arg_typ ==
cTypHfCov ){quantity_name =
"HF Cov(c,c')";}
4337 if( arg_typ ==
cTypHfCor ){quantity_name =
"HF Cor(c,c')";}
4339 if( fFlagSubDet ==
"EB" )
4341 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";}
4342 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";}
4344 if( fFlagSubDet ==
"EE" )
4346 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";}
4347 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";}
4349 return quantity_name;
4371 TVectorD vec(fEcal->MaxStinEcnaInStex());
4372 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
4373 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
4374 number = (Int_t)vec(i0StexStinEcna);
4390 if(fFlagPrint == fCodePrintAllComments){
4391 cout <<
"*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = "
4392 << fEcal->MaxStinEcnaInStex() << endl
4393 <<
" n1StexStin = " << n1StexStin
4396 Int_t Stin_index = n1StexStin-1;
4400 Int_t Stin_index = -1;
4401 TVectorD vec(fEcal->MaxStinEcnaInStex());
4402 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
4403 vec = ReadStinNumbers(fEcal->MaxStinEcnaInStex());
4407 for(Int_t
i=0;
i < fEcal->MaxStinEcnaInStex();
i++)
4409 if(fFlagPrint == fCodePrintAllComments){
4410 cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = "
4412 if ( vec[
i] == n1StexStin ){Stin_index =
i;}
4415 if(fFlagPrint == fCodePrintAllComments){
4416 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;
4417 cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << endl
4418 <<
" Stin index : " << Stin_index << endl;
4419 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;}
4421 if ( Stin_index < 0 )
4423 if(fFlagPrint == fCodePrintAllComments){
4424 cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : "
4425 <<
"index Stin not found"
4426 << fTTBELL << endl;}
4443 fFlagPrint = fCodePrintComments;
4444 cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << endl;
4451 fFlagPrint = fCodePrintWarnings;
4452 cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << endl;
4459 fFlagPrint = fCodePrintAllComments;
4460 cout <<
"*TEcnaRead::PrintAllComments()> All the comments will be printed" << endl;
4467 fFlagPrint = fCodePrintNoComment;
TEcnaResultType * fCnaIndivResult
Bool_t OpenR(const Text_t *="")
void TestArrayDimH1(const TString &, const TString &, const Int_t &, const Int_t &)
TVectorD ReadLowFrequencyNoise(const Int_t &)
TVectorD ReadAverageHighFrequencyNoise(const Int_t &)
Int_t GetLastReqEvtNumber()
TEcnaRead & operator=(const TEcnaRead &)
TMatrixD ReadCovariancesBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TVectorD Read1DHisto(const Int_t &, const TString &, const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSampleAdcValues(const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Int_t GetNumberOfEvents(const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Int_t GetStinIndex(const Int_t &)
TVectorD ReadSigmaOfCorrelationsBetweenSamples(const Int_t &)
TString GetRootFileNameShort()
TVectorD ReadAverageNumberOfEvents(const Int_t &)
Int_t fCodePrintAllComments
TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TMatrixD ReadMatrix(const Int_t &, const TString &, const TString &, const Int_t &, const Int_t &)
R__EXTERN TEcnaRootFile * gCnaRootFile
void Adelete(const TString &)
Int_t GetNumberOfBinsSampleAsFunctionOfTime()
TVectorD ReadRelevantCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
Bool_t RegisterPointer(const TString &, const Long_t &)
TMatrixD ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TVectorD ReadAverageTotalNoise(const Int_t &)
TString GetTypeOfQuantity(const CnaResultTyp)
Int_t GetFirstReqEvtNumber()
Bool_t ReadRootFileHeader(const Int_t &)
Int_t fCodePrintNoComment
void SetEcalSubDetector(const TString &)
TVectorD ReadStinNumbers(const Int_t &)
TVectorD ReadSampleSigmas(const Int_t &, const Int_t &, const Int_t &)
Int_t GetStexStinFromIndex(const Int_t &)
TVectorD ReadTotalNoise(const Int_t &)
TVectorD ReadAveragePedestals(const Int_t &)
TVectorD ReadPedestals(const Int_t &)
TString GetRootFileName()
TMatrixD ReadLowFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
void fCopy(const TEcnaRead &)
TString GetAnalysisName()
TEcnaHeader * fFileHeader
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
void Anew(const TString &)
TVectorD ReadHighFrequencyNoise(const Int_t &)
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Double_t *** ReadSampleAdcValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAverageLowFrequencyNoise(const Int_t &)
void FileParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString &)
TString GetTechReadCode(const TString &, const TString &)
Bool_t OpenRootFile(const Text_t *, const TString &)
Int_t ReadElementNextEntryNumber(CnaResultTyp, Int_t)
TMatrixD ReadCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadMeanCorrelationsBetweenSamples(const Int_t &)
void ReStart(const Text_t *)
TMatrixD ReadHighFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Bool_t ReadElement(Int_t)
Bool_t CloseRootFile(const Text_t *)
Bool_t OpenW(const Text_t *="")
void TestArrayDimH2(const TString &, const TString &, const Int_t &, const Int_t &)
Long_t GetPointerValue(const TString &)
TVectorD ReadSampleMeans(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAverageMeanCorrelationsBetweenSamples(const Int_t &)
TVectorD ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t &)
TVectorD ReadNumberOfEvents(const Int_t &)