]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Replacing const pointers to char with TStrings
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jul 2007 15:59:44 +0000 (15:59 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Jul 2007 15:59:44 +0000 (15:59 +0000)
RAW/AliMDC.cxx
RAW/AliMDC.h
RAW/AliRawDB.cxx
RAW/AliRawDB.h

index 832163d6ac7554ca0ca690bed79da2ccb1a7959e..3dfd39c9ca0a6c13991d5343b83031415e670050 100644 (file)
@@ -133,11 +133,11 @@ AliMDC::AliMDC(Int_t compress, Bool_t deleteFiles, EFilterMode filterMode,
   }
 
   // Create the guid files folder if it does not exist
-  if (fGuidFileFolder) {
+  if (!fGuidFileFolder.IsNull()) {
     gSystem->ResetErrno();
-    gSystem->MakeDirectory(fGuidFileFolder);
+    gSystem->MakeDirectory(fGuidFileFolder.Data());
     if (gSystem->GetErrno() && gSystem->GetErrno() != EEXIST) {
-      SysError("AliMDC", "mkdir %s", fGuidFileFolder);
+      SysError("AliMDC", "mkdir %s", fGuidFileFolder.Data());
     }
   }
 
@@ -386,14 +386,14 @@ Int_t AliMDC::ProcessEvent(void* event, Bool_t isIovecArray)
   // Create Tag DB here only after the raw data header
   // version was already identified
   if (!fIsTagDBCreated) {
-    if (fFileNameTagDB) {
+    if (!fFileNameTagDB.IsNull()) {
       if (fMaxSizeTagDB > 0) {
        fTagDB = new AliTagDB(fEventTag, NULL);
        fTagDB->SetMaxSize(fMaxSizeTagDB);
-       fTagDB->SetFS(fFileNameTagDB);
+       fTagDB->SetFS(fFileNameTagDB.Data());
        if (!fTagDB->Create()) return kErrTagFile;
       } else {
-       fTagDB = new AliTagDB(fEventTag, fFileNameTagDB);
+       fTagDB = new AliTagDB(fEventTag, fFileNameTagDB.Data());
        if (fTagDB->IsZombie()) return kErrTagFile;
       }
     }
index da5b51d26f0d353861a4c623b806eacd92fc1778..c746977267f130f62e9cd9abc7e1946312c10e39 100644 (file)
@@ -108,8 +108,8 @@ private:
    Bool_t       fStop;        // stop execution (triggered by SIGUSR1)
    Bool_t       fIsTagDBCreated; // is tag db already created
    Double_t     fMaxSizeTagDB;// max size of the tag DB
-   const char*  fFileNameTagDB;// tag DB file name
-   const char*  fGuidFileFolder; // guid files folder
+   TString      fFileNameTagDB;// tag DB file name
+   TString      fGuidFileFolder; // guid files folder
 
    // Filter names
    enum {kNFilters = 1};
@@ -124,7 +124,7 @@ private:
                                  Bool_t isSwapped, char*& data);
    Int_t     ReadRawData(AliRawData &raw, Int_t size, char*& data);
 
-   ClassDef(AliMDC,1)  // MDC processor
+   ClassDef(AliMDC,2)  // MDC processor
 };
 
 #endif
index b66bc78ecc001745cd970ff1af9b0ed8802007a7..2286de471317605fc122251e9b89f45b9ffa2d00 100644 (file)
@@ -447,7 +447,7 @@ const char *AliRawDB::GetAliRootTag()
 }
 
 //______________________________________________________________________________
-Bool_t AliRawDB::WriteGuidFile(const char *guidFileFolder)
+Bool_t AliRawDB::WriteGuidFile(TString &guidFileFolder)
 {
   // Write the guid file
   // in the specified folder or
@@ -455,7 +455,7 @@ Bool_t AliRawDB::WriteGuidFile(const char *guidFileFolder)
   // file is.
 
    TString guidFileName;
-   if (guidFileFolder) {
+   if (!guidFileFolder.IsNull()) {
      guidFileName = guidFileFolder;
 
      TString pathStr = fRawDB->GetName();
index 7cd3dc43afbefc15874f429d6bdf2426835e9053..cb400ed9843285d5b0399eb7caf26b0f9bc24713 100644 (file)
@@ -70,7 +70,7 @@ public:
    Int_t        GetCompressionMode() const { return fRawDB->GetCompressionLevel(); }
    void         Stop() { fStop = kTRUE; }
    static const char *GetAliRootTag();
-   Bool_t       WriteGuidFile(const char *guidFileFolder);
+   Bool_t       WriteGuidFile(TString &guidFileFolder);
 
 protected:
    TFile         *fRawDB;         // DB to store raw data
@@ -95,7 +95,7 @@ private:
    AliRawDB(const AliRawDB& rawDB);
    AliRawDB& operator = (const AliRawDB& rawDB);
 
-   ClassDef(AliRawDB,1)  // Raw DB
+   ClassDef(AliRawDB,2)  // Raw DB
 };
 
 #endif