43 Long_t i_this = (Long_t)
this;
50 fgMaxCar = (Int_t)512;
62 Bool_t FileHere = kFALSE;
64 if( GetPathForResultsRootFiles() == kTRUE ){NbFileHere++;}
65 if( GetPathForResultsAsciiFiles() == kTRUE ){NbFileHere++;}
66 if( GetPathForHistoryRunListFiles() == kTRUE ){NbFileHere++;}
70 if( NbFileHere == 3 ){FileHere = kTRUE;}
83 return GetPathForResultsRootFiles(
"");
92 Bool_t FileHere = kFALSE;
94 Int_t MaxCar = fgMaxCar;
95 fCfgResultsRootFilePath.Resize(MaxCar);
96 fCfgResultsRootFilePath =
"?";
101 if ( argFileName ==
"" )
103 string cFileNameForCnaPaths =
"ECNA/path_results_root";
104 TString s_file_name = cFileNameForCnaPaths.c_str();
105 const Text_t *t_file_name = (
const Text_t *)s_file_name.Data();
107 TString s_path_name = gSystem->Getenv(
"HOME");
109 fFileForResultsRootFilePath = s_path_name;
110 fFileForResultsRootFilePath.Append(
'/');
111 fFileForResultsRootFilePath.Append(t_file_name);
115 fFileForResultsRootFilePath = argFileName.Data();
120 fFcin_rr.open(fFileForResultsRootFilePath.Data());
121 if(fFcin_rr.fail() == kFALSE)
124 string xResultsFileP;
125 fFcin_rr >> xResultsFileP;
126 fCfgResultsRootFilePath = xResultsFileP.c_str();
134 cout << fTTBELL << endl
135 <<
" ***************************************************************************************** " << endl;
136 cout <<
" !CNA(TEcnaParPaths) (" << fCnaError <<
") *** ERROR *** " << endl << endl
137 <<
" " << fFileForResultsRootFilePath.Data() <<
": file not found. " << endl << endl
138 <<
" Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl
139 <<
" and create a file named path_results_root in the subdirectory ECNA." << endl << endl
140 <<
" The file " << fFileForResultsRootFilePath.Data() <<
" is a configuration file" << endl
141 <<
" for ECNA and must contain one line with the following syntax:" << endl << endl
142 <<
" PATH_FOR_THE_RESULTS_ROOT_FILE (without slash at the end of line)" << endl
143 <<
" ================================"
145 <<
" Example: $HOME/scratch0/ecna/results_root" << endl << endl
146 <<
" ***************************************************************************************** "
161 return GetPathForResultsAsciiFiles(
"");
170 Bool_t FileHere = kFALSE;
172 Int_t MaxCar = fgMaxCar;
173 fCfgResultsAsciiFilePath.Resize(MaxCar);
174 fCfgResultsAsciiFilePath =
"?";
179 if ( argFileName ==
"" )
181 string cFileNameForCnaPaths =
"ECNA/path_results_ascii";
182 TString s_file_name = cFileNameForCnaPaths.c_str();
183 const Text_t *t_file_name = (
const Text_t *)s_file_name.Data();
185 TString s_path_name = gSystem->Getenv(
"HOME");
187 fFileForResultsAsciiFilePath = s_path_name;
188 fFileForResultsAsciiFilePath.Append(
'/');
189 fFileForResultsAsciiFilePath.Append(t_file_name);
193 fFileForResultsAsciiFilePath = argFileName.Data();
198 fFcin_ra.open(fFileForResultsAsciiFilePath.Data());
199 if(fFcin_ra.fail() == kFALSE)
202 string xResultsFileP;
203 fFcin_ra >> xResultsFileP;
204 fCfgResultsAsciiFilePath = xResultsFileP.c_str();
212 cout << fTTBELL << endl
213 <<
" ***************************************************************************************** " << endl;
214 cout <<
" !CNA(TEcnaParPaths) (" << fCnaError <<
") *** ERROR *** " << endl << endl
215 <<
" " << fFileForResultsAsciiFilePath.Data() <<
": file not found. " << endl << endl
216 <<
" Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl
217 <<
" and create a file named path_results_ascii in the subdirectory ECNA." << endl << endl
218 <<
" The file " << fFileForResultsAsciiFilePath.Data() <<
" is a configuration file" << endl
219 <<
" for ECNA and must contain one line with the following syntax:" << endl << endl
220 <<
" PATH_FOR_THE_RESULTS_ASCII_FILE (without slash at the end of line)" << endl
221 <<
" ================================"
223 <<
" Example: $HOME/scratch0/ecna/results_ascii" << endl << endl
224 <<
" ***************************************************************************************** "
239 return GetPathForHistoryRunListFiles(
"");
248 Bool_t FileHere = kFALSE;
250 Int_t MaxCar = fgMaxCar;
251 fCfgHistoryRunListFilePath.Resize(MaxCar);
252 fCfgHistoryRunListFilePath =
"?";
257 if ( argFileName ==
"" )
259 string cFileNameForCnaPaths =
"ECNA/path_runlist_history_plots";
260 TString s_file_name = cFileNameForCnaPaths.c_str();
261 const Text_t *t_file_name = (
const Text_t *)s_file_name.Data();
263 TString s_path_name = gSystem->Getenv(
"HOME");
265 fFileForHistoryRunListFilePath = s_path_name;
266 fFileForHistoryRunListFilePath.Append(
'/');
267 fFileForHistoryRunListFilePath.Append(t_file_name);
271 fFileForHistoryRunListFilePath = argFileName.Data();
276 fFcin_lor.open(fFileForHistoryRunListFilePath.Data());
277 if(fFcin_lor.fail() == kFALSE)
280 string xHistoryRunListP;
281 fFcin_lor >> xHistoryRunListP;
282 fCfgHistoryRunListFilePath = xHistoryRunListP.c_str();
290 cout << fTTBELL << endl
291 <<
" ******************************************************************************************************** " << endl;
292 cout <<
" !CNA(TEcnaParPaths) (" << fCnaError <<
") *** ERROR *** " << endl << endl
293 <<
" " << fFileForHistoryRunListFilePath.Data() <<
": file not found. " << endl << endl
294 <<
" Please create a subdirectory named ECNA in your HOME directory (if not already done)" << endl
295 <<
" and create a file named path_runlist_history_plots in the subdirectory ECNA." << endl << endl
296 <<
" The file " << fFileForHistoryRunListFilePath.Data() <<
" is a configuration file" << endl
297 <<
" for ECNA and must contain one line with the following syntax:" << endl << endl
298 <<
" PATH_FOR_THE_LIST_OF_RUNS_FOR_HISTORY_PLOTS_FILE (without slash at the end of line)" << endl
299 <<
" ================================"
301 <<
" Example: $HOME/scratch0/ecna/runlist_history_plots" << endl << endl
302 <<
" ******************************************************************************************************** "
318 Int_t MaxCar = fgMaxCar;
319 fCfgCMSSWBase.Resize(MaxCar);
322 fCfgSCRAMArch.Resize(MaxCar);
325 fCfgCMSSWSubsystem.Resize(MaxCar);
326 fCfgCMSSWSubsystem =
"?";
330 char* ch_cmssw_base = getenv(
"CMSSW_BASE");
331 if( ch_cmssw_base == 0 )
333 cout <<
"*TEcnaParPaths::GetCMSSWParameters()> CMSSW_BASE not defined."
334 <<
" Please, set up the environment (command: eval `scramv1 runtime -csh`)"
339 fCfgCMSSWBase = (TString)ch_cmssw_base;
344 char* ch_scram_arch = getenv(
"SCRAM_ARCH");
345 if( ch_scram_arch == 0 )
347 cout <<
"*TEcnaParPaths::GetCMSSWParameters()> SCRAM_ARCH not defined."
348 <<
" Please, set up the environment (command: eval `scramv1 runtime -csh`)"
353 fCfgSCRAMArch = (TString)ch_scram_arch;
358 fCfgCMSSWSubsystem =
"CalibCalorimetry";
378 TString ModulesdataPath =
"";
380 const Text_t *t_cmssw_base = (
const Text_t *)CMSSWBase().Data();
381 ModulesdataPath.Append(t_cmssw_base);
382 ModulesdataPath.Append(
'/');
384 TString s_src =
"src";
385 const Text_t *t_src = (
const Text_t *)s_src.Data();
386 ModulesdataPath.Append(t_src);
387 ModulesdataPath.Append(
'/');
389 const Text_t *t_cmssw_subsystem = (
const Text_t *)CMSSWSubsystem().Data();
390 ModulesdataPath.Append(t_cmssw_subsystem);
391 ModulesdataPath.Append(
'/');
393 TString s_package_data_path =
"EcalCorrelatedNoiseAnalysisModules/data";
394 const Text_t *t_package_data_path = (
const Text_t *)s_package_data_path.Data();
395 ModulesdataPath.Append(t_package_data_path);
396 ModulesdataPath.Append(
'/');
399 return ModulesdataPath;
405 TString TestslcPath =
"";
407 const Text_t *t_cmssw_base = (
const Text_t *)CMSSWBase().Data();
408 TestslcPath.Append(t_cmssw_base);
409 TestslcPath.Append(
'/');
411 TString s_test =
"test";
412 const Text_t *t_test = (
const Text_t *)s_test.Data();
413 TestslcPath.Append(t_test);
414 TestslcPath.Append(
'/');
416 const Text_t *t_cmssw_arch = (
const Text_t *)SCRAMArch().Data();
417 TestslcPath.Append(t_cmssw_arch);
418 TestslcPath.Append(
'/');
433 {fCfgResultsRootFilePath.Remove(n1,nbcar);}
436 {fCfgResultsAsciiFilePath.Remove(n1,nbcar);}
439 {TString sBegin =
"?";
440 if( fCfgResultsRootFilePath.BeginsWith(
"$HOME") ){sBegin =
"$HOME";}
444 {TString sBegin =
"?";
445 if( fCfgResultsAsciiFilePath.BeginsWith(
"$HOME") ){sBegin =
"$HOME";}
449 {fCfgResultsRootFilePath.Append(t_file_nohome);}
452 {fCfgResultsAsciiFilePath.Append(t_file_nohome);}
void GetCMSSWParameters()
Bool_t GetPathForHistoryRunListFiles()
void SetHistoryRunListFilePath(const TString &)
TString HistoryRunListFilePath()
TString BeginningOfResultsRootFilePath()
void AppendResultsAsciiFilePath(const Text_t *)
Bool_t RegisterPointer(const TString &, const Long_t &)
void SetResultsRootFilePath(const TString &)
TString BeginningOfResultsAsciiFilePath()
TString PathModulesData()
Bool_t GetPathForResultsRootFiles()
void TruncateResultsRootFilePath(const Int_t &, const Int_t &)
TString ResultsRootFilePath()
void TruncateResultsAsciiFilePath(const Int_t &, const Int_t &)
void AppendResultsRootFilePath(const Text_t *)
Bool_t GetPathForResultsAsciiFiles()
TString ResultsAsciiFilePath()
void SetResultsAsciiFilePath(const TString &)
TString PathTestScramArch()