Changeset 2556
- Timestamp:
- 11/22/03 15:31:18 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MParList.cc
r2552 r2556 493 493 { 494 494 case 1: 495 *fLog << "gROOT->GetClass( \"" << cname << "\"returned NULL." << endl;495 *fLog << "gROOT->GetClass() returned NULL." << endl; 496 496 return NULL; 497 497 case 2: -
trunk/MagicSoft/Mars/mbase/MTask.cc
r2529 r2556 144 144 TString s = str; 145 145 146 while ( 1)146 while (!s.IsNull()) 147 147 { 148 148 Int_t fst = s.First(','); 149 149 150 150 if (fst<0) 151 return;152 153 AddToBranchList( TString(s(0, fst)));151 fst = s.Length(); 152 153 AddToBranchList((const char*)TString(s(0, fst))); 154 154 155 155 s.Remove(0, fst+1); -
trunk/MagicSoft/Mars/mbase/MTime.cc
r2461 r2556 51 51 void MTime::Print(Option_t *) const 52 52 { 53 *fLog << GetDescriptor() << ": " << dec ;54 *fLog << set fill('0') << setw(2) << (int)fHour << ":";55 *fLog << set fill('0') << setw(2) << (int)fMin << ":";56 *fLog << set fill('0') << setw(2) << (int)fSec << ".";57 *fLog << set fill('0') << setw(9) << fNanoSec << endl;53 *fLog << GetDescriptor() << ": " << dec << setfill('0'); 54 *fLog << setw(2) << (int)fHour << ":"; 55 *fLog << setw(2) << (int)fMin << ":"; 56 *fLog << setw(2) << (int)fSec << "."; 57 *fLog << setw(9) << fNanoSec << endl; 58 58 } -
trunk/MagicSoft/Mars/mbase/MTime.h
r2529 r2556 96 96 } 97 97 98 MTime *GetTime()99 {100 return this;101 }102 103 98 UInt_t GetDuration() 104 99 { … … 108 103 operator double() const //[s] 109 104 { 110 return fNanoSec/1e9+(fHour* 24*60*60+fMin*60+fSec);105 return fNanoSec/1e9+(fHour*60*60+fMin*60+fSec); 111 106 } 112 107 double operator()() const //[s] -
trunk/MagicSoft/Mars/mcamera/MCameraAUX.h
r2535 r2556 15 15 Bool_t fStatusFansFADC; // Monitored status: o=off, 1=on, Cam.FADC.Fans_state 16 16 public: 17 ClassDef(MCameraAUX, 0)17 ClassDef(MCameraAUX, 1) 18 18 }; 19 19 -
trunk/MagicSoft/Mars/mcamera/MCameraCalibration.h
r2553 r2556 21 21 22 22 public: 23 ClassDef(MCameraCalibration, 0)23 ClassDef(MCameraCalibration, 1) 24 24 }; 25 25 -
trunk/MagicSoft/Mars/mcamera/MCameraCooling.h
r2553 r2556 29 29 30 30 public: 31 ClassDef(MCameraCooling, 0) 31 32 Byte_t GetStatus() const { return fStatus; } 33 34 Bool_t GetStatusPressureHi() const { return fStatusPressureHi; } 35 Bool_t GetStatusPressureLo() const { return fStatusPressureLo; } 36 Bool_t GetStatusPump() const { return fStatusPump; } 37 Bool_t GetStatusRefrigrerator() const { return fStatusRefrigrerator; } 38 Bool_t GetStatusValve() const { return fStatusValve; } 39 Bool_t GetStatusResistor() const { return fStatusResistor; } 40 Bool_t GetStatusFans() const { return fStatusFans; } 41 42 Float_t GetTempCenter() const { return fTempCenter; } 43 Float_t GetTempWall() const { return fTempWall; } 44 Float_t GetTempOptLink() const { return fTempOptLink; } 45 Float_t GetTempWater() const { return fTempWater; } 46 47 Byte_t GetHumWall() const { return fHumWall; } 48 Byte_t GetHumCenter() const { return fHumCenter; } 49 50 ClassDef(MCameraCooling, 1) 32 51 }; 33 52 -
trunk/MagicSoft/Mars/mcamera/MCameraHV.h
r2553 r2556 26 26 public: 27 27 MCameraHV() : fHV(577) { } 28 ClassDef(MCameraHV, 0)28 ClassDef(MCameraHV, 1) 29 29 }; 30 30 -
trunk/MagicSoft/Mars/mcamera/MCameraLV.h
r2553 r2556 17 17 Bool_t fRequestPowerSupply; // Requested status: o=off, 1=on, blv_ps_status 18 18 19 Float_t fStatusTemp;// Measured status: o=off, 1=on, blv_temp20 Float_t fStatusHumidity;// Measured status: o=off, 1=on, blv_RelativeHumidity19 Float_t fTemp; // Measured status: o=off, 1=on, blv_temp 20 Byte_t fHumidity; // Measured status: o=off, 1=on, blv_RelativeHumidity 21 21 22 22 MCameraPowerSupply fPowerSupplyA; // power supply camera part A … … 24 24 25 25 public: 26 ClassDef(MCameraLV, 0)26 ClassDef(MCameraLV, 1) 27 27 }; 28 28 -
trunk/MagicSoft/Mars/mcamera/MCameraLid.h
r2553 r2556 2 2 #define MARS_MCameraLid 3 3 4 #ifndef ROOT_TObject 5 #include <TObject.h> 4 // Derived from MParContainer instead of TObject 5 // to supress writing fUniqueId and fBits 6 #ifndef MARS_MParContainer 7 #include <MParContainer.h> 6 8 #endif 7 9 8 class MCameraLid : public TObject10 class MCameraLid : public MParContainer 9 11 { 10 12 friend class MReportCamera; … … 17 19 Byte_t fStatusMotor; // 0=stopped, 1=opening, 2=closing 18 20 public: 19 ClassDef(MCameraLid, 0)21 ClassDef(MCameraLid, 1) 20 22 }; 21 23 -
trunk/MagicSoft/Mars/mcamera/MCameraLids.h
r2553 r2556 19 19 Byte_t fStatus; // CaCo monitored lid status, Cam.LID_state [0-9] 20 20 public: 21 ClassDef(MCameraLids, 0)21 ClassDef(MCameraLids, 1) 22 22 }; 23 23 -
trunk/MagicSoft/Mars/mcamera/MCameraPowerSupply.h
r2553 r2556 18 18 Float_t fCurrentPos12V; // [A] current_pos12 (+12V) 19 19 Float_t fCurrentNeg12V; // [A] current_neg12 (-12V) 20 Float_t fCurrentOptLinkPos12V; // [ V] current_opt_link_pos12 (+12V)20 Float_t fCurrentOptLinkPos12V; // [A] current_opt_link_pos12 (+12V) 21 21 22 22 public: 23 ClassDef(MCameraPowerSupply, 0)23 ClassDef(MCameraPowerSupply, 1) 24 24 }; 25 25 -
trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h
r2147 r2556 8 8 #pragma link C++ class MRead+; 9 9 #pragma link C++ class MReadTree+; 10 #pragma link C++ class MReadReports+; 10 11 #pragma link C++ class MReadMarsFile+; 11 12 #pragma link C++ class MReadCurrents+; -
trunk/MagicSoft/Mars/mfileio/MReadTree.h
r2206 r2556 11 11 class MReadTree : public MRead 12 12 { 13 friend class MReadReports; 14 13 15 private: 14 16 MChain *fChain; // Pointer to tree -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r2529 r2556 264 264 // No corresponding container is found 265 265 // 266 *fLog << dbginf<< "Cannot find parameter container '" << cname << "'." << endl;266 *fLog << err << "Cannot find parameter container '" << cname << "'." << endl; 267 267 return kFALSE; 268 268 } … … 312 312 gDirectory = save; 313 313 314 *fLog << "Created Tree " << tname << "." << endl;314 *fLog << inf << "Tree " << tname << " created." << endl; 315 315 } 316 316 … … 337 337 if (branch) 338 338 { 339 *fLog << dbginf << "Branch '" << cname << "' isalready existing." << endl;339 *fLog << err << "Branch '" << cname << "' already existing." << endl; 340 340 return kFALSE; 341 341 } … … 358 358 if (!branch) 359 359 { 360 *fLog << dbginf<< "Unable to create branch '" << cname << "'." << endl;360 *fLog << err << "Unable to create branch '" << cname << "'." << endl; 361 361 return kFALSE; 362 362 } … … 367 367 // 368 368 entry->SetBranch(branch); 369 *fLog << "Created Branch " << cname << " of " << cont->ClassName() << "." << endl;369 *fLog << inf << "Created Branch " << cname << " of " << cont->ClassName() << "." << endl; 370 370 } 371 371 return kTRUE; -
trunk/MagicSoft/Mars/mfileio/Makefile
r2178 r2556 35 35 MChain.cc \ 36 36 MReadTree.cc \ 37 MReadReports.cc \ 37 38 MReadCurrents.cc \ 38 39 MReadMarsFile.cc \ -
trunk/MagicSoft/Mars/mhist/HistLinkDef.h
r2527 r2556 10 10 #pragma link C++ class MHArray+; 11 11 #pragma link C++ class MH3+; 12 #pragma link C++ class MHVsTime+; 12 13 13 14 #pragma link C++ class MBinning+; -
trunk/MagicSoft/Mars/mhist/MFillH.cc
r2551 r2556 154 154 fParContainerName = par; 155 155 156 AddToBranchList(Form("%s.*", (const char*)ExtractName(hist))); 157 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 158 156 159 if (title) 157 160 return; … … 196 199 fParContainerName = par->GetName(); 197 200 201 AddToBranchList(Form("%s.*", (const char*)ExtractName(hist))); 202 AddToBranchList(Form("%s.*", par->GetName())); 203 198 204 if (!title) 199 205 fTitle = "Fill " + fHName + " from " + par->GetDescriptor(); … … 218 224 219 225 AddToBranchList(fH->GetDataMember()); 226 AddToBranchList(Form("%s.*", (const char*)ExtractName(par))); 220 227 221 228 if (title) … … 248 255 249 256 AddToBranchList(fH->GetDataMember()); 257 AddToBranchList(Form("%s.*", par->GetName())); 250 258 251 259 if (!title) -
trunk/MagicSoft/Mars/mhist/Makefile
r2526 r2556 33 33 MBinning.cc \ 34 34 MH.cc \ 35 MHVsTime.cc \ 35 36 MHArray.cc \ 36 37 MWeight.cc \ -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
r2470 r2556 105 105 // - MRawEvtData 106 106 // - MRawCrateArray 107 // - M RawEvtTime <MTime>107 // - MTime 108 108 // - MRawRunHeader 109 109 // if a container isn't found the eventloop is stopped. … … 154 154 } 155 155 156 f RawEvtTime = (MTime*)pList->FindObject("MRawEvtTime");157 if (!f RawEvtTime)158 { 159 *fLog << err << dbginf << "M RawEvtTime not found... aborting." << endl;156 fTime = (MTime*)pList->FindObject("MTime"); 157 if (!fTime) 158 { 159 *fLog << err << dbginf << "MTime not found... aborting." << endl; 160 160 return kFALSE; 161 161 } … … 186 186 // create data trees for the three types of data 187 187 // 188 fTData = new TTree("Events", "Normal Triggered Events");189 fTPedestal = new TTree("Ped Events","Pedestal Triggered Events");190 fTCalibration = new TTree("Cal Events", "Calibration Triggered Events");188 fTData = new TTree("Events", "Normal Triggered Events"); 189 fTPedestal = new TTree("Pedestals", "Pedestal Triggered Events"); 190 fTCalibration = new TTree("Calibration", "Calibration Triggered Events"); 191 191 192 192 // … … 213 213 // FIXME: Can we calculate a good buffer size out of the event size? 214 214 // using splitlevel=0 sppeds up writing by a factor of 5-10% 215 fTData ->Branch("MTime.", "MTime", &f RawEvtTime,32000);216 fTPedestal ->Branch("MTime.", "MTime", &f RawEvtTime,32000);217 fTCalibration->Branch("MTime.", "MTime", &f RawEvtTime,32000);215 fTData ->Branch("MTime.", "MTime", &fTime, 32000); 216 fTPedestal ->Branch("MTime.", "MTime", &fTime, 32000); 217 fTCalibration->Branch("MTime.", "MTime", &fTime, 32000); 218 218 fTData ->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000); 219 219 fTPedestal ->Branch("MRawEvtHeader.", "MRawEvtHeader", &fRawEvtHeader, 32000); -
trunk/MagicSoft/Mars/mraw/MRawFileWrite.h
r2207 r2556 21 21 MParList *pParList; 22 22 23 MTime *f RawEvtTime;23 MTime *fTime; 24 24 MRawRunHeader *fRawRunHeader; 25 25 MRawEvtHeader *fRawEvtHeader; -
trunk/MagicSoft/Mars/mreport/MReportCamera.h
r2553 r2556 10 10 class MCameraHV; 11 11 class MCameraLV; 12 class MCameraAUX; 12 13 class MCameraCalibration; 13 14 … … 20 21 MCameraCooling *fCooling; 21 22 MCameraLids *fLids; 23 MCameraAUX *fAUX; 22 24 MCameraHV *fHV; 23 25 MCameraLV *fLV; … … 27 29 Bool_t CheckTag(TString &str, const char *tag) const; 28 30 31 Bool_t InterpreteCamera(TString &str); 29 32 Bool_t InterpreteDC(TString &str); 30 33 Bool_t InterpreteHV(TString &str); -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2532 r2556 32 32 #include <fstream> 33 33 34 #include <TClass.h> 34 35 #include <TRegexp.h> 35 36 #include <THashTable.h> … … 55 56 56 57 public: 57 MReportHelp(MReport *rep) : fReport(rep), fNumReports(0) { } 58 MReportHelp(const char *name, MLog *fLog) : fReport(NULL), fNumReports(0) 59 { 60 TClass *cls = gROOT->GetClass(name); 61 Int_t rc = 0; 62 if (!cls) 63 rc =1; 64 else 65 { 66 if (!cls->Property()) 67 rc = 5; 68 if (!cls->Size()) 69 rc = 4; 70 if (!cls->IsLoaded()) 71 rc = 3; 72 if (!cls->HasDefaultConstructor()) 73 rc = 2; 74 } 75 76 if (rc) 77 { 78 *fLog << err << dbginf << "Cannot create new instance of class '" << name << "': "; 79 switch (rc) 80 { 81 case 1: 82 *fLog << "gROOT->GetClass() returned NULL." << endl; 83 return; 84 case 2: 85 *fLog << "no default constructor." << endl; 86 return; 87 case 3: 88 *fLog << "not loaded." << endl; 89 return; 90 case 4: 91 *fLog << "zero size." << endl; 92 return; 93 case 5: 94 *fLog << "no property." << endl; 95 return; 96 } 97 } 98 99 // 100 // create the parameter container of the the given class type 101 // 102 fReport = (MReport*)cls->New(); 103 } 104 ~MReportHelp() { if (fReport) delete fReport; } 105 58 106 const char *GetName() const { return fReport->GetIdentifier(); } 59 107 ULong_t GetNumReports() const { return fNumReports; } … … 113 161 } 114 162 115 Bool_t MReportFileRead::AddToList(MReport *rep) const 116 { 163 Bool_t MReportFileRead::AddToList(const char *name) const 164 { 165 MReportHelp *help = new MReportHelp(name, fLog); 166 167 MReport *rep = NULL; 168 if (!(rep=help->GetReport())) 169 return kFALSE; 170 117 171 if (GetReport(rep->GetIdentifier())) 118 172 { … … 120 174 *fLog << rep->GetIdentifier() << "' already added to the list... "; 121 175 *fLog << "ignored." << endl; 122 return kFALSE; 123 } 124 125 fList->Add(new MReportHelp(rep)); 176 delete help; 177 return kFALSE; 178 } 179 180 fList->Add(help); 126 181 return kTRUE; 127 182 } -
trunk/MagicSoft/Mars/mreport/MReportFileRead.h
r2523 r2556 40 40 ~MReportFileRead(); 41 41 42 Bool_t AddToList( MReport *rep) const;42 Bool_t AddToList(const char *name) const; 43 43 44 44 ClassDef(MReportFileRead, 0) // Task to read the raw data binary file -
trunk/MagicSoft/Mars/mreport/MReportTrigger.cc
r2520 r2556 36 36 using namespace std; 37 37 38 MReportTrigger::MReportTrigger() : MReport("TRIGGER-REPORT") 38 MReportTrigger::MReportTrigger() : MReport("TRIGGER-REPORT"), fPrescalerRates(19)//, fRates(11) 39 39 { 40 40 fName = "MReportTrigger"; … … 44 44 { 45 45 str = str.Strip(TString::kLeading); 46 Int_t pos = str.First(' '); 47 if (pos<=0) 46 47 const Int_t ws = str.First(' '); 48 if (ws<=0) 48 49 { 49 50 *fLog << err << "ERROR - Cannot determin name of trigger table." << endl; … … 51 52 } 52 53 53 TString tablename = str(0, pos);54 str.Remove(0, pos);54 TString tablename = str(0, ws); 55 str.Remove(0, ws); 55 56 56 57 Int_t len, n; 57 58 58 pos = 0;59 const char *pos = str.Data(); 59 60 for (int i=0; i<19; i++) 60 61 { 61 n = sscanf( str.Data()+pos, " %f %n", &fScalerRate[i], &len);62 n = sscanf(pos, " %f %n", &fPrescalerRates[i], &len); 62 63 if (n!=1) 63 64 { … … 67 68 pos += len; 68 69 } 69 n = sscanf(str.Data()+pos, " %f %f %n", &fL1TriggerRate, 70 &fL2TriggerRate, &len); 70 n = sscanf(pos, " %f %f %n", &fL2BeforePrescaler, &fL2AfterPrescaler, &len); 71 71 if (n!=2) 72 72 { … … 77 77 for (int i=0; i<11; i++) 78 78 { 79 n = sscanf(str.Data()+pos, " %f %n", &fRates[i], &len); 79 Float_t dummy; 80 n = sscanf(pos, " %f %n", &dummy/*fRates[i]*/, &len); 80 81 if (n!=1) 81 82 { … … 85 86 pos += len; 86 87 } 87 str.Remove(0, pos );88 str.Remove(0, pos-str.Data()); 88 89 str.Strip(TString::kBoth); 89 90 *fLog << "T" << flush;91 90 92 91 return str==(TString)"OVER"; -
trunk/MagicSoft/Mars/mreport/MReportTrigger.h
r2520 r2556 6 6 #endif 7 7 8 #ifndef ROOT_TArrayF 9 #include <TArrayF.h> 10 #endif 11 8 12 class MReportTrigger : public MReport 9 13 { 10 14 private: 11 Float_t fScalerRate[19]; 12 Float_t fL1TriggerRate; 13 Float_t fL2TriggerRate; 14 Float_t fRates[13]; 15 Float_t fL2BeforePrescaler; // L2 trigger rate before prescaler 16 Float_t fL2AfterPrescaler; // L2 trigger rate before prescaler 17 18 TArrayF fPrescalerRates; //[Hz] L2 prescaler rates 19 //TArrayF fRates; //[Hz] curently undefined 15 20 16 21 public: … … 19 24 Bool_t InterpreteBody(TString &str); 20 25 21 ClassDef(MReportTrigger, 0) // Base class for control reports26 ClassDef(MReportTrigger, 1) // Base class for control reports 22 27 }; 23 28
Note:
See TracChangeset
for help on using the changeset viewer.