Changeset 13779 for fact/tools/rootmacros
- Timestamp:
- 05/18/12 21:14:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/FPulseOverlay.C
r13735 r13779 39 39 40 40 #define NPIX 1440 41 #define NCELL 102442 41 #define FAD_MAX_SAMPLES 1024 43 42 #define HAVE_ZLIB … … 160 159 //Root-File Objects 161 160 // TObjArray* hList[pixelSetSize] = {NULL}; 162 T ObjArray* hRootList = NULL;161 TList* hRootList = NULL; 163 162 164 163 TCanvas** cgpPixelPulses = NULL; … … 183 182 void UpdateCanvases( int, int, bool); 184 183 void DeletePixelCanvases( int, int ); 185 TString SetHostsPaths(TString filename, bool Input);186 184 187 185 TString gDataDirectory; … … 195 193 //---------------------------------------------------------------------------- 196 194 int FPulseOverlay( 197 TString datafilename = "raw/201 1/11/09/20111109_006.fits.gz",198 TString drsfilename = "raw/201 1/11/09/20111109_003.drs.fits.gz",199 TString OutRootFileName = "analysis/FPulseTemplate/201 11109_006/Overlay/20111109_006.root",195 TString datafilename = "raw/2012/03/09/20120309_018.fits.gz", 196 TString drsfilename = "raw/2012/03/09/20120309_012.drs.fits.gz", 197 TString OutRootFileName = "analysis/FPulseTemplate/20120309_018/Overlay/20120309_018.root", 200 198 bool ProduceGraphic = false, 201 199 bool spikeDebug = false, … … 203 201 bool testmode = false, 204 202 bool saveResults = true, 205 int verbosityLevel = 0, // different verbosity levels can be implemented here203 int verbosityLevel = 1, // different verbosity levels can be implemented here 206 204 int firstevent = 1, // Hast to be between 1 and infinity NOT 0!!!! 207 int nevents = 1,205 int nevents = -1, 208 206 int firstpixel = 0, 209 int npixel = 1,210 int pixelSetSize = 200,211 int maxPulseOrder = 4,212 int AmplWindowWidth = 1 4, //Width of Window for selection of pulses to histograms207 int npixel = 2, 208 int pixelSetSize = 150, 209 int maxPulseOrder = 5, 210 int AmplWindowWidth = 16, //Width of Window for selection of pulses to histograms 213 211 TString histoOptions = "SRM", 214 212 float GainMean = 9, … … 225 223 // Save-Root-File Settings 226 224 //---------------------------------------------------------------------------- 227 datafilename = SetHostsPaths( datafilename , true);228 drsfilename = SetHostsPaths( drsfilename , true);229 OutRootFileName = SetHostsPaths( OutRootFileName , false );225 datafilename = SetHostsPaths(false, datafilename ); 226 drsfilename = SetHostsPaths(false, drsfilename ); 227 OutRootFileName = SetHostsPaths(true, OutRootFileName ); 230 228 231 229 if (saveResults) 232 230 { 233 CreateRootFile( OutRootFileName, false, verbosityLevel );231 CreateRootFile( OutRootFileName, true, verbosityLevel ); 234 232 } 235 233 … … 487 485 verbosityLevel, 488 486 false, 487 histoOptions, 489 488 NULL, 490 489 gPixelOverlayXaxisLeft, 491 490 gPixelOverlayXaxisRight, 492 491 gBSLMean, 493 gGainMean, 494 histoOptions 492 gGainMean 495 493 ); 496 494 } … … 716 714 // Draw Histograms 717 715 //------------------------------------- 718 716 TString test = "root"; 719 717 SaveHistograms( //save histograms of generell results into output root file 720 718 OutRootFileName, 721 "root",719 test, 722 720 hRootList, 723 721 saveResults, … … 815 813 { 816 814 if (verbosityLevel > 2) cout << endl << "...book histograms" << endl; 817 hRootList = new T ObjArray;815 hRootList = new TList(); 818 816 debugHistos = new TH1F[ Number_Of_Debug_Histo_Types ]; 819 817 for ( int type = 0; type < Number_Of_Debug_Histo_Types; type++){ … … 1216 1214 1217 1215 1218 TString 1219 SetHostsPaths(TString filename, bool Input) 1220 { 1221 ghostname = gSystem->HostName(); 1222 1223 TString temp_filename; 1224 1225 if ( ghostname.Contains("isdc") ) //IF ONE IS WORKING AT ISDC 1226 { 1227 gDataDirectory = "/fact/"; 1228 gHomeDirectory = "/home_nfs/isdc/jbbuss/"; 1229 } 1230 if ( ghostname.Contains("hpc") ) //IF ONE IS WORKING AT PHIDO 1231 { 1232 gDataDirectory = "/fhgfs/groups/app/fact-construction/"; 1233 gHomeDirectory = "/home/jbuss/"; 1234 } 1235 1236 if (Input) 1237 { 1238 temp_filename = gDataDirectory; 1239 temp_filename += filename; 1240 filename = temp_filename; 1241 } 1242 else if (!Input) 1243 { 1244 temp_filename = gHomeDirectory; 1245 temp_filename += filename; 1246 filename = temp_filename; 1247 } 1248 1249 return filename; 1250 } 1216 1251 1217 1252 1218
Note:
See TracChangeset
for help on using the changeset viewer.