29 Long_t i_this = (Long_t)
this;
36 if( iCnaParCout == 0 )
44 if( iCnaParPaths == 0 )
51 Long_t iEcalNumbering = pObjectManager->
GetPointerValue(
"TEcnaNumbering");
52 if( iEcalNumbering == 0 )
59 Long_t iCnaParHistos = pObjectManager->
GetPointerValue(
"TEcnaParHistos");
60 if( iCnaParHistos == 0 )
88 const Text_t *h_name =
"CnaHeader";
89 const Text_t *h_title =
"CnaHeader";
99 if( iFileHeader == 0 )
236 cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> "
237 <<
" It is time to write a copy constructor"
271 cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << endl;}
289 cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = "
299 cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << endl;}
314 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample)
318 if( VecDim == VecDimTest )
320 TVectorD vec(VecDim);
322 TString CallingMethod =
"1D";
325 if( StandardQuantity ==
"Adc" )
327 Int_t i0Sample = n1Sample-1;
332 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
333 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
334 <<
"(StandardQuantity = " << StandardQuantity
335 <<
"). Wrong code, no file reading." <<
fTTBELL << endl;
341 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
342 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
343 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")"
344 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << endl;
352 if( VecDim == VecDimTest )
354 TVectorD vec(VecDim);
356 TString CallingMethod =
"1D";
359 if( StandardQuantity ==
"MSp" || StandardQuantity ==
"SSp" )
361 if( StandardQuantity ==
"MSp" ){vec =
ReadSampleMeans(n1StexStin, VecDim);}
362 if( StandardQuantity ==
"SSp" ){vec =
ReadSampleSigmas(n1StexStin, VecDim);}
366 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
367 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
368 <<
", StandardQuantity = " << StandardQuantity
369 <<
". Wrong code, no file reading." <<
fTTBELL << endl;
375 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
376 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
377 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")"
378 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << endl;
388 Int_t VecDimTest = 1;
393 if( VecDim == VecDimTest )
395 TVectorD vec(VecDim);
397 TString CallingMethod =
"1D";
398 TString StandardQuantity =
"?";
400 TString rTechReadCode =
GetTechReadCode(StandardQuantity, StandardDetector);
402 if( rTechReadCode !=
"?" )
404 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee")
415 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" )
422 TString xStartDate =
"sStartDate";
423 TString xStopDate =
"sStopDate";
427 Int_t n1Stex = i0Stex+1;
440 if( rTechReadCode ==
"MCsStas" )
442 if( rTechReadCode ==
"SCsStas" )
463 if( cStartTime < xStartTime ){xStartTime = cStartTime; xStartDate = cStartDate;}
464 if( cStopTime > xStopTime ){xStopTime = cStopTime; xStopDate = cStopDate;}
471 cout <<
"!TEcnaRead::Read1DHisto(const TString, const TString)> *ERROR* =====> "
472 <<
" ROOT file not found" <<
fTTBELL << endl;
479 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
480 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
481 <<
", UserDetector = " << UserDetector
482 <<
". Wrong code(s). No file reading." <<
fTTBELL << endl;
488 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
489 cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
490 <<
", UserDetector = " << UserDetector <<
", VecDim = " << VecDim
491 <<
". Wrong code(s) or array dimension. No file reading." <<
fTTBELL << endl;
502 const Int_t& nb_arg_1,
const Int_t& nb_arg_2)
504 TMatrixD mat(MatDim, MatDim);
505 TString CallingMethod =
"2D";
506 TString StandardMatrixType =
"?";
507 TString StandardBetweenWhat =
"?";
512 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
514 if( StandardBetweenWhat ==
"Mss" )
516 Int_t n1StexStin = nb_arg_1;
517 Int_t i0StinEcha = nb_arg_2;
519 if( StandardMatrixType ==
"Cov" )
522 if( StandardMatrixType ==
"Cor" )
526 if( StandardBetweenWhat !=
"Mss" )
528 Int_t n1StexStin_a = nb_arg_1;
529 Int_t n1StexStin_b = nb_arg_2;
531 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
534 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
537 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
540 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
546 for(Int_t
i=0;
i-MatDim<0;
i++)
547 {
for(Int_t
j=0;
j-MatDim<0;
j++)
548 {mat(
i,
j) = (double_t)0.;}}
549 cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
550 <<
", UserBetweenWhat = " << UserBetweenWhat
551 <<
". Wrong code(s), no file reading." <<
fTTBELL << endl;
559 TMatrixD mat(MatDim, MatDim);
560 TString CallingMethod =
"2D";
561 TString StandardMatrixType =
"?";
562 TString StandardBetweenWhat =
"?";
567 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
570 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
573 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
576 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
579 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
583 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttLF" )
586 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttHF" )
591 for(Int_t
i=0;
i-MatDim<0;
i++)
592 {
for(Int_t
j=0;
j-MatDim<0;
j++)
593 {mat(
i,
j) = (double_t)0.;}}
594 cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
595 <<
", UserBetweenWhat = " << UserBetweenWhat
596 <<
". Wrong code(s), no file reading." <<
fTTBELL << endl;
604 TString rTechReadCode =
"?";
605 TString dTechDetector =
"?";
607 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee"){dTechDetector =
"Stex";}
608 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" ){dTechDetector =
"Stas";}
610 if( dTechDetector ==
"?")
612 cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = "
613 << dTechDetector <<
", StandardDetector = " << StandardDetector
618 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stex" ){rTechReadCode =
"NOEStex";}
619 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stas" ){rTechReadCode =
"NOEStas";}
620 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stex" ){rTechReadCode =
"PedStex";}
621 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stas" ){rTechReadCode =
"PedStas";}
622 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stex" ){rTechReadCode =
"TNoStex";}
623 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stas" ){rTechReadCode =
"TNoStas";}
624 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"LFNStex";}
625 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"LFNStas";}
626 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"HFNStex";}
627 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"HFNStas";}
628 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"MCsStex";}
629 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"MCsStas";}
630 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"SCsStex";}
631 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"SCsStas";}
634 if( rTechReadCode ==
"?")
636 cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " << rTechReadCode
637 <<
", StandardQuantity = " << StandardQuantity
641 return rTechReadCode;
650 const Int_t& run_number,
const Int_t& nfirst,
651 const Int_t&
nlast,
const Int_t& nreqevts,
652 const Int_t& Stex, TString path_root)
658 TString sTypAna = typ_ana;
659 Int_t nNbOfSamples = nb_of_samples;
660 Int_t nRunNumber = run_number;
661 Int_t nFirstEvt = nfirst;
662 Int_t nLastEvt =
nlast;
663 Int_t nReqNbOfEvts = nreqevts;
664 Int_t nStexNumber = Stex;
667 const Text_t *h_name =
"CnaHeader";
668 const Text_t *h_title =
"CnaHeader";
687 nFirstEvt, nLastEvt, nReqNbOfEvts, nStexNumber);
711 cout <<
"*TEcnaRead::FileParameters(...)>" << endl
712 <<
" The method has been called with the following argument values:" << endl
713 <<
" Analysis name = "
715 <<
" Nb of required samples = "
719 <<
" First requested event number = "
721 <<
" Last requested event number = "
723 <<
" Requested number of events = "
727 <<
" Path for the ROOT file = "
760 TString cType =
"run type not defined";
764 if( numtype == 0 ){cType =
"COSMICS";}
765 if( numtype == 1 ){cType =
"BEAMH4";}
766 if( numtype == 2 ){cType =
"BEAMH2";}
767 if( numtype == 3 ){cType =
"MTCC";}
768 if( numtype == 4 ){cType =
"LASER_STD";}
769 if( numtype == 5 ){cType =
"LASER_POWER_SCAN";}
770 if( numtype == 6 ){cType =
"LASER_DELAY_SCAN";}
771 if( numtype == 7 ){cType =
"TESTPULSE_SCAN_MEM";}
772 if( numtype == 8 ){cType =
"TESTPULSE_MGPA";}
773 if( numtype == 9 ){cType =
"PEDESTAL_STD";}
774 if( numtype == 10 ){cType =
"PEDESTAL_OFFSET_SCAN";}
775 if( numtype == 11 ){cType =
"PEDESTAL_25NS_SCAN";}
776 if( numtype == 12 ){cType =
"LED_STD";}
778 if( numtype == 13 ){cType =
"PHYSICS_GLOBAL";}
779 if( numtype == 14 ){cType =
"COSMICS_GLOBAL";}
780 if( numtype == 15 ){cType =
"HALO_GLOBAL";}
782 if( numtype == 16 ){cType =
"LASER_GAP";}
783 if( numtype == 17 ){cType =
"TESTPULSE_GAP";}
784 if( numtype == 18 ){cType =
"PEDESTAL_GAP";}
785 if( numtype == 19 ){cType =
"LED_GAP";}
787 if( numtype == 20 ){cType =
"PHYSICS_LOCAL";}
788 if( numtype == 21 ){cType =
"COSMICS_LOCAL";}
789 if( numtype == 22 ){cType =
"HALO_LOCAL";}
790 if( numtype == 23 ){cType =
"CALIB_LOCAL";}
792 if( numtype == 24 ){cType =
"PEDSIM";}
810 Bool_t ok_open = kFALSE;
832 if( iCnaRootFile == 0 )
846 if ( ok_open == kFALSE )
848 cout <<
"!TEcnaRead::OpenRootFile> " << s_name.Data() <<
": file not found." << endl;
856 cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() <<
" OK "
878 Bool_t ok_close = kFALSE;
887 TString e_path; e_path.Append(name);
888 cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << endl;}
891 cout <<
"*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " <<
gCnaRootFile
892 <<
", pointer = " << pointer_value << endl;}
903 cout <<
"*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = "
910 cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " <<
fOpenRootFile
928 Bool_t ok_read = kFALSE;
958 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
959 <<
" ROOT file not found " <<
fTTBELL << endl;
965 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
966 <<
" FileParameters not called " <<
fTTBELL << endl;
997 if( i_print == 1 ){
cout <<
"*TEcnaRead::ReadRootFileHeader> file_name = "
1000 Bool_t ok_open = kFALSE;
1001 Bool_t ok_read = kFALSE;
1004 Bool_t allowed_to_read = kFALSE;
1014 allowed_to_read = kTRUE;
1022 allowed_to_read = kTRUE;
1026 cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: "
1027 << file_name <<
fTTBELL << endl;
1028 allowed_to_read = kFALSE;
1032 if( allowed_to_read == kTRUE )
1080 const Int_t& MaxValue,
const Int_t& VecDim)
1084 if( MaxValue != VecDim)
1086 cout <<
"!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1087 <<
", MaxName: " << MaxName.Data()
1088 <<
", Maxvalue = " << MaxValue
1089 <<
", VecDim = " << VecDim <<
fTTBELL << endl;
1095 cout <<
"!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1096 <<
", MaxName: " << MaxName.Data()
1097 <<
", Maxvalue = " << MaxValue
1098 <<
", VecDim = " << VecDim << endl;
1104 const Int_t& MaxValue,
const Int_t& MatDim)
1108 if( MaxValue != MatDim)
1110 cout <<
"!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1111 <<
", MaxName: " << MaxName.Data()
1112 <<
", Maxvalue = " << MaxValue
1113 <<
", MatDim = " << MatDim <<
fTTBELL << endl;
1119 cout <<
"!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1120 <<
", MaxName: " << MaxName.Data()
1121 <<
", Maxvalue = " << MaxValue
1122 <<
", MatDim = " << MatDim << endl;
1141 TVectorD vec(VecDim);
1145 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1156 Bool_t ok_open = kFALSE;
1157 Bool_t ok_read = kFALSE;
1160 Bool_t allowed_to_read = kFALSE;
1170 allowed_to_read = kTRUE;
1179 allowed_to_read = kTRUE;
1183 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: "
1184 << file_name <<
fTTBELL << endl;
1185 allowed_to_read = kFALSE;
1190 if( allowed_to_read == kTRUE )
1195 if( ok_read == kTRUE )
1199 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1209 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> "
1211 <<
" -> quantity: <"
1218 if( ok_read == kTRUE )
1223 for(Int_t
i=0;
i < VecDim;
i++)
1225 cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = "
1234 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1252 const Int_t&
sample,
const Int_t& VecDim)
1263 TVectorD vec(VecDim);
1264 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1271 Bool_t ok_open = kFALSE;
1272 Bool_t ok_read = kFALSE;
1275 Bool_t allowed_to_read = kFALSE;
1285 allowed_to_read = kTRUE;
1294 allowed_to_read = kTRUE;
1298 cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: "
1299 << file_name <<
fTTBELL << endl;
1300 allowed_to_read = kFALSE;
1305 if( allowed_to_read == kTRUE )
1309 if ( ok_read == kTRUE )
1312 for ( Int_t i_bin=0; i_bin<VecDim; i_bin++)
1320 cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> "
1322 <<
" -> quantity: <"
1339 const Int_t & VecDim)
1351 TVectorD vec(VecDim);
1352 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1359 Bool_t ok_open = kFALSE;
1360 Bool_t ok_read = kFALSE;
1363 Bool_t allowed_to_read = kFALSE;
1373 allowed_to_read = kTRUE;
1381 allowed_to_read = kTRUE;
1385 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: "
1386 << file_name <<
fTTBELL << endl;
1387 allowed_to_read = kFALSE;
1392 if( allowed_to_read == kTRUE )
1397 if ( ok_read == kTRUE )
1400 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1408 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1427 TestArrayDimH1(
"ReadSampleMeans",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1430 TVectorD vec(VecDim);
1431 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1438 Bool_t ok_open = kFALSE;
1439 Bool_t ok_read = kFALSE;
1442 Bool_t allowed_to_read = kFALSE;
1452 allowed_to_read = kTRUE;
1461 allowed_to_read = kTRUE;
1465 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: "
1466 << file_name <<
fTTBELL << endl;
1467 allowed_to_read = kFALSE;
1472 if( allowed_to_read == kTRUE )
1477 if ( ok_read == kTRUE )
1494 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1496 <<
" -> quantity: <"
1511 const Int_t & VecDim)
1523 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1530 Bool_t ok_open = kFALSE;
1531 Bool_t ok_read = kFALSE;
1534 Bool_t allowed_to_read = kFALSE;
1544 allowed_to_read = kTRUE;
1553 allowed_to_read = kTRUE;
1557 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: "
1558 << file_name <<
fTTBELL << endl;
1559 allowed_to_read = kFALSE;
1564 if( allowed_to_read == kTRUE )
1569 if ( ok_read == kTRUE )
1572 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1580 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1582 <<
" -> quantity: <"
1599 TestArrayDimH1(
"ReadSampleSigmas",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1602 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1609 Bool_t ok_open = kFALSE;
1610 Bool_t ok_read = kFALSE;
1613 Bool_t allowed_to_read = kFALSE;
1623 allowed_to_read = kTRUE;
1632 allowed_to_read = kTRUE;
1636 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: "
1637 << file_name <<
fTTBELL << endl;
1638 allowed_to_read = kFALSE;
1643 if( allowed_to_read == kTRUE )
1648 if ( ok_read == kTRUE )
1665 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1667 <<
" -> quantity: <"
1692 TVectorD vec(VecDim);
1693 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1703 Int_t n1StexStin = iStexStin+1;
1709 vec(i0StexEcha) = 0;
1712 {vec(i0StexEcha) += mat(i0StinEcha, i_samp);}
1725 const Int_t& MatDimX,
const Int_t& MatDimY)
1736 TMatrixD mat(MatDimX, MatDimY);
1737 for(Int_t
i=0;
i-MatDimX<0;
i++)
1738 {
for(Int_t
j=0;
j-MatDimY<0;
j++){mat(
i,
j)=(Double_t)0.;}}
1741 if( Stin_index >= 0 )
1749 Bool_t ok_open = kFALSE;
1750 Bool_t ok_read = kFALSE;
1753 Bool_t allowed_to_read = kFALSE;
1763 allowed_to_read = kTRUE;
1771 allowed_to_read = kTRUE;
1775 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: "
1776 << file_name <<
fTTBELL << endl;
1777 allowed_to_read = kFALSE;
1782 if( allowed_to_read == kTRUE )
1787 if ( ok_read == kTRUE )
1790 for (Int_t i_crys=0; i_crys-MatDimX<0; i_crys++)
1792 Int_t j_cna_chan = Stin_index*MatDimX + i_crys;
1793 for ( Int_t i_samp=0; i_samp-MatDimY<0; i_samp++)
1802 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1804 <<
" -> quantity: <"
1813 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1814 <<
"It is not possible to access the number of found events: the ROOT file has not been read."
1836 TVectorD vec(VecDim);
1837 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1843 Bool_t ok_open = kFALSE;
1844 Bool_t ok_read = kFALSE;
1847 Bool_t allowed_to_read = kFALSE;
1857 allowed_to_read = kTRUE;
1865 allowed_to_read = kTRUE;
1869 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: "
1870 << file_name <<
fTTBELL << endl;
1871 allowed_to_read = kFALSE;
1876 if( allowed_to_read == kTRUE )
1881 if ( ok_read == kTRUE )
1884 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1892 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
1894 <<
" -> quantity: <"
1918 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1923 Bool_t ok_open = kFALSE;
1924 Bool_t ok_read = kFALSE;
1927 Bool_t allowed_to_read = kFALSE;
1937 allowed_to_read = kTRUE;
1945 allowed_to_read = kTRUE;
1949 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: "
1950 << file_name <<
fTTBELL << endl;
1951 allowed_to_read = kFALSE;
1956 if( allowed_to_read == kTRUE )
1961 if ( ok_read == kTRUE )
1964 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1972 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
1974 <<
" -> quantity: <"
1995 TestArrayDimH1(
"ReadMeanCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
1998 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2003 Bool_t ok_open = kFALSE;
2004 Bool_t ok_read = kFALSE;
2007 Bool_t allowed_to_read = kFALSE;
2017 allowed_to_read = kTRUE;
2025 allowed_to_read = kTRUE;
2029 cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2030 << file_name <<
fTTBELL << endl;
2031 allowed_to_read = kFALSE;
2036 if( allowed_to_read == kTRUE )
2041 if ( ok_read == kTRUE )
2044 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2052 cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> "
2054 <<
" -> quantity: <"
2078 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2083 Bool_t ok_open = kFALSE;
2084 Bool_t ok_read = kFALSE;
2087 Bool_t allowed_to_read = kFALSE;
2097 allowed_to_read = kTRUE;
2106 allowed_to_read = kTRUE;
2110 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2111 << file_name <<
fTTBELL << endl;
2112 allowed_to_read = kFALSE;
2117 if( allowed_to_read == kTRUE )
2122 if ( ok_read == kTRUE )
2125 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2133 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
2135 <<
" -> quantity: <"
2159 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2164 Bool_t ok_open = kFALSE;
2165 Bool_t ok_read = kFALSE;
2168 Bool_t allowed_to_read = kFALSE;
2178 allowed_to_read = kTRUE;
2187 allowed_to_read = kTRUE;
2191 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2192 << file_name <<
fTTBELL << endl;
2193 allowed_to_read = kFALSE;
2198 if( allowed_to_read == kTRUE )
2203 if ( ok_read == kTRUE )
2206 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2214 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
2216 <<
" -> quantity: <"
2238 TestArrayDimH1(
"ReadSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
2241 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2246 Bool_t ok_open = kFALSE;
2247 Bool_t ok_read = kFALSE;
2250 Bool_t allowed_to_read = kFALSE;
2260 allowed_to_read = kTRUE;
2269 allowed_to_read = kTRUE;
2273 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2274 << file_name <<
fTTBELL << endl;
2275 allowed_to_read = kFALSE;
2280 if( allowed_to_read == kTRUE )
2285 if ( ok_read == kTRUE )
2288 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2296 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2298 <<
" -> quantity: <"
2326 TVectorD vecAverage(VecDim);
2327 for(Int_t
i=0;
i<VecDim;
i++){vecAverage(
i)=(Double_t)0.;}
2334 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2336 vecAverage(i0StexStin) = 0;
2340 Int_t n1StexStin = i0StexStin+1;
2344 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2351 Int_t n1StinEcha = i0StinEcha+1;
2352 if( n1StexStin == 10 && n1StinEcha == 11 )
2354 if( n1StexStin == 11 && n1StinEcha == 11 )
2356 if( !( (n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11 ) )
2357 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2361 Double_t xdivis = (Double_t)0.;
2366 Int_t n1StexStin = i0StexStin+1;
2370 vecAverage(i0StexStin) = vecAverage(i0StexStin)/xdivis;
2390 TVectorD vec(VecDim);
2391 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2397 Bool_t ok_open = kFALSE;
2398 Bool_t ok_read = kFALSE;
2401 Bool_t allowed_to_read = kFALSE;
2411 allowed_to_read = kTRUE;
2420 allowed_to_read = kTRUE;
2424 cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: "
2425 << file_name <<
fTTBELL << endl;
2426 allowed_to_read = kFALSE;
2431 if( allowed_to_read == kTRUE )
2436 if ( ok_read == kTRUE )
2439 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2447 cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> "
2449 <<
" -> quantity: <"
2473 TVectorD vec(VecDim);
2474 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2480 Bool_t ok_open = kFALSE;
2481 Bool_t ok_read = kFALSE;
2484 Bool_t allowed_to_read = kFALSE;
2494 allowed_to_read = kTRUE;
2503 allowed_to_read = kTRUE;
2507 cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: "
2508 << file_name <<
fTTBELL << endl;
2509 allowed_to_read = kFALSE;
2514 if( allowed_to_read == kTRUE )
2519 if ( ok_read == kTRUE )
2522 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2530 cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> "
2532 <<
" -> quantity: <"
2556 TVectorD vec(VecDim);
2557 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2563 Bool_t ok_open = kFALSE;
2564 Bool_t ok_read = kFALSE;
2567 Bool_t allowed_to_read = kFALSE;
2577 allowed_to_read = kTRUE;
2586 allowed_to_read = kTRUE;
2590 cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2591 << file_name <<
fTTBELL << endl;
2592 allowed_to_read = kFALSE;
2597 if( allowed_to_read == kTRUE )
2602 if ( ok_read == kTRUE )
2605 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2613 cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> "
2615 <<
" -> quantity: <"
2639 TVectorD vec(VecDim);
2640 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2646 Bool_t ok_open = kFALSE;
2647 Bool_t ok_read = kFALSE;
2650 Bool_t allowed_to_read = kFALSE;
2660 allowed_to_read = kTRUE;
2669 allowed_to_read = kTRUE;
2673 cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: "
2674 << file_name <<
fTTBELL << endl;
2675 allowed_to_read = kFALSE;
2680 if( allowed_to_read == kTRUE )
2685 if ( ok_read == kTRUE )
2688 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2696 cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> "
2698 <<
" -> quantity: <"
2720 TestArrayDimH1(
"ReadAverageMeanCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2723 TVectorD vec(VecDim);
2724 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2730 Bool_t ok_open = kFALSE;
2731 Bool_t ok_read = kFALSE;
2734 Bool_t allowed_to_read = kFALSE;
2744 allowed_to_read = kTRUE;
2753 allowed_to_read = kTRUE;
2757 cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2758 << file_name <<
fTTBELL << endl;
2759 allowed_to_read = kFALSE;
2764 if( allowed_to_read == kTRUE )
2769 if ( ok_read == kTRUE )
2772 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2780 cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> "
2782 <<
" -> quantity: <"
2804 TestArrayDimH1(
"ReadAverageSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2807 TVectorD vec(VecDim);
2808 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2814 Bool_t ok_open = kFALSE;
2815 Bool_t ok_read = kFALSE;
2818 Bool_t allowed_to_read = kFALSE;
2828 allowed_to_read = kTRUE;
2837 allowed_to_read = kTRUE;
2841 cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2842 << file_name <<
fTTBELL << endl;
2843 allowed_to_read = kFALSE;
2848 if( allowed_to_read == kTRUE )
2853 if ( ok_read == kTRUE )
2856 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2864 cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2866 <<
" -> quantity: <"
2887 const Int_t& MatDim)
2898 TMatrixD mat(MatDim, MatDim);
2899 for(Int_t
i=0;
i-MatDim<0;
i++)
2900 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
2907 Bool_t ok_open = kFALSE;
2908 Bool_t ok_read = kFALSE;
2911 Bool_t allowed_to_read = kFALSE;
2921 allowed_to_read = kTRUE;
2930 allowed_to_read = kTRUE;
2934 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
2935 << file_name <<
fTTBELL << endl;
2936 allowed_to_read = kFALSE;
2941 if( allowed_to_read == kTRUE )
2945 if ( ok_read == kTRUE )
2948 for( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++ )
2950 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++)
2959 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> "
2961 <<
" -> quantity: <"
2976 const Int_t& MatDim)
2986 TMatrixD mat(MatDim, MatDim);
2987 for(Int_t
i=0;
i- MatDim <0;
i++)
2988 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
2994 Bool_t ok_open = kFALSE;
2995 Bool_t ok_read = kFALSE;
2998 Bool_t allowed_to_read = kFALSE;
3008 allowed_to_read = kTRUE;
3017 allowed_to_read = kTRUE;
3021 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
3022 << file_name <<
fTTBELL << endl;
3023 allowed_to_read = kFALSE;
3028 if( allowed_to_read == kTRUE )
3032 if ( ok_read == kTRUE )
3035 for ( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++){
3036 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++){
3042 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> "
3044 <<
" -> quantity: <"
3058 const Int_t & InPutMatDim )
3067 TestArrayDimH2(
"ReadRelevantCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples",
3071 Int_t nb_of_relevant = InPutMatDim*(InPutMatDim-1)/2;
3072 TVectorD vec_rel(nb_of_relevant);
for(Int_t
i=0;
i<nb_of_relevant;
i++){vec_rel(
i)=(Double_t)0.;}
3077 Bool_t ok_open = kFALSE;
3078 Bool_t ok_read = kFALSE;
3081 Bool_t allowed_to_read = kFALSE;
3091 allowed_to_read = kTRUE;
3100 allowed_to_read = kTRUE;
3104 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: "
3105 << file_name <<
fTTBELL << endl;
3106 allowed_to_read = kFALSE;
3111 if( allowed_to_read == kTRUE )
3115 if ( ok_read == kTRUE )
3119 for ( Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++){
3120 for ( Int_t j_samp = 0; j_samp < i_samp; j_samp++){
3127 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> "
3129 <<
" -> quantity: <"
3145 const Int_t& n1StexStin_b,
3146 const Int_t& MatDim)
3153 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3159 TMatrixD mat(MatDim, MatDim);
3160 for(Int_t
i=0;
i-MatDim<0;
i++)
3161 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3168 Bool_t ok_open = kFALSE;
3169 Bool_t ok_read = kFALSE;
3172 Bool_t allowed_to_read = kFALSE;
3182 allowed_to_read = kTRUE;
3191 allowed_to_read = kTRUE;
3195 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3196 << file_name <<
fTTBELL << endl;
3197 allowed_to_read = kFALSE;
3202 if( allowed_to_read == kTRUE )
3207 if ( ok_read == kTRUE )
3210 for ( Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++)
3212 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3213 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3215 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3223 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
3225 <<
" -> quantity: <"
3241 const Int_t & n1StexStin_b,
3242 const Int_t& MatDim)
3254 TMatrixD mat(MatDim, MatDim);
3255 for(Int_t
i=0;
i-MatDim<0;
i++)
3256 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3263 Bool_t ok_open = kFALSE;
3264 Bool_t ok_read = kFALSE;
3267 Bool_t allowed_to_read = kFALSE;
3277 allowed_to_read = kTRUE;
3286 allowed_to_read = kTRUE;
3290 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3291 << file_name <<
fTTBELL << endl;
3292 allowed_to_read = kFALSE;
3297 if( allowed_to_read == kTRUE )
3303 if ( ok_read == kTRUE )
3306 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3308 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3309 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3311 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3319 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
3321 <<
" -> quantity: <"
3337 const Int_t & n1StexStin_b,
3338 const Int_t& MatDim)
3345 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3351 TMatrixD mat(MatDim, MatDim);
3352 for(Int_t
i=0;
i-MatDim<0;
i++)
3353 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3360 Bool_t ok_open = kFALSE;
3361 Bool_t ok_read = kFALSE;
3364 Bool_t allowed_to_read = kFALSE;
3374 allowed_to_read = kTRUE;
3383 allowed_to_read = kTRUE;
3387 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3388 << file_name <<
fTTBELL << endl;
3389 allowed_to_read = kFALSE;
3394 if( allowed_to_read == kTRUE )
3399 if ( ok_read == kTRUE )
3402 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3404 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3405 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3407 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3415 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
3417 <<
" -> quantity: <"
3433 const Int_t & n1StexStin_b,
3434 const Int_t& MatDim)
3441 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
3447 TMatrixD mat(MatDim, MatDim);
3448 for(Int_t
i=0;
i-MatDim<0;
i++)
3449 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3456 Bool_t ok_open = kFALSE;
3457 Bool_t ok_read = kFALSE;
3460 Bool_t allowed_to_read = kFALSE;
3470 allowed_to_read = kTRUE;
3479 allowed_to_read = kTRUE;
3483 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3484 << file_name <<
fTTBELL << endl;
3485 allowed_to_read = kFALSE;
3490 if( allowed_to_read == kTRUE )
3496 if ( ok_read == kTRUE )
3499 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3501 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3502 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3504 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3512 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
3514 <<
" -> quantity: <"
3536 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3540 TMatrixD mat(MatDim, MatDim);
3541 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3552 Bool_t ok_open = kFALSE;
3553 Bool_t ok_read = kFALSE;
3556 Bool_t allowed_to_read = kFALSE;
3566 allowed_to_read = kTRUE;
3575 allowed_to_read = kTRUE;
3579 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3580 << file_name <<
fTTBELL << endl;
3581 allowed_to_read = kFALSE;
3586 if( allowed_to_read == kTRUE )
3591 if ( ok_read == kTRUE )
3610 mat(i_chan_sm, j_chan_sm) =
3622 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> "
3624 <<
" -> quantity: <"
3646 TestArrayDimH2(
"ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3650 TMatrixD mat(MatDim, MatDim);
3651 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3662 Bool_t ok_open = kFALSE;
3663 Bool_t ok_read = kFALSE;
3666 Bool_t allowed_to_read = kFALSE;
3676 allowed_to_read = kTRUE;
3685 allowed_to_read = kTRUE;
3689 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3690 << file_name <<
fTTBELL << endl;
3691 allowed_to_read = kFALSE;
3696 if( allowed_to_read == kTRUE )
3701 if ( ok_read == kTRUE )
3720 mat(i_chan_sm, j_chan_sm) =
3732 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
3734 <<
" -> quantity: <"
3756 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3760 TMatrixD mat(MatDim, MatDim);
3761 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3772 Bool_t ok_open = kFALSE;
3773 Bool_t ok_read = kFALSE;
3776 Bool_t allowed_to_read = kFALSE;
3786 allowed_to_read = kTRUE;
3795 allowed_to_read = kTRUE;
3799 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3800 << file_name <<
fTTBELL << endl;
3801 allowed_to_read = kFALSE;
3806 if( allowed_to_read == kTRUE )
3811 if ( ok_read == kTRUE )
3830 mat(i_chan_sm, j_chan_sm) =
3842 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> "
3844 <<
" -> quantity: <"
3866 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3870 TMatrixD mat(MatDim, MatDim);
3871 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3882 Bool_t ok_open = kFALSE;
3883 Bool_t ok_read = kFALSE;
3886 Bool_t allowed_to_read = kFALSE;
3896 allowed_to_read = kTRUE;
3905 allowed_to_read = kTRUE;
3909 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: "
3910 << file_name <<
fTTBELL << endl;
3911 allowed_to_read = kFALSE;
3916 if( allowed_to_read == kTRUE )
3921 if ( ok_read == kTRUE )
3940 mat(i_chan_sm, j_chan_sm) =
3952 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
3954 <<
" -> quantity: <"
3977 TestArrayDimH2(
"ReadLowFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
3980 TMatrixD mat(MatDim, MatDim);
3981 for(Int_t
i=0;
i-MatDim<0;
i++)
3982 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
3993 Bool_t ok_open = kFALSE;
3994 Bool_t ok_read = kFALSE;
3997 Bool_t allowed_to_read = kFALSE;
4007 allowed_to_read = kTRUE;
4016 allowed_to_read = kTRUE;
4020 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: "
4021 << file_name <<
fTTBELL << endl;
4022 allowed_to_read = kFALSE;
4027 if( allowed_to_read == kTRUE )
4032 if( ok_read == kTRUE )
4035 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++)
4037 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++)
4039 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4041 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4043 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4044 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4045 mat((Int_t)vec_ia_m, vec_ib_m) =
4055 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
4057 <<
" -> quantity: <"
4079 TestArrayDimH2(
"ReadHighFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
4082 TMatrixD mat(MatDim, MatDim);
4083 for(Int_t
i=0;
i-MatDim<0;
i++)
4084 {
for(Int_t
j=0;
j-MatDim<0;
j++){mat(
i,
j)=(Double_t)0.;}}
4095 Bool_t ok_open = kFALSE;
4096 Bool_t ok_read = kFALSE;
4099 Bool_t allowed_to_read = kFALSE;
4109 allowed_to_read = kTRUE;
4118 allowed_to_read = kTRUE;
4122 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: "
4123 << file_name <<
fTTBELL << endl;
4124 allowed_to_read = kFALSE;
4129 if( allowed_to_read == kTRUE )
4134 if( ok_read == kTRUE )
4137 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim<0; index_Stin_a++)
4139 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim<0; index_Stin_b++)
4141 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4143 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4145 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4146 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4147 mat((Int_t)vec_ia_m, (Int_t)vec_ib_m) =
4157 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
4159 <<
" -> quantity: <"
4195 for(Int_t i0StexEcha = 0 ; i0StexEcha < DimX ; i0StexEcha++){
4197 for(Int_t j_samp = 0 ; j_samp < DimY ; j_samp++){
4199 DimZ*(DimY*i0StexEcha+j_samp);}}
4203 for (Int_t iza=0; iza<DimX; iza++)
4205 for (Int_t izb=0; izb<DimY; izb++)
4207 for (Int_t izc=0; izc<DimZ; izc++)
4222 Bool_t ok_open = kFALSE;
4223 Bool_t ok_read = kFALSE;
4226 Int_t i_entry_fail = 0;
4230 if( ok_open == kTRUE )
4232 for(Int_t i0StexEcha=0; i0StexEcha<DimX; i0StexEcha++)
4234 if( i0StexEcha == 0 )
4237 if( i_entry >= 0 ){ok_read = kTRUE;}
4243 if ( ok_read == kTRUE )
4248 for ( Int_t i_bin=0; i_bin<DimZ; i_bin++)
4258 cout <<
"!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> "
4260 <<
" -> quantity: <"
4274 cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> "
4275 <<
" ROOT file not found" <<
fTTBELL << endl;
4278 if(i_entry_fail > 0 )
4280 cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> "
4281 <<
" Entry reading failure(s). i_entry_fail = "
4282 << i_entry_fail <<
fTTBELL << endl;
4297 Int_t xFapNbOfEvts = 0;
4311 delete [] NOFE_int; NOFE_int = 0;
fCdelete++;
4313 return xFapNbOfEvts;
4323 TString quantity_name =
"?";
4327 if(
fFlagSubDet ==
"EB" ){quantity_name =
"SM numbers";}
4328 if(
fFlagSubDet ==
"EE" ){quantity_name =
"Dee numbers";}
4330 if( arg_typ ==
cTypMSp ){quantity_name =
"Mean samples";}
4331 if( arg_typ ==
cTypSSp ){quantity_name =
"Sigma of samples";}
4333 if( arg_typ ==
cTypNbOfEvts ){quantity_name =
"Number of events";}
4334 if( arg_typ ==
cTypPed ){quantity_name =
"Pedestals";}
4335 if( arg_typ ==
cTypTno ){quantity_name =
"Total noise";}
4336 if( arg_typ ==
cTypLfn ){quantity_name =
"LF noise";}
4337 if( arg_typ ==
cTypHfn ){quantity_name =
"HF noise";}
4338 if( arg_typ ==
cTypMeanCorss){quantity_name =
"Mean cor(s,s')";}
4339 if( arg_typ ==
cTypSigCorss ){quantity_name =
"Sigma of cor(s,s')";}
4341 if( arg_typ ==
cTypAvPed ){quantity_name =
"Average pedestals";}
4342 if( arg_typ ==
cTypAvTno ){quantity_name =
"Average total noise";}
4343 if( arg_typ ==
cTypAvLfn ){quantity_name =
"Average LF noise";}
4344 if( arg_typ ==
cTypAvHfn ){quantity_name =
"Average HF noise";}
4345 if( arg_typ ==
cTypAvMeanCorss){quantity_name =
"Average mean cor(s,s')";}
4346 if( arg_typ ==
cTypAvSigCorss ){quantity_name =
"Average sigma of cor(s,s')";}
4348 if( arg_typ ==
cTypAdcEvt ){quantity_name =
"Sample ADC a.f.o event number";}
4350 if( arg_typ ==
cTypCovCss ){quantity_name =
"Cov(s,s')";}
4351 if( arg_typ ==
cTypCorCss ){quantity_name =
"Cor(s,s')";}
4352 if( arg_typ ==
cTypLfCov ){quantity_name =
"LF Cov(c,c')";}
4353 if( arg_typ ==
cTypLfCor ){quantity_name =
"LF Cor(c,c')";}
4354 if( arg_typ ==
cTypHfCov ){quantity_name =
"HF Cov(c,c')";}
4355 if( arg_typ ==
cTypHfCor ){quantity_name =
"HF Cor(c,c')";}
4359 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";}
4360 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";}
4364 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";}
4365 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";}
4367 return quantity_name;
4392 number = (Int_t)vec(i0StexStinEcna);
4409 cout <<
"*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = "
4411 <<
" n1StexStin = " << n1StexStin
4414 Int_t Stin_index = n1StexStin-1;
4418 Int_t Stin_index = -1;
4428 cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = "
4430 if ( vec[
i] == n1StexStin ){Stin_index =
i;}
4434 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;
4435 cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << endl
4436 <<
" Stin index : " << Stin_index << endl;
4437 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;}
4439 if ( Stin_index < 0 )
4442 cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : "
4443 <<
"index Stin not found"
4462 cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << endl;
4470 cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << endl;
4478 cout <<
"*TEcnaRead::PrintAllComments()> All the comments will be printed" << endl;
TEcnaResultType * fCnaIndivResult
Bool_t OpenR(const Text_t *="")
Int_t NumberOfEventsAnalysis(Int_t **, const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadLowFrequencyNoise(const Int_t &)
TVectorD ReadAverageHighFrequencyNoise(const Int_t &)
Int_t GetLastReqEvtNumber()
TMatrixD ReadMatrix(const Int_t &, const TString, const TString, const Int_t &, const Int_t &)
TEcnaRead & operator=(const TEcnaRead &)
TMatrixD ReadCovariancesBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSampleAdcValues(const Int_t &, const Int_t &, const Int_t &, const Int_t &)
void FileParameters(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, TString)
void TestArrayDimH1(const TString, const TString, 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()
TString BuildStandardDetectorCode(const TString)
TVectorD ReadAverageNumberOfEvents(const Int_t &)
Int_t fReadyToReadRootFile
TEcnaParHistos * fCnaParHistos
Int_t fCodePrintAllComments
TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &)
R__EXTERN TEcnaRootFile * gCnaRootFile
Int_t GetNumberOfBinsSampleAsFunctionOfTime()
TVectorD ReadRelevantCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TVectorD ReadAverageTotalNoise(const Int_t &)
TString GetTypeOfQuantity(const CnaResultTyp)
TString fRootFileNameShort
Int_t GetFirstReqEvtNumber()
void RegisterFileParameters(const TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString, const TString, const time_t, const time_t)
Bool_t ReadRootFileHeader(const Int_t &)
Long_t GetPointerValue(const TString)
Int_t fCodePrintNoComment
Int_t GetCodePrint(const TString)
Int_t * fT1d_StexStinFromIndex
TVectorD ReadStinNumbers(const Int_t &)
TVectorD ReadSampleSigmas(const Int_t &, const Int_t &, const Int_t &)
TString BuildStandardCovOrCorCode(const TString, const TString)
TVectorD Read1DHisto(const Int_t &, const TString, 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 &)
TEcnaParCout * fCnaParCout
TVectorD ReadPedestals(const Int_t &)
TString GetRootFileName()
TMatrixD ReadLowFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Double_t ** fT3d2_AdcValues
Double_t * fT3d1_AdcValues
Bool_t RegisterPointer(const TString, const Long_t &)
TEcnaParPaths * fCnaParPaths
void fCopy(const TEcnaRead &)
TString GetAnalysisName()
TString BuildStandard1DHistoCodeY(const TString, const TString)
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
TEcnaHeader * fFileHeader
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
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 SetEcalSubDetector(const TString)
Int_t MaxCrysEcnaInStex()
TEcnaObject * fObjectManager
TEcnaNumbering * fEcalNumbering
Int_t ReadElementNextEntryNumber(CnaResultTyp, Int_t)
TString BuildStandardBetweenWhatCode(const TString, const TString)
Int_t MaxStinEcnaInStas()
TMatrixD ReadCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
TVectorD ReadMeanCorrelationsBetweenSamples(const Int_t &)
void ReStart(const Text_t *)
void TestArrayDimH2(const TString, const TString, const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString GetRootFileNameShort()
TMatrixD ReadHighFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Double_t *** fT3d_AdcValues
Bool_t ReadElement(Int_t)
Bool_t CloseRootFile(const Text_t *)
TString GetEcalSubDetector()
Bool_t OpenW(const Text_t *="")
void fMakeResultsFileName()
TString GetTechReadCode(const TString, const TString)
TString GetRootFileName()
TVectorD ReadSampleMeans(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAverageMeanCorrelationsBetweenSamples(const Int_t &)
TString fCurrentlyOpenFileName
TVectorD ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t &)
Bool_t OpenRootFile(const Text_t *, TString)
TVectorD ReadNumberOfEvents(const Int_t &)
void Adelete(const TString)