Changeset 14727
- Timestamp:
- 12/05/12 10:02:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/marsmacros/mc2csv/MonteCarlo.C
r14726 r14727 1 1 #include "MonteCarlo.h" 2 2 3 // -------------------------------------------------------------------------- 4 // Default constructor. Initiates Pointers and Variables to NULL or 0 5 // 3 6 MonteCarlo::MonteCarlo() 4 7 { … … 68 71 } 69 72 73 // -------------------------------------------------------------------------- 74 // Destructor 75 // 70 76 MonteCarlo::~MonteCarlo(void) 71 77 { … … 79 85 } 80 86 87 // -------------------------------------------------------------------------- 88 // Initiates Pointers and Variables to NULL or 0 89 // 81 90 void 82 91 MonteCarlo::InitVariables() … … 121 130 } 122 131 132 // ========================================================================== 133 // Setters 134 // 135 123 136 void 124 137 MonteCarlo::SetVerbosityLevel(int verbLvl) … … 128 141 return; 129 142 } 143 144 // ========================================================================== 145 // Getters 146 // 130 147 131 148 int … … 134 151 return mVerbosityLvl; 135 152 } 153 154 // ========================================================================== 155 // Root file handling 156 // 136 157 137 158 void … … 159 180 mpRootFile->Close("R"); 160 181 mpRootFile=NULL; 161 162 return;163 }164 165 void166 MonteCarlo::OpenCsvFile(TString fileName)167 {168 mCsvFileName = fileName;169 170 if (mVerbosityLvl > 0) cout << "...opening csv file: " << mCsvFileName << endl;171 172 mCsv.open( mCsvFileName );173 174 return;175 }176 177 void178 MonteCarlo::CloseCsvFile()179 {180 if (mVerbosityLvl > 0) cout << "...closing csv file: " << mCsvFileName << endl;181 182 mCsv.close();183 182 184 183 return; … … 563 562 564 563 int pix_first_sample; 565 // int pix_last_sample;566 564 567 565 // ----------------------------------------------------------------------- … … 572 570 { 573 571 all_raw_data = (unsigned short*) mpRawEventData->GetSamples(); 572 // FADC samples (hi gain) of all pixels 573 // This is an array of Byte_t variables. The value of a FADC sample has a 574 // size of n=fNumBytesPerSample bytes. Therefore, a FADC sample value will 575 // occupy n consecutive elements of this array (little endian ordering, i.e, 576 // less significant bits (and bytes) go first. 577 // If m = GetNumHiGainSamples(), the n bytes corresponding to the value of the 578 // i-th FADC sample of the j-th pixel are stored in the n consecutive 579 // positions of this array, starting from fHiGainFadcSamples[j*n*m+i*n] 574 580 } 575 581 else cout << "...cannot read event raw data" << endl; … … 608 614 // of pixel's first sample's adress 609 615 mpPixel[i].rawData = &(all_raw_data[pix_first_sample]); 616 610 617 } 611 618 … … 630 637 ReadEventMetaData(); 631 638 ReadEventRawData(); 639 640 return; 641 } 642 643 // ========================================================================== 644 // csv file handling 645 // 646 647 void 648 MonteCarlo::OpenCsvFile(TString fileName) 649 { 650 mCsvFileName = fileName; 651 652 if (mVerbosityLvl > 0) cout << "...opening csv file: " << mCsvFileName << endl; 653 654 mCsv.open( mCsvFileName ); 655 656 return; 657 } 658 659 void 660 MonteCarlo::CloseCsvFile() 661 { 662 if (mVerbosityLvl > 0) cout << "...closing csv file: " << mCsvFileName << endl; 663 664 mCsv.close(); 632 665 633 666 return; … … 903 936 904 937 905 //-------------------------------------------------------------------------------- 906 // 907 // 908 // 909 // FADC samples (hi gain) of all pixels 910 // This is an array of Byte_t variables. The value of a FADC sample has a 911 // size of n=fNumBytesPerSample bytes. Therefore, a FADC sample value will 912 // occupy n consecutive elements of this array (little endian ordering, i.e, 913 // less significant bits (and bytes) go first. 914 // If m = GetNumHiGainSamples(), the n bytes corresponding to the value of the 915 // i-th FADC sample of the j-th pixel are stored in the n consecutive 916 // positions of this array, starting from fHiGainFadcSamples[j*n*m+i*n] 917 918 919 920 938 939 940 941 942 943
Note:
See TracChangeset
for help on using the changeset viewer.