Changeset 4694 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 08/20/04 11:25:36 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r4577 r4694 109 109 fFileNames->SetOwner(); 110 110 111 if (fname!=NULL)112 AddFile(fname);111 if (fname!=NULL) 112 AddFile(fname); 113 113 } 114 114 … … 230 230 // Return file name of current file. 231 231 // 232 constTString MRawFileRead::GetFileName() const232 TString MRawFileRead::GetFileName() const 233 233 { 234 234 const TObject *file = fFileNames->At(fNumFile-1); -
trunk/MagicSoft/Mars/mraw/MRawFileRead.h
r4601 r4694 34 34 void SetInterleave(UInt_t i) { fInterleave = i; } 35 35 36 constTString GetFileName() const;36 TString GetFileName() const; 37 37 38 38 Int_t AddFile(const char *fname, Int_t entries=-1); -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
r4370 r4694 65 65 const char *ftitle, 66 66 const Int_t comp, 67 const char *name, const char *title) 67 const char *name, const char *title) : fSplit(kFALSE) 68 68 { 69 69 fName = name ? name : "MRawFileWrite"; … … 82 82 MRawFileWrite::~MRawFileWrite() 83 83 { 84 if (fOut != fTData->GetCurrentFile()) 85 { 86 *fLog << warn << endl; 87 *fLog << "WARNING - MWriteRootFile: Root's TTree/TFile has opened a new file" << endl; 88 *fLog << " automatically. You can change this behaviour using TTree::SetMaxTreeSize." << endl; 89 *fLog << " You won't be able to read splitted files correctly with MReadMarsFile if" << endl; 90 *fLog << " they have more than one entry in 'RunHeaders' or you try to read more than" << endl; 91 *fLog << " one of such sequences at once." << endl; 92 *fLog << endl; 93 } 94 95 // 96 // For more information see TTree:ChangeFile() 97 // 98 fOut = fTData->GetCurrentFile(); 99 84 100 // 85 101 // delete instance, this also does a fOut->Close() … … 125 141 126 142 // 127 // remember the pointer to the parameter list fur further usage128 //129 pParList = pList;130 131 //132 143 // check if MEvtHeader exists in the Parameter list already. 133 144 // if not create one and add them to the list … … 180 191 // create data trees for the three types of data 181 192 // 182 fTData = new TTree("Events", "Normal Triggered Events");183 fTPedestal = new TTree("Pedestals", "Pedestal Triggered Events");184 fTCalibration = new TTree("Calibration", "Calibration Triggered Events");193 fTData = new TTree("Events", "Normal Triggered Events"); 194 fTPedestal = fSplit ? new TTree("Pedestals", "Pedestal Triggered Events") : fTData; 195 fTCalibration = fSplit ? new TTree("Calibration", "Calibration Triggered Events") : fTData; 185 196 186 197 // … … 207 218 // FIXME: Can we calculate a good buffer size out of the event size? 208 219 // using splitlevel=0 sppeds up writing by a factor of 5-10% 209 fTData ->Branch("MTime.", "MTime", &fTime, 32000); 220 fTData->Branch("MTime.", "MTime", &fTime, 32000); 221 fTData->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000); 222 fTData->Branch("MRawEvtData.", "MRawEvtData", &fRawEvtData, 320000); 223 fTData->Branch("MRawCrateArray.", "MRawCrateArray", &fRawCrateArray, 32000); 224 if (!fSplit) 225 return kTRUE; 226 210 227 fTPedestal ->Branch("MTime.", "MTime", &fTime, 32000); 211 228 fTCalibration->Branch("MTime.", "MTime", &fTime, 32000); 212 fTData ->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000);213 229 fTPedestal ->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000); 214 230 fTCalibration->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000); 215 fTData ->Branch("MRawEvtData.", "MRawEvtData", &fRawEvtData, 320000);216 231 fTPedestal ->Branch("MRawEvtData.", "MRawEvtData", &fRawEvtData, 320000); 217 232 fTCalibration->Branch("MRawEvtData.", "MRawEvtData", &fRawEvtData, 320000); 218 //fTree->Branch("MRawCrateArray", fRawCrateArray->GetArray(), 32000, 1);219 fTData ->Branch("MRawCrateArray.", "MRawCrateArray", &fRawCrateArray, 32000);220 233 fTPedestal ->Branch("MRawCrateArray.", "MRawCrateArray", &fRawCrateArray, 32000); 221 234 fTCalibration->Branch("MRawCrateArray.", "MRawCrateArray", &fRawCrateArray, 32000); -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.h
r4370 r4694 19 19 { 20 20 private: 21 MParList *pParList;22 23 21 MTime *fTime; 24 22 MRawRunHeader *fRawRunHeader; … … 35 33 TFile *fOut; //! 36 34 35 Bool_t fSplit; 36 37 37 Int_t PreProcess(MParList *pList); 38 38 Bool_t ReInit(MParList *pList); … … 47 47 ~MRawFileWrite(); 48 48 49 void EnableSplit(Bool_t b=kTRUE) { fSplit=b; } 50 49 51 ClassDef(MRawFileWrite, 0) // Task to write the raw data containers to a root file 50 52 };
Note:
See TracChangeset
for help on using the changeset viewer.