ARA ROOT Test BEd Software

AraEvent/UsefulAtriStationEvent.cxx

00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 #include "UsefulAtriStationEvent.h"
00011 #include "AraEventCalibrator.h"
00012 #include "FFTtools.h"
00013 #include "AraGeomTool.h"
00014 #include "TH1.h"
00015 #include <iostream>
00016 #include <fstream>
00017 #include <cstring>
00018 ClassImp(UsefulAtriStationEvent);
00019 
00020 AraEventCalibrator *fCalibrator;
00021 
00022 UsefulAtriStationEvent::UsefulAtriStationEvent() 
00023 {
00024    //Default Constructor
00025   fNumChannels=0;
00026   fCalibrator=0;
00027 }
00028 
00029 UsefulAtriStationEvent::~UsefulAtriStationEvent() {
00030    //Default Destructor
00031   fNumChannels=0;
00032   fCalibrator=0;
00033 }
00034 
00035 UsefulAtriStationEvent::UsefulAtriStationEvent(RawAtriStationEvent *rawEvent, AraCalType::AraCalType_t calType)
00036  :RawAtriStationEvent(*rawEvent)
00037 {
00038   fCalibrator=AraEventCalibrator::Instance();
00039   fNumChannels=0;
00040   fCalibrator->calibrateEvent(this,calType);
00041 }
00042 
00043 
00044 TGraph *UsefulAtriStationEvent::getGraphFromElecChan(int chanId)
00045 {
00046   std::map< Int_t, std::vector <Double_t> >::iterator timeMapIt;
00047   timeMapIt=fTimes.find(chanId);
00048   if(timeMapIt==fTimes.end()) {
00049     // This channel doesn't exist. We don't return a null pointer,
00050     // we return an empty graph.
00051     return new TGraph;
00052   }
00053   
00054   TGraph *gr = new TGraph(fTimes[chanId].size(),&(fTimes[chanId][0]),&(fVolts[chanId][0]));
00055   return gr;
00056 }
00057 
00058 TGraph *UsefulAtriStationEvent::getGraphFromRFChan(int chan)
00059 {
00060   return getGraphFromElecChan(chan);
00061   std::cerr << "Error calling UsefulAtriStationEvent::getGraphFromRFChan()\n";
00062   return NULL;
00063 }

Generated on Wed Aug 8 16:20:07 2012 for ARA ROOT Test Bed Software by doxygen 1.4.7