Changeset 705 for trunk/MagicSoft
- Timestamp:
- 03/27/01 15:52:41 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/getCollArea.C
r689 r705 15 15 16 16 17 MReadTree reader( filename ,"Events" ) ;17 MReadTree reader( "Events", filename) ; 18 18 tasklist->AddToList( &reader ) ; 19 19 -
trunk/MagicSoft/Mars/macros/readMagic.C
r700 r705 13 13 plist->AddToList(&tlist); 14 14 15 MReadTree read("oscar_protons.root", "Events") ; 15 MReadTree read("Events", "oscar_protons.root"); 16 MReadTree read.AddFile("test.root"); 16 17 MCerPhotCalc ncalc; 17 18 MImgCleanStd clean; … … 37 38 { 38 39 cout << "Event: " << icount++ << endl ; 39 40 if (icount < 45 )41 continue;42 40 43 41 ncalc.Process(); -
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
r698 r705 14 14 #include "MParList.h" 15 15 #include "MCerPhotEvt.h" 16 #include "M CT1Pedestals.h"16 #include "MPedestalCam.h" 17 17 18 18 ClassImp(MCT1ReadAscii) … … 57 57 // look for the pedestal class in the plist 58 58 // 59 fPedest = (M CT1Pedestals*)pList->FindCreateObj("MCT1Pedestals");59 fPedest = (MPedestalCam*)pList->FindCreateObj("MPedestalCam"); 60 60 if (!fPedest) 61 61 return kFALSE; 62 62 63 fPedest->InitSize(127); 64 63 65 return kTRUE; 66 } 67 68 void MCT1ReadAscii::ReadPedestals() 69 { 70 *fLog << "MCT1Pedestals::AsciiRead: Reading Pedestals..." << endl; 71 72 // 73 // skip the next 4 values 74 // 75 Float_t val; 76 77 *fIn >> val; 78 *fIn >> val; 79 *fIn >> val; 80 *fIn >> val; 81 82 // 83 // read in the next 127 numbers as the pedestals 84 // 85 for (Int_t i = 0; i<127; i++) 86 { 87 *fIn >> val; 88 89 if (val > 0.0) 90 (*fPedest)[i].SetSigma(val); 91 } 92 } 93 94 void MCT1ReadAscii::ReadData() 95 { 96 // 97 // clear the list of cerphot-events 98 // 99 fNphot->Clear(); 100 101 // 102 // five unsused numbers 103 // 104 Int_t val; 105 106 *fIn >> val; // ener 107 *fIn >> val; // zenang 108 *fIn >> val; // sec1 109 *fIn >> val; // sec2 110 111 // 112 // read in the number of cerenkov photons and add the 'new' pixel 113 // too the list with it's id, number of photons and error 114 // 115 for (Int_t i = 0; i<127; i++ ) 116 { 117 Float_t nphot; 118 119 *fIn >> nphot; 120 121 if (nphot > 0.0) 122 fNphot->AddPixel(i, nphot, (*fPedest)[i].GetSigma()); 123 } 124 64 125 } 65 126 … … 74 135 75 136 // 76 // read in a dummy number (event number)137 // read in the event nr 77 138 // 78 Int_t dummyI;79 *fIn >> dummyI;139 Int_t evtnr; 140 *fIn >> evtnr; 80 141 81 142 // … … 89 150 // read in pedestals 90 151 // 91 if (dummyI < 0) 92 fPedest->AsciiRead(*fIn); 152 // FIXME! Set InputStreamID 93 153 94 // 95 // five unsused numbers 96 // 97 *fIn >> dummyI; // ener 98 *fIn >> dummyI; // zenang 99 *fIn >> dummyI; // sec1 100 *fIn >> dummyI; // sec2 154 if (evtnr < 0) 155 { 156 ReadPedestals(); 157 return kCONTINUE; 158 } 101 159 102 // 103 // clear the list of cerphot-events 104 // 105 fNphot->Clear(); 106 107 // 108 // read in the number of cerenkov photons and add the 'new' pixel 109 // too the list with it's id, number of photons and error 110 // 111 for (Int_t i = 0; i<127; i++ ) 112 { 113 Float_t nphot; 114 115 *fIn >> nphot; 116 117 if (nphot > 0.0) 118 fNphot->AddPixel(i, nphot, (*fPedest)[i]); 119 } 160 ReadData(); 120 161 121 162 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h
r698 r705 7 7 8 8 class MCerPhotEvt; 9 class M CT1Pedestals;9 class MPedestalCam; 10 10 11 11 class MCT1ReadAscii : public MTask 12 12 { 13 13 private: 14 TString fFileName; //! the file name of the string 15 ifstream *fIn; //! the inputfile 16 MCerPhotEvt *fNphot; //! the data container for all data. 17 MCT1Pedestals *fPedest; //! ct1 pedestals 14 TString fFileName; //! the file name of the string 15 ifstream *fIn; //! the inputfile 16 MCerPhotEvt *fNphot; //! the data container for all data. 17 MPedestalCam *fPedest; //! ct1 pedestals 18 19 void ReadPedestals(); 20 void ReadData(); 18 21 19 22 public: -
trunk/MagicSoft/Mars/manalysis/Makefile
r698 r705 28 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 29 29 30 SRCFILES = MCT1Pedestals.cc \ 31 MCT1ReadAscii.cc \ 30 SRCFILES = MCT1ReadAscii.cc \ 32 31 MPedestalCam.cc \ 33 32 MPedestalPix.cc \ -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r604 r705 4 4 #pragma link off all classes; 5 5 #pragma link off all functions; 6 7 #pragma link C++ global kCONTINUE; 8 #pragma link C++ global kGAMMA; 9 #pragma link C++ global kPROTON; 10 #pragma link C++ global kHELIUM; 11 #pragma link C++ global kOXIGEN; 12 #pragma link C++ global kIRON; 13 #pragma link C++ global kPI; 14 #pragma link C++ global kRad2Deg; 6 15 7 16 #pragma link C++ global gLog; -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r698 r705 53 53 // 54 54 #ifndef __CINT__ 55 #define dbginf 55 #define dbginf __FILE__ << " l." << __LINE__ << ": " 56 56 #endif 57 57 // … … 63 63 // 64 64 #ifndef __CINT__ 65 #define DEBUG(lvl) 65 #define DEBUG(lvl) flush << debug(lvl) << dbginf 66 66 #endif 67 67 -
trunk/MagicSoft/Mars/mbase/MParList.cc
r698 r705 21 21 22 22 #include "MLog.h" 23 #include "MLogManip.h" 23 24 24 25 ClassImp(MParList) … … 91 92 if (fContainer.FindObject(obj)) 92 93 { 93 *fLog << "WARNING: MParList::add:Container already added" << endl;94 *fLog << dbginf << "Container already added" << endl; 94 95 return kTRUE; 95 96 } … … 103 104 if (!fContainer.FindObject(where)) 104 105 { 105 *fLog << "ERROR: MParList::add:Cannot find parameter container after which the new one should be added!" << endl;106 *fLog << dbginf << "Cannot find parameter container after which the new one should be added!" << endl; 106 107 return kFALSE; 107 108 } … … 139 140 // if object is not existing in the list try to create one 140 141 // 141 *fLog << "MParList::CreateObject - Warning:'" << name << "' not found... creating." << endl;142 *fLog << dbginf << "'" << name << "' not found... creating." << endl; 142 143 143 144 // … … 151 152 // if class is not existing in the root environment 152 153 // 153 *fLog << "MParList::CreateObject - Warning:Class '" << name << "' not existing in dictionary." << endl;154 *fLog << dbginf << "Class '" << name << "' not existing in dictionary." << endl; 154 155 return NULL; 155 156 } … … 175 176 // print some information about the current status of MParList 176 177 // 177 *fLog << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;178 *fLog << dbginf << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl; 178 179 *fLog << endl; 179 180 -
trunk/MagicSoft/Mars/mbase/MReadTree.h
r698 r705 7 7 8 8 class TFile; 9 class T Tree;9 class TChain; 10 10 11 11 class MReadTree : public MTask … … 13 13 private: 14 14 TFile *fFile; // Pointer to file 15 T Tree *fTree;// Pointer to tree15 TChain *fChain; // Pointer to tree 16 16 17 17 UInt_t fNumEntry; // Number of actual entry 18 18 UInt_t fNumEntries; // Number of Events in Tree 19 19 20 TString fFileName; // Name of File21 TString fTreeName; // Name of Tree22 23 20 public: 24 MReadTree(const char *filename, const char *treename, const char *name=NULL, const char *title=NULL); 21 MReadTree(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL); 22 ~MReadTree(); 25 23 26 24 Bool_t PreProcess(MParList *pList); 27 25 Bool_t Process(); 28 26 Bool_t PostProcess(); 27 28 void AddFile(const char *fname); 29 29 30 30 Bool_t GetEvent() ; … … 33 33 Bool_t IncEventNum(UInt_t inc=1); // increase number of event (position in tree) 34 34 Bool_t SetEventNum(UInt_t nr); // set number of event (position in tree) 35 UInt_t GetEventNum() {return fNumEntry;} 36 UInt_t GetEntries() {return fNumEntries;} 35 36 UInt_t GetEventNum() const { return fNumEntry; } 37 UInt_t GetEntries() const { return fNumEntries; } 37 38 38 39 ClassDef(MReadTree, 0) // Reads one tree -
trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.cc
r698 r705 74 74 plist.AddToList(&tasks); 75 75 76 MReadTree readin ( inputfile, treeName ) ;76 MReadTree readin ( treeName, inputfile ) ; 77 77 tasks.AddToList( &readin ) ; 78 78 -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
r698 r705 52 52 53 53 54 fReadTree = new MReadTree ( filename, treename ) ;54 fReadTree = new MReadTree ( treename, filename ) ; 55 55 fReadTree->PreProcess( pList ) ; 56 56
Note:
See TracChangeset
for help on using the changeset viewer.