Changeset 534 in Sophya for trunk/Poubelle/archTOI.old/ssthandler.cc
- Timestamp:
- Nov 1, 1999, 10:59:29 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/ssthandler.cc
r416 r534 12 12 13 13 #include <math.h> 14 #include <iostream> 14 15 #include "ssthandler.h" 15 16 #include "pisteetoile.h" 16 17 17 #ifdef SST_DUMPLOG 18 18 19 ofstream SSTHandler::sstchass("SSTChassLogFile"); 19 20 bool SSTHandler::sstchassinit=false; 20 #endif21 21 22 22 // diodpermut[i] = channel de la diode i … … 180 180 } 181 181 182 183 // D. Yvon, CEA/DAPNIA/SPP Saclay, 08/99 184 185 186 #ifdef SSTStatLog 187 static ofstream sststat("SSTStatLog"); 188 static int compteurBlock=0; 189 static int nbStar=0; 190 #include "ssthardware.h" 191 #include "archparam.h" 192 #endif 193 194 182 195 int SSTHandler::FindStars(block_type_sst* blk) { 183 196 NbStarInBlock=0; … … 224 237 //On empile sur la map. 225 238 NbStarInBlock++; 226 #ifdef SST _DEBUG239 #ifdef SSTDUMP 227 240 // On écrit les pistes ayant déclénchées 228 241 int NoDiodeEvt=LastStar.NoDiode; 229 if(pPisteDump[NoDiodeEvt]->is_open()) 230 for(int noSamp=0; noSamp<NbSampleBlock;noSamp++) 231 (*pPisteDump[NoDiodeEvt])<<noStarDet<<'\t'<<NoDiode<<'\t'<<NoFirstSpInBlock+noSamp<<'\t'<<Diodedata[noSamp]<<endl; 242 if(NoDiodeEvt<NbChanDump) { 243 if(pPisteDump[NoDiodeEvt]->is_open()) 244 for(int noSamp=0; noSamp<NbSampleBlock;noSamp++) 245 (*pPisteDump[NoDiodeEvt])<<noStarDet<<'\t'<<NoDiode<<'\t'<<NoFirstSpInBlock+noSamp<<'\t'<<Diodedata[noSamp]<<endl; 246 } 232 247 #endif 233 248 noStarDet++; … … 257 272 LastBlockStarVec.push_back((*StarHistReIter).second); 258 273 259 #ifdef SST_DUMPLOG 260 if(NbStarInBlock>0) { 261 274 #ifdef SSTChassLog 275 if(NbStarInBlock>0) { 262 276 // On écrit les étoiles detectées 263 277 vector<SSTEtoile>::reverse_iterator StarVecRevIter; … … 266 280 (*StarVecRevIter).print(sstchass); 267 281 } 268 282 #endif 283 284 #ifdef SSTStatLog 285 int nbBlockincircle=(int) (PeriodRotTeles/(archParam.acq.perEch*72.)); 286 // if((compteurBlock%nbBlockincircle)==0) 287 { 288 // if((compteurBlock%5)==0) { 289 sststat<<numero_block(blk)<<'\t'<<nbStar<<'\t'<<noStarDet<<endl; 290 nbStar=0; 291 } 292 nbStar+=NbStarInBlock; 293 compteurBlock++; 269 294 #endif 270 295 … … 276 301 for(int i=0; i<NbPhotDiodBarette; i++) PisteBar[i]=new PisteEtoile(i); 277 302 StarHistoryMap.clear(); 278 #ifdef SST_DUMPLOG279 303 if (!sstchassinit) { 280 304 sstchass<<LastStar.printHeader()<<endl; 281 305 sstchassinit = true; 282 306 } 283 #endif 284 285 #ifdef SST_DEBUG 307 308 #ifdef SSTDUMP 286 309 char s[32]; 287 310 string fileName; … … 301 324 } 302 325 */ 303 pPisteDump[pistNumb]=new ofstream(fileName.c_str(),ios::out|ios:: trunc);326 pPisteDump[pistNumb]=new ofstream(fileName.c_str(),ios::out|ios::app); 304 327 305 328 if(!(*pPisteDump[pistNumb]).is_open()) { … … 317 340 delete[] PisteBar; 318 341 319 #ifdef SST _DEBUG342 #ifdef SSTDUMP 320 343 for (int pistNumb=0; pistNumb<NbChanDump; pistNumb++) { 321 344 pPisteDump[pistNumb]->close(); 322 345 delete pPisteDump[pistNumb]; 323 346 } 324 delete 347 delete[] pPisteDump; 325 348 #endif 326 349 … … 377 400 { 378 401 lastBlkNum = numero_block(blk); 379 if (prcTodo != 0) { 380 for (int i = 0; i<nb_per_block*2; i++) { 381 DecodeTMBlock(blk, i, diodeRaw[i]); 382 } 402 for (int i = 0; i<nb_per_block*2; i++) { 403 DecodeTMBlock(blk, i, diodeRaw[i]); 383 404 } 384 405 if (prcTodo & permDiode) {
Note:
See TracChangeset
for help on using the changeset viewer.