Changeset 1003 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 10/29/01 11:15:53 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
r959 r1003 43 43 #include <fstream.h> 44 44 45 #include <T ArrayC.h>45 #include <TList.h> 46 46 47 47 #include "MLog.h" … … 65 65 : fIn(NULL) 66 66 { 67 *fName = name ? name : "MCT1ReadAscii";68 *fTitle = title ? title : "Task to loop over events in CT1 ascii file";67 fName = name ? name : "MCT1ReadAscii"; 68 fTitle = title ? title : "Task to loop over events in CT1 ascii file"; 69 69 70 70 // 71 71 // remember file name for opening the file in the preprocessor 72 72 // 73 fFileNames = new TArrayC; 73 fFileNames = new TList; 74 fFileNames->SetOwner(); 75 74 76 if (fname) 75 77 AddFile(fname); … … 93 95 void MCT1ReadAscii::AddFile(const char *txt) 94 96 { 95 const int sz = fFileNames->GetSize(); 96 const int tsz = strlen(txt)+1; 97 98 fFileNames->Set(sz+tsz); 99 100 memcpy(fFileNames->GetArray()+sz, txt, tsz); 97 TNamed *name = new TNamed(txt, ""); 98 fFileNames->AddLast(name); 101 99 } 102 100 … … 114 112 fIn = NULL; 115 113 116 const int arrsz = fFileNames->GetSize(); 117 118 if (arrsz<1) 114 // 115 // Check for the existance of a next file to read 116 // 117 TNamed *file = (TNamed*)fFileNames->First(); 118 if (!file) 119 119 return kFALSE; 120 120 … … 122 122 // open the file which is the first one in the chain 123 123 // 124 const char *name = f FileNames->GetArray();124 const char *name = file->GetName(); 125 125 126 126 fIn = new ifstream(name); 127 if (!(*fIn)) 128 { 127 128 const Bool_t noexist = !(*fIn); 129 130 if (noexist) 129 131 *fLog << dbginf << "Cannot open file '" << name << "'" << endl; 130 return kFALSE; 131 } 132 133 // 134 // remove the first entry from the chain 135 // 136 *fLog << "Open file: '" << name << "'" << endl; 137 138 // 139 // create the new char array containing the filenames to process 140 // 141 const int sz = strlen(name)+1; 142 143 char *dummy = new char[arrsz-sz]; 144 memcpy(dummy, name+sz, arrsz-sz); 145 146 // 147 // dummy will be deleted by the destructor of fFileNames 148 // 149 fFileNames->Adopt(arrsz-sz, dummy); 150 151 return kTRUE; 152 132 else 133 *fLog << "Open file: '" << name << "'" << endl; 134 135 // 136 // Remove this file from the list of pending files 137 // 138 fFileNames->Remove(file); 139 140 return !noexist; 153 141 } 154 142 -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r857 r1003 58 58 MCerPhotCalc::MCerPhotCalc(const char *name, const char *title) 59 59 { 60 *fName = name ? name : "MCerPhotCalc";61 *fTitle = title ? title : "Task to calculate Cerenkov photons from raw data";60 fName = name ? name : "MCerPhotCalc"; 61 fTitle = title ? title : "Task to calculate Cerenkov photons from raw data"; 62 62 } 63 63 -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r991 r1003 45 45 { 46 46 47 *fName = name ? name : "MCerPhotEvt";48 *fTitle = title ? title : "(Number of Photon)-Event Information";47 fName = name ? name : "MCerPhotEvt"; 48 fTitle = title ? title : "(Number of Photon)-Event Information"; 49 49 50 50 fPixels = new TClonesArray ("MCerPhotPix", 577) ; -
trunk/MagicSoft/Mars/manalysis/MHillas.cc
r991 r1003 60 60 MHillas::MHillas(const char *name, const char *title) : fEllipse(NULL) 61 61 { 62 *fName = name ? name : "MHillas";63 *fTitle = title ? title : "Storage container for Hillas parameter of one event";62 fName = name ? name : "MHillas"; 63 fTitle = title ? title : "Storage container for Hillas parameter of one event"; 64 64 65 65 Reset(); -
trunk/MagicSoft/Mars/manalysis/MHillasCalc.cc
r857 r1003 56 56 MHillasCalc::MHillasCalc(const char *name, const char *title) 57 57 { 58 *fName = name ? name : "MHillasCalc";59 *fTitle = title ? title : "Task to calculate Hillas parameters";58 fName = name ? name : "MHillasCalc"; 59 fTitle = title ? title : "Task to calculate Hillas parameters"; 60 60 } 61 61 -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r977 r1003 66 66 : fCleanLvl1(lvl1), fCleanLvl2(lvl2) 67 67 { 68 *fName = name ? name : "MImgCleanStd";69 *fTitle = title ? title : "Task which does a standard image cleaning";68 fName = name ? name : "MImgCleanStd"; 69 fTitle = title ? title : "Task which does a standard image cleaning"; 70 70 71 71 *fLog << "Cleaning initialized. Using noise level " << lvl1 << " and " << lvl2 << endl; -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r993 r1003 49 49 MMcPedestalCopy::MMcPedestalCopy(const char *name, const char *title) 50 50 { 51 *fName = name ? name : "MMcPedestalCopy";52 *fTitle = title ? title : "Task to copy monte carlo pedestals into MPedestal Container";51 fName = name ? name : "MMcPedestalCopy"; 52 fTitle = title ? title : "Task to copy monte carlo pedestals into MPedestal Container"; 53 53 } 54 54 -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r857 r1003 53 53 MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title) 54 54 { 55 *fName = name ? name : "MPedCalcPedRun";56 *fTitle = title ? title : "Task to calculate pedestals from pedestal runs raw data";55 fName = name ? name : "MPedCalcPedRun"; 56 fTitle = title ? title : "Task to calculate pedestals from pedestal runs raw data"; 57 57 } 58 58 -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
r857 r1003 42 42 MPedestalCam::MPedestalCam(const char *name, const char *title) 43 43 { 44 *fName = name ? name : "MPedestalCam";45 *fTitle = title ? title : "Storage container for all Pedestal Information in the camera";44 fName = name ? name : "MPedestalCam"; 45 fTitle = title ? title : "Storage container for all Pedestal Information in the camera"; 46 46 47 47 fArray = new TClonesArray("MPedestalPix", 577);
Note:
See TracChangeset
for help on using the changeset viewer.