- Timestamp:
- 12/17/12 15:33:10 (12 years ago)
- Location:
- fact/tools/rootmacros/PulseTemplates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/csv.C
r14534 r14752 158 158 159 159 //name coulums header 160 mCsvFile << "TimeSlice 161 mCsvFile << " pixel [CHid]" << mSeparator;162 mCsvFile << "Pulseorder 160 mCsvFile << "TimeSlice[a.u.]" << mSeparator; 161 mCsvFile << "CHid" << mSeparator; 162 mCsvFile << "Pulseorder[PhE]" << mSeparator; 163 163 mCsvFile << "OverlayPosition" << mSeparator; 164 mCsvFile << "AmplitudeMax 165 mCsvFile << "AmplitudeMean 166 mCsvFile << "AmplitudeMedian 164 mCsvFile << "AmplitudeMax[mV]" << mSeparator; 165 mCsvFile << "AmplitudeMean[mV]" << mSeparator; 166 mCsvFile << "AmplitudeMedian[mV]"; 167 167 mCsvFile << endl; 168 168 } … … 172 172 { 173 173 //name coulums header 174 mCsvFile << " pixel [CHid]" << mSeparator;174 mCsvFile << "CHid" << mSeparator; 175 175 mCsvFile << "OverlayPosition" << mSeparator; 176 176 mCsvFile << "ModelName" << mSeparator ; 177 mCsvFile << "Order" << mSeparator ; 178 mCsvFile << "Type" << mSeparator ; 177 179 mCsvFile << "Bsl" << mSeparator; 178 180 mCsvFile << "BslErr" << mSeparator; … … 188 190 mCsvFile << "Tau2Err" << mSeparator ; 189 191 mCsvFile << "Integral" << mSeparator ; 190 mCsvFile << "IntegralErr" << mSeparator ;192 // mCsvFile << "IntegralErr" << mSeparator ; 191 193 mCsvFile << "Amplitude" << mSeparator ; 192 mCsvFile << "AmplitudeErr" << mSeparator ;194 // mCsvFile << "AmplitudeErr" << mSeparator ; 193 195 mCsvFile << "Phe" << mSeparator ; 194 196 mCsvFile << "PheErr" << mSeparator ; 195 mCsvFile << "Order" << mSeparator ;196 mCsvFile << "Type" << mSeparator ;197 197 mCsvFile << "FitProb" << mSeparator ; 198 198 mCsvFile << "FitNCalls" << mSeparator ; … … 213 213 mCsvFile << overlayMethod << mSeparator ; 214 214 mCsvFile << pulse->GetName() << mSeparator ; 215 mCsvFile.precision(0); 216 mCsvFile << order << mSeparator ; 217 mCsvFile.precision(2); 218 mCsvFile << pulse->GetType() << mSeparator ; 215 219 mCsvFile.precision(12); 216 220 mCsvFile << pulse->GetBsl() << mSeparator ; … … 232 236 mCsvFile.precision(2); 233 237 mCsvFile << pulse->GetPhE() << mSeparator ; 238 mCsvFile.precision(24); 234 239 mCsvFile << pulse->GetPhEErr() << mSeparator ; 235 mCsvFile << order << mSeparator ; 236 mCsvFile << pulse->GetType() << mSeparator ; 240 mCsvFile.precision(8); 237 241 mCsvFile << pulse->GetFitProb() << mSeparator ; 238 242 mCsvFile.precision(12); -
fact/tools/rootmacros/PulseTemplates/csv.h
r14533 r14752 69 69 // OPERATIONS 70 70 private: 71 /*! \brief Built the path to the CSV file */ 71 72 void BuildPath(); 73 /*! \brief close the CSV file */ 72 74 void CloseCsv(); 75 /*! \brief open the CSV file */ 73 76 void OpenCsv(); 74 77 public: 78 /*! \brief Write the point set and according header of an fitted pulse to CSV 79 * calls WritePointSetHeader() and WritePointSet() 80 * \param pixel Datatype Pixel, containing all pulse histograms of a Pixel 81 * \param overlayMethod chosen overlaymethod 82 * \param order pulse order aka quantity of photons in signal 83 */ 75 84 bool WritePointSetToCsv( 76 85 Pixel* pixel, … … 78 87 int order 79 88 ); 89 /*! \brief Write header of the point set to CSV */ 90 void WritePointSetHeader(); 91 /*! \brief Write the point set of an fitted pulse to CSV 92 * \param pixel Datatype Pixel, containing all pulse histograms of a Pixel 93 * \param overlayMethod chosen overlaymethod 94 * \param order pulse order aka quantity of photons in signal 95 */ 80 96 void WritePointSet( 81 97 Pixel* pixel, … … 83 99 int order 84 100 ); 101 /*! \brief Write header of the pulse parameters to CSV */ 102 void WritePulseAttributesHeader(); 103 /*! \brief Write parameters from pulse fit to CSV 104 * \param pixel Datatype Pixel, containing all pulse histograms of a Pixel 105 * \param pulse Datatype Pulse, containing pulse fit of a Pixel 106 * \param overlayMethod chosen overlaymethod 107 * \param order pulse order aka quantity of photons in signal 108 */ 85 109 void WritePulseAttributes( 86 110 Pixel* pixel, 87 111 Pulse* pulse, 88 TString overlayMethod, int order 112 TString overlayMethod, 113 int order 89 114 ); 90 void WritePointSetHeader();91 void WritePulseAttributesHeader();92 115 93 116 // ACCESS 94 117 public: 118 /*! \brief Get the filename of the CSV file */ 95 119 TString GetFilename(); 120 /*! \brief Get the path to the CSV file */ 96 121 TString GetPath(); 97 122 /*! \brief Get the verbosity Level of the CSV file */ 123 int GetVerbLevel(){return mVerbLevel;} 124 /*! \brief Set the verbosity Level of the CSV file */ 125 void SetVerbLevel(int verbLevel){mVerbLevel = verbLevel;} 126 /*! \brief Get the column seperator of the CSV file */ 127 TString GetSeparator(){return mSeparator;} 128 /*! \brief Set the column seperator of the CSV file */ 129 void SetSeparator(TString separator){mSeparator = separator;} 130 /*! \brief Get ofstream's floating-point decimal precision */ 131 int GetPrecision(){return mPrecision;} 132 /*! \brief Set ofstream's floating-point decimal precision */ 133 void SetPrecision(int precision){mPrecision = precision;} 98 134 99 135 // INQUIRY 100 136 private: 137 /*! directory to save csv files */ 101 138 TString mDirectory; 139 /*! csv's filename */ 102 140 TString mFilename; 141 /*! csv's filename suffix */ 103 142 TString mSuffix; 143 /*! path to the CSV file */ 104 144 TString mPath; 145 /*! csv file outstream */ 105 146 ofstream mCsvFile; 147 /*! verbosity Level */ 106 148 int mVerbLevel; 149 /*! column separator in csv file */ 107 150 TString mSeparator; 151 /*! ofstream's floating-point decimal precision */ 108 152 int mPrecision; 109 153 };
Note:
See TracChangeset
for help on using the changeset viewer.