Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-30 01:17:46

0001 #ifndef ZTR_TEcnaParPaths
0002 #define ZTR_TEcnaParPaths
0003 
0004 #include <Riostream.h>
0005 
0006 #include "TObject.h"
0007 #include "TSystem.h"
0008 #include "Riostream.h"
0009 
0010 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
0011 
0012 ///-----------------------------------------------------------
0013 ///   TEcnaParPaths.h
0014 ///   Update: 05/10/2012
0015 ///   Author:    B.Fabbro (bernard.fabbro@cea.fr)
0016 ///              DSM/IRFU/SPP CEA-Saclay
0017 ///   Copyright: Those valid for CEA sofware
0018 ///
0019 ///   ECNA web page:
0020 ///     http://cms-fabbro.web.cern.ch/cms-fabbro/
0021 ///     cna_new/Correlated_Noise_Analysis/ECNA_main_page.htm
0022 ///-----------------------------------------------------------
0023 
0024 class TEcnaParPaths : public TObject {
0025 private:
0026   //..... Attributes
0027 
0028   Int_t fCnew, fCdelete;
0029   Int_t fCnewRoot, fCdeleteRoot;
0030 
0031   Int_t fgMaxCar;  // Max nb of caracters for char*
0032 
0033   TString fTTBELL;
0034 
0035   Int_t fCnaCommand, fCnaError;
0036 
0037   std::ifstream fFcin_rr;   // stream for results root files
0038   std::ifstream fFcin_ra;   // stream for results ascii files
0039   std::ifstream fFcin_lor;  // stream for list of runs files
0040   //  std::ifstream fFcin_anapar;      // stream for EcnaAnalyzer parameters files
0041   std::ifstream fFcin_cmssw;  // stream for cmssw version and subsystem
0042 
0043   TString fCfgResultsRootFilePath;      // absolute path for the results .root files (/afs/etc...)
0044   TString fFileForResultsRootFilePath;  // name of the file containing the results .root  file path
0045 
0046   TString fCfgResultsAsciiFilePath;      // absolute path for the results .ascii files (/afs/etc...)
0047   TString fFileForResultsAsciiFilePath;  // name of the file containing the results .ascii file path
0048 
0049   TString fCfgHistoryRunListFilePath;      // absolute path for the list-of-runs .ascii files (/afs/etc...)
0050   TString fFileForHistoryRunListFilePath;  // name of the file containing the list-of-run file path
0051 
0052   TString fCfgCMSSWBase;            // CMSSW base user's directory
0053   TString fCfgCMSSWSubsystem;       // CMSSW subsystem name
0054   TString fCfgSCRAMArch;            // SCRAM ARCHITECTURE
0055   TString fFileForCMSSWParameters;  // name of the file containing the CMSSW version, subsystem and slc
0056 
0057 public:
0058   //..... Methods
0059 
0060   TEcnaParPaths();
0061   TEcnaParPaths(TEcnaObject *);
0062   ~TEcnaParPaths() override;
0063 
0064   void Init();
0065 
0066   Bool_t GetPathForResultsRootFiles();
0067   Bool_t GetPathForResultsAsciiFiles();
0068   Bool_t GetPathForHistoryRunListFiles();
0069   void GetCMSSWParameters();
0070 
0071   Bool_t GetPathForResultsRootFiles(const TString &);
0072   Bool_t GetPathForResultsAsciiFiles(const TString &);
0073   Bool_t GetPathForHistoryRunListFiles(const TString &);
0074   //  Bool_t GetCMSSWParameters(const TString&);
0075 
0076   Bool_t GetPaths();
0077 
0078   const TString &ResultsRootFilePath() const;
0079   const TString &ResultsAsciiFilePath() const;
0080   const TString &HistoryRunListFilePath() const;
0081   const TString &CMSSWBase() const;
0082   const TString &CMSSWSubsystem() const;
0083   const TString &SCRAMArch() const;
0084 
0085   void SetResultsRootFilePath(const TString &);
0086   void SetResultsAsciiFilePath(const TString &);
0087   void SetHistoryRunListFilePath(const TString &);
0088 
0089   void TruncateResultsRootFilePath(const Int_t &, const Int_t &);
0090   void TruncateResultsAsciiFilePath(const Int_t &, const Int_t &);
0091 
0092   TString BeginningOfResultsRootFilePath();
0093   TString BeginningOfResultsAsciiFilePath();
0094 
0095   void AppendResultsRootFilePath(const Text_t *);
0096   void AppendResultsAsciiFilePath(const Text_t *);
0097 
0098   TString PathModulesData();
0099   TString PathTestScramArch();
0100 
0101   ClassDefOverride(TEcnaParPaths, 1)  // Parameter management for ECNA (Ecal Correlated Noises Analysis)
0102 };
0103 
0104 #endif  //    ZTR_TEcnaParPaths