Changeset 4766 for trunk/MagicSoft/Mars/mfileio
- Timestamp:
- 08/27/04 16:57:55 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mfileio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfileio/MReadReports.cc
r4183 r4766 113 113 } 114 114 115 // -------------------------------------------------------------------------- 116 // 117 // Return the number of entries in all trees. 118 // 119 UInt_t MReadReports::GetEntries() 120 { 121 UInt_t n=0; 122 123 TIter NextT(fTrees->GetList()); 124 MReadTree *tree=0; 125 while ((tree=(MReadTree*)NextT())) 126 n += tree->GetEntries(); 127 128 return n; 129 } 130 131 // -------------------------------------------------------------------------- 132 // 133 // In case of a Master Tree GetFileName() of the MReadMarsFile is returned. 134 // If no master is available "<MReadReports>" is returned. 135 // 136 TString MReadReports::GetFileName() const 137 { 138 if (!TestBit(kHasMaster)) 139 return "<MReadReports>"; 140 141 TIter NextT(fTrees->GetList()); 142 MReadTree *tree=0; 143 while ((tree=(MReadTree*)NextT())) 144 if (tree->InheritsFrom("MReadMarsFile")) 145 return tree->GetFileName(); 146 147 return "<n/a>"; 148 149 } 150 115 151 void MReadReports::AddToBranchList(const char *name) 116 152 { … … 150 186 t->SetTitle(time?time:""); 151 187 if (master) 152 t->SetBit(kHasMaster);188 SetBit(kHasMaster); 153 189 154 190 if (!fEnableAutoScheme) -
trunk/MagicSoft/Mars/mfileio/MReadReports.h
r4746 r4766 30 30 Int_t FindNextTime(); 31 31 32 UInt_t GetEntries() { return 0; }33 TString GetFileName() const { return "<MReadReports>"; };32 UInt_t GetEntries(); 33 TString GetFileName() const; 34 34 35 35 Int_t PreProcess(MParList *plist); … … 37 37 Int_t PostProcess(); 38 38 39 //Bool_t Notify();40 41 39 enum { 42 //MReadTree::kChainWasChanged = BIT(14) 43 kHasMaster = BIT(15) 40 kHasMaster = BIT(14) 44 41 }; 45 42 -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r4756 r4766 566 566 ResetBit(kChainWasChanged); 567 567 } 568 return fNumEntries ;568 return fNumEntries==TChain::kBigNumber ? 0 : fNumEntries; 569 569 } 570 570 … … 616 616 // 617 617 fChain->ResetTree(); 618 // Maybe this would be enough, but the above might be safer... 619 //if (fChain->GetTreeNumber()==0) 620 // fChain->ResetTree(); 618 621 619 622 //
Note:
See TracChangeset
for help on using the changeset viewer.