Changeset 13476
- Timestamp:
- 04/30/12 19:24:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/rootfilehandler.C
r13465 r13476 1 1 #include "rootfilehandler.h" 2 #include <TROOT.h> 3 #include <TFile.h> 2 4 3 5 4 void 6 5 CreateRootFile( 7 const char *loc_fname,8 int verbosityLevel6 const char* loc_fname, 7 int verbosityLevel 9 8 ) 10 9 { … … 66 65 void 67 66 SaveHistograms( 68 const char* loc_fname,69 const char*subdirectory,70 TObjArray* histList,71 int verbosityLevel67 const char* loc_fname, 68 TString subdirectory, 69 TObjArray* histList, 70 int verbosityLevel 72 71 ) 73 72 { … … 77 76 78 77 TFile* tf = OpenRootFile(loc_fname, verbosityLevel); 79 if ( subdirectory != "root")78 if ( !( subdirectory.CompareTo("root") ) ) //if subdirectory = root 80 79 { 81 80 tf->cd(); … … 123 122 //---------------------------------------------------------------------------- 124 123 125 126 int127 CalculateHistogramId(128 int pixelID,129 int pulseOrder,130 int maxPulseOrder131 )132 {133 return (pixelID*maxPulseOrder + pulseOrder);134 }135 // end of CalculateHistogramId136 //----------------------------------------------------------------------------137 138 int139 CalculatePixelId(140 int mHistogramId,141 int pulseOrder,142 int maxPulseOrder143 )144 {145 return (mHistogramId - pulseOrder)/(maxPulseOrder - 1);146 }147 // end of CalculatePixelIdFromHistogramId148 //----------------------------------------------------------------------------149 150 CalculatePulseOrder(151 int mHistogramId,152 int maxPulseOrder153 )154 {155 if (mHistogramId < maxPulseOrder)156 {157 return mHistogramId;158 }159 else160 {161 return mHistogramId % (maxPulseOrder - 1);162 }163 }164 // end of CalculatePulseOrderFromHistogramId165 //----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.