Changeset 14658 for fact/tools
- Timestamp:
- 11/19/12 11:55:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/marsmacros/mc2csv/MonteCarlo.C
r14657 r14658 116 116 mNumberOfEvents = 2; 117 117 118 mVerbosityLvl = 2;118 mVerbosityLvl = 3; 119 119 120 120 return; … … 209 209 mpHeaderTree->SetBranchAddress("MGeomCam.", &mpGeomCam); 210 210 } 211 else cout << "...could not load branch: MGeomCam" << endl; 211 212 212 213 // ----------------------------------------------------------------------- … … 218 219 mpHeaderTree->SetBranchAddress("IntendedPulsePos.", &mpIntendedPulsePos); 219 220 } 221 else cout << "...could not load branch: IntendedPulsePos" << endl; 220 222 221 223 // ----------------------------------------------------------------------- … … 227 229 mpHeaderTree->SetBranchAddress("MMcRunHeader.", &mpMcRunHeader); 228 230 } 231 else cout << "...could not load branch: MMcRunHeader" << endl; 229 232 230 233 // ----------------------------------------------------------------------- … … 236 239 mpHeaderTree->SetBranchAddress("ElectronicNoise.", &mpElectronicNoise); 237 240 } 241 else cout << "...could not load branch: ElectronicNoise" << endl; 238 242 239 243 // ----------------------------------------------------------------------- … … 245 249 mpHeaderTree->SetBranchAddress("MRawRunHeader.", &mpRawRunHeader); 246 250 } 251 else cout << "...could not load branch: MRawRunHeader" << endl; 247 252 248 253 // ----------------------------------------------------------------------- … … 254 259 mpHeaderTree->SetBranchAddress("MCorsikaRunHeader.",&mpCorsikaRunHeader); 255 260 } 261 else cout << "...could not load branch: MCorsikaRunHeader" << endl; 256 262 257 263 // ======================================================================= … … 350 356 else if (mVerbosityLvl > 2) 351 357 cout << "...could not read data from: MCorsikaRunHeader" << endl; 358 359 // ----------------------------------------------------------------------- 360 361 // delete Pixel Array before you set refferences for a new one 362 if (mpPixel != NULL) 363 { 364 delete[] mpPixel; 365 } 366 mpPixel = new pixel_t[mNumberOfPixels]; 367 368 // ----------------------------------------------------------------------- 369 370 //Get Pedestal from "ElectronicNoise" Branch 371 if ( mpElectronicNoise != NULL) 372 { 373 if (mVerbosityLvl > 1) cout << " ...reading pedestal offsets" << endl; 374 375 // Read Pedestal Offset 376 for ( int i = 0; i < mNumberOfPixels; i++ ) 377 { 378 if ( &(mpElectronicNoise[0][i]) != NULL) 379 mpPixel[i].pedestal = mpElectronicNoise[0][i].GetPedestal(); 380 else if (mVerbosityLvl > 2) 381 cout << " ...cannot read pedestal offset" << endl; 382 } 383 } 384 else if (mVerbosityLvl > 2) 385 cout << "...could not read data from: ElectronicNoise" << endl; 352 386 353 387 return; … … 844 878 MonteCarlo::WritePedestalInfo2Csv() 845 879 { 846 mCsv << "### [Pedestal info]" << endl;847 mCsv << "# SoftID" ;848 mCsv << mSeparator ;849 mCsv << "Pedestal" << endl;880 mCsv << "### [Pedestal]" << endl; 881 // mCsv << "# SoftID" ; 882 // mCsv << mSeparator ; 883 // mCsv << "Pedestal" << endl; 850 884 } 851 885 … … 857 891 for (int pixelID = 0; pixelID < mNumberOfPixels; pixelID++) 858 892 { 859 mCsv << mpPixel[pixelID].SoftId; 860 mCsv << mSeparator; 893 // mCsv << mpPixel[pixelID].SoftId; 861 894 mCsv << mpPixel[pixelID].pedestal; 862 mCsv << endl; 895 if (pixelID < mNumberOfPixels -1) 896 mCsv << mSeparator; 863 897 } 864 898 mCsv << endl;
Note:
See TracChangeset
for help on using the changeset viewer.