Changeset 271 in Idarraga
- Timestamp:
- Mar 8, 2012, 3:29:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
allpix/src/ReadGeoDescription.cc
r226 r271 13 13 #include <TList.h> 14 14 #include <TString.h> 15 16 #include <set> 17 using namespace std; 18 15 19 16 20 // to be used as extern later … … 66 70 G4int ReadGeoDescription::UseTheseDetectorsOnly(vector<G4int> useDetectors){ 67 71 72 // Check for replicated sensors 73 set<G4int> checkIds; 74 68 75 // first verify if all detectors are in the db 69 76 vector<G4int>::iterator itr = useDetectors.begin(); … … 76 83 } 77 84 78 } 85 if( checkIds.find(*itr) == checkIds.end()) { // not in the list all good 86 checkIds.insert( *itr ); 87 } else { 88 G4cout << "[OOPS] detector with Id " << *itr << " duplicated in the macro ! please check your macro." << G4endl; 89 G4cout << " Allpix can't recover ... so long, and thanks for all the fish ;)" << G4endl; 90 exit(1); 91 } 92 93 } 94 95 exit(1); 79 96 80 97 // now erase what's not needed … … 348 365 349 366 } 367 350 368 else if(m_currentNodeName == __sensor_Resistivity){ 351 369 … … 353 371 m_detsGeo[m_firstIndx]->SetResistivity(val); 354 372 355 } 356 357 373 } 374 375 376 else if(m_currentNodeName == __MIP_Tot_S){ 377 378 float val = atoi(tempContent.c_str()); 379 m_detsGeo[m_firstIndx]->SetMIPTot(val); 380 381 } 382 383 else if(m_currentNodeName == __MIP_Charge_S){ 384 385 float val = atof(tempContent.c_str()); 386 m_detsGeo[m_firstIndx]->SetMIPCharge(val); 387 388 } 389 390 else if(m_currentNodeName == __Counter_Depth_S){ 391 392 float val = atoi(tempContent.c_str()); 393 m_detsGeo[m_firstIndx]->SetCounterDepth(val); 394 395 } 396 397 else if(m_currentNodeName == __Clock_Unit_S){ 398 399 float val = atof(tempContent.c_str()); 400 m_detsGeo[m_firstIndx]->SetClockUnit(val); 401 402 } 403 404 else if(m_currentNodeName == __Chip_Noise_S){ 405 406 float val = atof(tempContent.c_str()); 407 m_detsGeo[m_firstIndx]->SetChipNoise(val); 408 409 } 410 411 else if(m_currentNodeName == __Chip_Threshold_S){ 412 413 float val = atof(tempContent.c_str()); 414 m_detsGeo[m_firstIndx]->SetThreshold(val); 415 416 } 417 418 else if(m_currentNodeName == __Cross_Talk_S){ 419 420 float val = atof(tempContent.c_str()); 421 m_detsGeo[m_firstIndx]->SetCrossTalk(val); 422 423 } 424 425 426 else if(m_currentNodeName == __Saturation_Energy_S){ 427 428 float val = atof(tempContent.c_str()); 429 m_detsGeo[m_firstIndx]->SetSaturationEnergy(val); 430 431 } 432 433 434 435 436 358 437 } 438 359 439 /* 360 440 if(StringIsRelevant(tempContent))
Note: See TracChangeset
for help on using the changeset viewer.