Changeset 450 for trunk/MagicSoft
- Timestamp:
- 11/14/00 17:15:40 (24 years ago)
- Location:
- trunk/MagicSoft/MarsOctober/mocttest
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/MarsOctober/mocttest/BaseLinkDef.h
r447 r450 8 8 9 9 #pragma link C++ class MHistosAdc ; 10 #pragma link C++ class MHistosTdc ; 10 11 #pragma link C++ class MAdcSpect ; 12 #pragma link C++ class MTdcSpect ; 11 13 #pragma link C++ class MShowSpect ; 12 14 -
trunk/MagicSoft/MarsOctober/mocttest/MGOctMain.cc
r447 r450 39 39 // 40 40 41 fFrameTop = new TGCompositeFrame (this, 300,100, kHorizontalFrame ) ; 42 43 fButEvtDisp = new TGTextButton(fFrameTop, "EventDisplay", M_BUTTON_EVTDISP ); 41 fFrameTop = new TGCompositeFrame (this, 300,100, kVerticalFrame ) ; 42 43 fTop1 = new TGHorizontalFrame (fFrameTop, 300, 100 ) ; 44 45 fButEvtDisp = new TGTextButton(fTop1, "EventDisplay", M_BUTTON_EVTDISP ); 44 46 fButEvtDisp->Associate(this) ; 45 fFrameTop->AddFrame (fButEvtDisp, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 46 47 fButPedADC = new TGTextButton(fFrameTop, "ADC Spectra of Pedestals", M_BUTTON_PEDADC ); 47 fTop1->AddFrame (fButEvtDisp, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 48 49 fFrameTop->AddFrame (fTop1, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 50 51 52 fTop2 = new TGHorizontalFrame (fFrameTop, 300, 100 ) ; 53 54 fButPedADC = new TGTextButton(fTop2, "ADC Spectra of Pedestals", M_BUTTON_PEDADC ); 48 55 fButPedADC->Associate(this) ; 49 f FrameTop->AddFrame (fButPedADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );50 51 fButCrADC = new TGTextButton(f FrameTop, "ADC Specta of Cosmics", M_BUTTON_CRADC );56 fTop2->AddFrame (fButPedADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 57 58 fButCrADC = new TGTextButton(fTop2, "ADC Specta of Cosmics", M_BUTTON_CRADC ); 52 59 fButCrADC->Associate(this) ; 53 fFrameTop->AddFrame (fButCrADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 60 fTop2->AddFrame (fButCrADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 61 62 fFrameTop->AddFrame (fTop2, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 63 64 65 fTop3 = new TGHorizontalFrame (fFrameTop, 300, 100 ) ; 66 67 fButPedTDC = new TGTextButton(fTop3, "TDC Spectra of Pedestals", M_BUTTON_PEDTDC ); 68 fButPedTDC->Associate(this) ; 69 fTop3->AddFrame (fButPedTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 70 71 fButCrTDC = new TGTextButton(fTop3, "TDC Specta of Cosmics", M_BUTTON_CRTDC ); 72 fButCrTDC->Associate(this) ; 73 fTop3->AddFrame (fButCrTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 74 75 fFrameTop->AddFrame (fTop3, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 76 54 77 55 78 … … 259 282 260 283 fOctober.CrAdcSpectra(fInputFile) ; 284 285 break ; 286 287 case M_BUTTON_PEDTDC: 288 289 if ( InputFileSelected() == kFALSE ) { // it is not selected 290 291 new TGMsgBox(fClient->GetRoot(), this, "ERROR!", 292 "No Input (root) File selected!", kMBIconExclamation, buttons, &retval); 293 break ; 294 } 295 296 fOctober.PedTdcSpectra(fInputFile) ; 297 298 break ; 299 300 case M_BUTTON_CRTDC: 301 302 if ( InputFileSelected() == kFALSE ) { // it is not selected 303 304 new TGMsgBox(fClient->GetRoot(), this, "ERROR!", 305 "No Input (root) File selected!", kMBIconExclamation, buttons, &retval); 306 break ; 307 } 308 309 fOctober.CrTdcSpectra(fInputFile) ; 261 310 262 311 break ; -
trunk/MagicSoft/MarsOctober/mocttest/MGOctMain.h
r447 r450 33 33 M_BUTTON_PEDADC, 34 34 M_BUTTON_CRADC, 35 M_BUTTON_PEDTDC, 36 M_BUTTON_CRTDC, 35 37 36 38 M_PBUTTON_CDIR_UP, … … 63 65 TGTab *fTab ; // different tabs in the low window 64 66 67 // the horizontal frame in the top part 68 69 TGHorizontalFrame *fTop1, *fTop2, *fTop3 ; 70 65 71 // the buttons in the Top Part 66 72 67 73 TGTextButton *fButEvtDisp ; 68 74 TGTextButton *fButPedADC, *fButCrADC ; 75 TGTextButton *fButPedTDC, *fButCrTDC ; 69 76 70 77 // the things in the file selector -
trunk/MagicSoft/MarsOctober/mocttest/MOctTest.cc
r447 r450 88 88 tasks->AddToList(fillAdc, "PedTree"); 89 89 90 MShowSpect *showAdc = new MShowSpect ( ) ;90 MShowSpect *showAdc = new MShowSpect ("MHistosAdc") ; 91 91 tasks->AddToList(showAdc, "PedTree"); 92 92 … … 185 185 tasks->AddToList(fillAdc, "EvtTree"); 186 186 187 MShowSpect *showAdc = new MShowSpect ( ) ;187 MShowSpect *showAdc = new MShowSpect ("MHistosAdc") ; 188 188 tasks->AddToList(showAdc, "PedTree"); 189 189 … … 213 213 return ( kTRUE ) ; 214 214 } 215 216 217 218 Bool_t MOctTest::PedTdcSpectra ( Char_t *inputfile ) 219 { 220 // 221 // 222 223 printf ("PedTdcSpectra:: Analyse the file %s \n", inputfile ) ; 224 225 // create a loop for this specific job. 226 227 MEvtLoop loop ; 228 229 // open input file 230 231 MRootFile *fileIn = new MRootFile( inputfile ); 232 233 // set up the ParameterList, 234 // connect it to the loop 235 236 MParList *plist = new MParList; 237 loop.SetParList(plist); 238 239 // set up the TaskList for this program 240 // and connect it to the loop 241 242 MTaskList *tasks = new MTaskList; 243 tasks->SetEventType("PedTree") ; 244 245 loop.SetTaskList(tasks); 246 247 // now set up all parameter(data) containers and put them 248 // in the parameter list 249 250 // the buffer for the RawEvts, here for the Pedestals 251 252 MObjBuffer *pedbuf = new MObjBuffer(new MRawEvt("PedTree")); /* this buffer contains 253 * only one entry 254 */ 255 pedbuf->SetAsInput(fileIn); 256 plist->AddToList(pedbuf); 257 258 // now it is neccessary to define the input stream, that means 259 // we set the input only to PedTree 260 261 MInputStreamID *inputStream = new MInputStreamID() ; 262 inputStream->SetEvtType("PedTree") ; 263 plist->AddToList(inputStream); 264 265 // 266 // the data container for the histograms 267 268 MHistosTdc *his = new MHistosTdc; 269 270 plist->AddToList(his); 271 272 // his->SetAsOutput(); 273 // This tells the writer that this is an Output Container, which should 274 // be written to a file ( not working yet) 275 276 277 // set up the tasks and add them to the list 278 279 MParRead *readin = new MParRead; 280 tasks->AddToList(readin, "PedTree"); 281 282 MTdcSpect *fillTdc = new MTdcSpect ("PedTree" ) ; 283 tasks->AddToList(fillTdc, "PedTree"); 284 285 MShowSpect *showTdc = new MShowSpect ("MHistosTdc") ; 286 tasks->AddToList(showTdc, "PedTree"); 287 288 // MParWrite *write = new MParWrite; 289 // tasks->AddToList(write); 290 291 cout << endl; 292 293 // 294 // Print the structure of the parameter list plist 295 // 296 tasks->Print(); 297 298 cout << endl; 299 300 ////////////////////////////////////////////////////////////// 301 // 302 // call the event loop for 5000 Events 303 // 304 305 loop.Eventloop (500); 306 307 cout << endl << "THE END." << endl ; 308 309 310 311 return ( kTRUE ) ; 312 } 313 314 315 316 Bool_t MOctTest::CrTdcSpectra ( Char_t *inputfile ) 317 { 318 // 319 // 320 321 printf ("CrTdcSpectra:: Analyse the file %s \n", inputfile ) ; 322 323 // create a loop for this specific job. 324 325 MEvtLoop loop ; 326 327 // open input file 328 329 MRootFile *fileIn = new MRootFile( inputfile ); 330 331 // set up the ParameterList, 332 // connect it to the loop 333 334 MParList *plist = new MParList; 335 loop.SetParList(plist); 336 337 // set up the TaskList for this program 338 // and connect it to the loop 339 340 MTaskList *tasks = new MTaskList; 341 tasks->SetEventType("EvtTree") ; 342 343 loop.SetTaskList(tasks); 344 345 // now set up all parameter(data) containers and put them 346 // in the parameter list 347 348 // the buffer for the RawEvts, here for the Pedestals 349 350 MObjBuffer *pedbuf = new MObjBuffer(new MRawEvt("EvtTree")); /* this buffer contains 351 * only one entry 352 */ 353 pedbuf->SetAsInput(fileIn); 354 plist->AddToList(pedbuf); 355 356 // now it is neccessary to define the input stream, that means 357 // we set the input only to PedTree 358 359 MInputStreamID *inputStream = new MInputStreamID() ; 360 inputStream->SetEvtType("EvtTree") ; 361 plist->AddToList(inputStream); 362 363 // 364 // the data container for the histograms 365 366 MHistosTdc *his = new MHistosTdc; 367 368 plist->AddToList(his); 369 370 // his->SetAsOutput(); 371 // This tells the writer that this is an Output Container, which should 372 // be written to a file ( not working yet) 373 374 375 // set up the tasks and add them to the list 376 377 MParRead *readin = new MParRead; 378 tasks->AddToList(readin, "EvtTree"); 379 380 MTdcSpect *fillTdc = new MTdcSpect ("EvtTree" ) ; 381 tasks->AddToList(fillTdc, "EvtTree"); 382 383 MShowSpect *showTdc = new MShowSpect ("MHistosTdc") ; 384 tasks->AddToList(showTdc, "EvtTree"); 385 386 // MParWrite *write = new MParWrite; 387 // tasks->AddToList(write); 388 389 cout << endl; 390 391 // 392 // Print the structure of the parameter list plist 393 // 394 tasks->Print(); 395 396 cout << endl; 397 398 ////////////////////////////////////////////////////////////// 399 // 400 // call the event loop for 5000 Events 401 // 402 403 loop.Eventloop (5000); 404 405 cout << endl << "THE END." << endl ; 406 407 408 409 return ( kTRUE ) ; 410 } -
trunk/MagicSoft/MarsOctober/mocttest/MOctTest.h
r447 r450 17 17 #include "MParWrite.h" 18 18 #include "MAdcSpect.h" 19 #include "MTdcSpect.h" 19 20 #include "MShowSpect.h" 20 21 #include "MTaskList.h" 21 22 #include "MHistosAdc.h" 23 #include "MHistosTdc.h" 22 24 #include "MObjBuffer.h" 23 25 #include "MFile.h" … … 37 39 Bool_t PedAdcSpectra( Char_t *inputFile ) ; 38 40 Bool_t CrAdcSpectra ( Char_t *inputFile ) ; 41 42 Bool_t PedTdcSpectra( Char_t *inputFile ) ; 43 Bool_t CrTdcSpectra ( Char_t *inputFile ) ; 39 44 40 45 -
trunk/MagicSoft/MarsOctober/mocttest/MShowSpect.cc
r447 r450 24 24 ClassImp(MShowSpect) 25 25 26 MShowSpect::MShowSpect( )26 MShowSpect::MShowSpect(char *nameHist ) 27 27 { 28 28 // default constructor 29 30 sprintf (fHistName, "%s", nameHist ) ; 29 31 } 30 32 … … 38 40 // 39 41 40 fHists = (MHistosAdc*) pList->FindObject( "MHistosAdc");42 fHists = (MHistosAdc*) pList->FindObject( fHistName ); 41 43 42 44 if (!fHists) 43 45 { 44 cout << "ERROR: MShowSpect::PreProc(): MHistosAdcnot found!" << endl;46 cout << "ERROR: MShowSpect::PreProc(): " << fHistName << " not found!" << endl; 45 47 exit(1); 46 48 } -
trunk/MagicSoft/MarsOctober/mocttest/MShowSpect.h
r447 r450 11 11 12 12 class MHistosAdc; 13 class MHistosTdc; 13 14 class MParList ; 14 15 … … 16 17 { 17 18 private: 19 char fHistName[256] ; 20 18 21 MHistosAdc *fHists; // Pointer to Container with the histograms 19 22 20 23 public: 21 MShowSpect();22 24 23 Bool_t PreProcess(MParList * pList); 25 MShowSpect(char* histName ); 26 27 Bool_t PreProcess(MParList * pList); 24 28 Bool_t PostProcess(); 25 29 … … 28 32 29 33 #endif 34 35 36 -
trunk/MagicSoft/MarsOctober/mocttest/Makefile
r447 r450 55 55 MOctTest.cc \ 56 56 MHistosAdc.cc \ 57 MHistosTdc.cc \ 57 58 MAdcSpect.cc \ 59 MTdcSpect.cc \ 58 60 MShowSpect.cc \ 59 61 MGDisplayAdc.cc
Note:
See TracChangeset
for help on using the changeset viewer.