File indexing completed on 2024-04-06 11:57:44
0001
0002
0003
0004
0005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaResultType.h"
0006 #include "Riostream.h"
0007
0008
0009
0010
0011
0012
0013
0014 ClassImp(TEcnaResultType);
0015
0016
0017
0018
0019
0020
0021
0022 TEcnaResultType::TEcnaResultType() {
0023
0024
0025 fMatMat.ReSet(1, 1);
0026 fMatHis.ReSet(1, 1);
0027 }
0028
0029 TEcnaResultType::TEcnaResultType(TEcnaObject* pObjectManager) {
0030
0031
0032 Long_t i_this = (Long_t)this;
0033 pObjectManager->RegisterPointer("TEcnaResultType", i_this);
0034
0035 fMatMat.ReSet(1, 1);
0036 fMatHis.ReSet(1, 1);
0037 }
0038
0039 #define CWAR
0040 #ifndef CWAR
0041
0042 TEcnaResultType::TEcnaResultType(
0043 CnaResultTyp typ, Int_t i, Int_t xArgNrowMat, Int_t xArgNcolMat, Int_t xArgNrowHis, Int_t xArgNcolHis) {
0044
0045
0046
0047
0048 fTypOfCnaResult = typ;
0049 fIthElement = i;
0050
0051 fMatMat.ReSet(1, 1);
0052 fMatHis.ReSet(1, 1);
0053
0054 if ((xArgNrowMat > 0) && (xArgNcolMat > 0)) {
0055 fMatMat.ReSet(xArgNrowMat, xArgNcolMat);
0056 } else {
0057 fMatMat.ReSet(1, 1);
0058 }
0059
0060 if ((xArgNrowHis > 0) && (xArgNcolHis > 0)) {
0061 fMatHis.ReSet(xArgNrowHis, xArgNcolHis);
0062 } else {
0063 fMatHis.ReSet(1, 1);
0064 }
0065 }
0066
0067 #endif
0068
0069 TEcnaResultType::~TEcnaResultType() {
0070
0071
0072
0073 }
0074
0075 void TEcnaResultType::SetSizeMat(Int_t nrow, Int_t ncol) {
0076
0077 nrow = TMath::Abs(nrow);
0078 ncol = TMath::Abs(ncol);
0079 if ((nrow > 0) && (ncol > 0))
0080 fMatMat.ReSet(nrow, ncol);
0081 else
0082 fMatMat.ReSet(1, 1);
0083 }
0084
0085 void TEcnaResultType::SetSizeHis(Int_t nrow, Int_t ncol) {
0086
0087 nrow = TMath::Abs(nrow);
0088 ncol = TMath::Abs(ncol);
0089 if ((nrow > 0) && (ncol > 0))
0090 fMatHis.ReSet(nrow, ncol);
0091 else
0092 fMatHis.ReSet(1, 1);
0093 }
0094
0095 CnaResultTyp TEcnaResultType::GetTypOfEntry(Int_t kEntry) {
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130 CnaResultTyp xResultType = cTypNumbers;
0131
0132 if (kEntry == 0) {
0133 xResultType = cTypNumbers;
0134 }
0135 if (kEntry == 1) {
0136 xResultType = cTypMSp;
0137 }
0138 if (kEntry == 2) {
0139 xResultType = cTypSSp;
0140 }
0141
0142 if (kEntry == 3) {
0143 xResultType = cTypAvTno;
0144 }
0145 if (kEntry == 4) {
0146 xResultType = cTypAvLfn;
0147 }
0148 if (kEntry == 5) {
0149 xResultType = cTypAvHfn;
0150 }
0151
0152 if (kEntry == 6) {
0153 xResultType = cTypHfCov;
0154 }
0155 if (kEntry == 7) {
0156 xResultType = cTypHfCor;
0157 }
0158
0159 if (kEntry == 8) {
0160 xResultType = cTypCovCss;
0161 }
0162 if (kEntry == 9) {
0163 xResultType = cTypCorCss;
0164 }
0165
0166 if (kEntry == 10) {
0167 xResultType = cTypMeanCorss;
0168 }
0169 if (kEntry == 11) {
0170 xResultType = cTypSigCorss;
0171 }
0172
0173 if (kEntry == 12) {
0174 xResultType = cTypAvPed;
0175 }
0176 if (kEntry == 13) {
0177 xResultType = cTypAvMeanCorss;
0178 }
0179 if (kEntry == 14) {
0180 xResultType = cTypAvSigCorss;
0181 }
0182
0183 if (kEntry == 15) {
0184 xResultType = cTypNbOfEvts;
0185 }
0186
0187 if (kEntry == 16) {
0188 xResultType = cTypPed;
0189 }
0190 if (kEntry == 17) {
0191 xResultType = cTypTno;
0192 }
0193 if (kEntry == 18) {
0194 xResultType = cTypLfn;
0195 }
0196 if (kEntry == 19) {
0197 xResultType = cTypHfn;
0198 }
0199
0200 if (kEntry == 20) {
0201 xResultType = cTypAdcEvt;
0202 }
0203
0204 if (kEntry == 21) {
0205 xResultType = cTypLfCov;
0206 }
0207 if (kEntry == 22) {
0208 xResultType = cTypLfCor;
0209 }
0210
0211 if (kEntry == 23) {
0212 xResultType = cTypLFccMoStins;
0213 }
0214 if (kEntry == 24) {
0215 xResultType = cTypHFccMoStins;
0216 }
0217
0218 if (kEntry == 25) {
0219 xResultType = cTypEvtNbInLoop;
0220 }
0221
0222 return xResultType;
0223 }