Changeset 5429 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 11/18/04 15:35:43 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH3.cc
r5300 r5429 166 166 } 167 167 168 MH3::MH3(const TH1 &h1) : fDimension(1) 169 { 170 if (h1.InheritsFrom(TH3::Class())) 171 fDimension = 3; 172 if (h1.InheritsFrom(TH2::Class())) 173 fDimension = 2; 174 175 fData[0] = NULL; 176 fData[1] = NULL; 177 fData[2] = NULL; 178 179 switch (fDimension) 180 { 181 case 3: 182 fData[2] = new MDataChain(h1.GetZaxis()->GetTitle()); 183 case 2: 184 fData[1] = new MDataChain(h1.GetYaxis()->GetTitle()); 185 case 1: 186 fData[0] = new MDataChain(h1.GetXaxis()->GetTitle()); 187 } 188 189 fName = gsDefName; 190 fTitle = gsDefTitle; 191 192 fHist = (TH1*)h1.Clone(); 193 fHist->SetDirectory(NULL); 194 195 fScale[0] = 1; 196 fScale[1] = 1; 197 fScale[2] = 1; 198 } 199 168 200 // -------------------------------------------------------------------------- 169 201 // -
trunk/MagicSoft/Mars/mhbase/MH3.h
r4933 r5429 39 39 public: 40 40 MH3(const unsigned int dim=0); 41 MH3(const TH1 &h1); 41 42 MH3(const char *memberx); 42 43 MH3(const char *memberx, const char *membery);
Note:
See TracChangeset
for help on using the changeset viewer.