98 #include "StDaqLib/GENERIC/EventReader.hh"
99 #include "TPC/TPCV1P0_Reader.hh"
100 #include "TPC/TPCV2P0_Reader.hh"
101 #include "TRG/TRG_Reader.hh"
102 #include "SVT/SVTV1P0_Reader.hh"
103 #include "SSD/SSD_Reader.hh"
104 #include "EMC/EMC_Reader.hh"
105 #include "EEMC/EEMC_Reader.hh"
106 #include "PMD/PMD_Reader.hh"
107 #include "RICH/RICH_Reader.hh"
108 #include "FTPC/FTPV1P0_Reader.hh"
109 #include "L3/L3_Reader.hh"
110 #include "TOF/TOF_Reader.hh"
111 #include "FPD/FPD_Reader.hh"
112 #include "SC/SC_Reader.hh"
114 using namespace OLDEVP;
122 Bank_TPCPV1P0 *pTPCP;
123 pTPCP = (Bank_TPCPV1P0 *)er->findBank(
"TPCP");
124 if (!pTPCP) dr = NULL;
128 else if (det ==
"TPCV1P0")
130 Bank_TPCPV1P0 *pTPCP;
131 pTPCP = (Bank_TPCPV1P0 *)er->findBank(
"TPCP");
132 if (!pTPCP) dr = NULL;
135 else if (det ==
"TPCV2P0")
137 Bank_TPCPV2P0 *pTPCP;
138 pTPCP = (Bank_TPCPV2P0 *)er->findBank(
"TPCP");
139 if (!pTPCP) dr = NULL;
142 else if (det ==
"SVT")
144 Bank_SVTPV1P0 *pSVTP;
145 pSVTP = (Bank_SVTPV1P0 *)er->findBank(
"SVTP");
146 if (!pSVTP) dr = NULL;
149 else if (det ==
"FTPC")
151 Bank_FTPPV1P0 *pFTPP;
152 pFTPP = (Bank_FTPPV1P0 *)er->findBank(
"FTPP");
153 if (!pFTPP) dr = NULL;
174 pRICP = (
Bank_RICP *)er->findBank(
"RICP");
176 if (!pRICP->test_CRC()) printf(
"DetectorReader - getRICHReader: CRC error in RICP: %s %d\n",
178 if (pRICP->swap() < 0) printf(
"DetectorReader - getRICHReader: swap error in RICP: %s %d\n",
180 pRICP->header.CRC = 0;
191 if (!pEEMCP->test_CRC()) printf(
"DetectorReader - getEMCReader: CRC error in EEMCP: %s %d\n",
193 if (pEEMCP->swap() < 0) printf(
"DetectorReader - getEMCReader: swap error in EEMCP: %s %d\n",
195 pEEMCP->header.CRC = 0;
201 printf(
"DetectorReader - getSSDReader: before instantiation of SSD_Reader.\n");
209 pEMCP = (
Bank_EMCP *)er->findBank(
"EMCP");
213 pTRGP = (
Bank_TRGP *)er->findBank(
"TRGP");
216 if (!pEMCP->test_CRC()) printf(
"DetectorReader - getEMCReader: CRC error in EMCP: %s %d\n",
218 if (pEMCP->swap() < 0) printf(
"DetectorReader - getEMCReader: swap error in EMCP: %s %d\n",
220 pEMCP->header.CRC = 0;
228 pPMDP = (
Bank_PMDP *)er->findBank(
"PMDP");
230 if (!pPMDP->test_CRC()) printf(
"DetectorReader - getPMDReader: CRC error in PMDP: %s %d\n",
232 if (pPMDP->swap() < 0) printf(
"DetectorReader - getPMDReader: swap error in PMDP: %s %d\n",
234 pPMDP->header.CRC = 0;
242 pTRGP = (
Bank_TRGP *)er->findBank(
"TRGP");
247 if (!pTRGP->test_CRC()) {printf(
"DetectorReader - getTRGReader: CRC error in TRGP: %s %d\n",
248 __FILE__,__LINE__) ;
return NULL;}
249 if (pTRGP->swap() < 0) {printf(
"DetectorReader - getTRGReader: swap error in TRGP: %s %d\n",
250 __FILE__,__LINE__) ;
return NULL;}
251 pTRGP->header.CRC = 0;
253 if (!r->GetErr())
return r;
254 (void) printf(
"DetectorReader - getTRGReader: Error => deleting implementation (check will cause event to be skipped)\n");
264 pL3P = (
Bank_L3_P *)er->findBank(
"L3_P");
267 if(!pL3P->test_CRC()) printf(
"DetectorReader - getL3Reader: CRC error in L3P: %s %d\n",
269 if(pL3P->swap() < 0) printf(
"DetectorReader - getL3Reader: swap error in L3P: %s %d\n",
271 pL3P->header.CRC = 0;
280 pTOFP = (
Bank_TOFP *)er->findBank(
"TOFP");
282 if (!pTOFP->test_CRC()) printf(
"DetectorReader - getTOFReader: CRC error in TOFP: %s %d\n",
284 if (pTOFP->swap() < 0) printf(
"DetectorReader - getTOFReader: swap error in TOFP: %s %d\n",
286 pTOFP->header.CRC = 0;
295 pFPDP = (
Bank_FPDP *)er->findBank(
"FPDP");
297 if (!pFPDP->test_CRC()) printf(
"DetectorReader - getFPDReader: CRC error in FPDP: %s %d\n",
299 if (pFPDP->swap() < 0) printf(
"DetectorReader - getFPDReader: swap error in FPDP: %s %d\n",
301 pFPDP->header.CRC = 0;