Changeset 1880 for trunk/MagicSoft/Mars/mfileio
- Timestamp:
- 03/31/03 10:37:56 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mfileio
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.cc
r1668 r1880 96 96 // Add this file as the last entry in the chain 97 97 // 98 void MCT1ReadAscii::AddFile(const char *txt)98 Int_t MCT1ReadAscii::AddFile(const char *txt, Int_t) 99 99 { 100 100 TNamed *name = new TNamed(txt, ""); 101 101 fFileNames->AddLast(name); 102 return 1; 102 103 } 103 104 … … 299 300 return kTRUE; 300 301 } 301 -
trunk/MagicSoft/Mars/mfileio/MCT1ReadAscii.h
r1381 r1880 30 30 ~MCT1ReadAscii(); 31 31 32 void AddFile(const char *fname);32 Int_t AddFile(const char *fname, Int_t dummy=-1); 33 33 34 34 Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r1873 r1880 119 119 // Add this file as the last entry in the chain 120 120 // 121 void MCT1ReadPreProc::AddFile(const char *txt)121 Int_t MCT1ReadPreProc::AddFile(const char *txt, Int_t) 122 122 { 123 123 const char *name = gSystem->ExpandPathName(txt); … … 129 129 { 130 130 *fLog << warn << "WARNING - Problem reading header... ignored." << endl; 131 return ;131 return 0; 132 132 } 133 133 … … 136 136 { 137 137 *fLog << warn << "WARNING - File contains no data... ignored." << endl; 138 return ;138 return 0; 139 139 } 140 140 … … 144 144 145 145 fFileNames->AddLast(new TNamed(txt, "")); 146 return 1; 146 147 } 147 148 -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
r1849 r1880 77 77 ~MCT1ReadPreProc(); 78 78 79 void AddFile(const char *fname);79 Int_t AddFile(const char *fname, Int_t dummy=-1); 80 80 81 81 UInt_t GetEntries() { return fEntries; } -
trunk/MagicSoft/Mars/mfileio/MRead.cc
r1668 r1880 39 39 ClassImp(MRead); 40 40 41 // -------------------------------------------------------------------------- 42 // 43 // Read the setup from a TEnv: 44 // File0, File1, File2, ..., File10, ..., File100, ... 45 // 46 // Searching stops if the first key isn't found in the TEnv 47 // 48 // Enclosing quotation marks (") are removed 49 // 50 // Number of entries at the moment not supported 51 // 52 Bool_t MRead::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 53 { 54 // 55 // Don't allow 'global' setup of files 56 // 57 if (prefix.IsNull()) 58 return kFALSE; 59 60 // 61 // Search (beginning with 0) all keys 62 // 63 for (int i=0;; i++) 64 { 65 TString idx = "File"; 66 idx += i; 67 68 // Output if print set to kTRUE 69 IsEnvDefined(env, prefix, idx, print); 70 71 // Try to get the file name 72 TString name = GetEnvValue(env, prefix, idx, ""); 73 if (name.IsNull()) 74 return kTRUE; 75 76 if (name.BeginsWith("\"") && name.EndsWith("\"")) 77 { 78 name.Remove(name.Last('\"'), 1); 79 name.Remove(name.First('\"'), 1); 80 } 81 82 AddFile(name); 83 } 84 85 return kTRUE; 86 } -
trunk/MagicSoft/Mars/mfileio/MRead.h
r1668 r1880 21 21 MFilter *GetSelector() { return fSelector; } 22 22 23 Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; } 24 25 Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 26 23 27 ClassDef(MRead, 0) // Base class for a reading task 24 28 };
Note:
See TracChangeset
for help on using the changeset viewer.