00001 00002 // $Id: LightInjector.h,v 1.2 2005/04/22 12:22:03 minoscvs Exp $ 00003 // 00004 // messier@huhepl.harvard.edu 00006 #ifndef LIGHTINJECTOR_H 00007 #define LIGHTINJECTOR_H 00008 #include "JobControl/JobCInputModule.h" 00009 #include "Persistency/Per.h" 00010 00011 #include <TFile.h> 00012 #include <TH1.h> 00013 00014 #include "Validity/VldContext.h" 00015 #include "Plex/PlexHandle.h" 00016 00017 class LightInjector : public JobCInputModule { 00018 00019 public: 00020 LightInjector(); 00021 ~LightInjector(); 00022 00023 // JobCModule interface 00024 void BeginJob(); 00025 const Registry& DefaultConfig() const; 00026 void Config(const Registry& r); 00027 00028 // JobCInputModule interface 00029 00030 00031 using JobCModule::Get; // Stop compile errors: 00032 00033 Int_t GetCurrentRun() const { return fCurrentRun; }; 00034 Int_t GetCurrentSnarl() const { return fCurrentSnarl; }; 00035 00036 JobCResult Get(); 00037 00038 JobCResult Next(int n=1); 00039 JobCResult Prev(int n=1); 00040 JobCResult GoTo(int run, int snarl, int searchDir=0); 00041 00042 JobCResult Ana(const MomNavigator* mom); 00043 JobCResult GoTo(const VldContext& ) { return this->Get();}; 00044 //void List(const char* streamlist = "*") const; 00045 //void AddFile(const char *filename, const char* streamlist = "*",int at = -1); 00046 //void RemoveFile(const char* filename, const char* streamlist = "*"); 00047 //JobCResult NextFile(int n=1, const char* streamlist = "*"); 00048 //JobCResult PrevFile(int n=1, const char* streamlist = "*"); 00049 //JobCResult GoToFile(int i, const char* streamlist = "*"); 00050 //JobCResult GoToFile(const char* filename, const char* streamlist = "*"); 00051 00052 //void DefineStream(const char* stream, const char* tree); 00053 //void Select(const char* stream, const char* select, bool isRequired = false); 00054 //void SetSequenceMode(const char* stream, 00055 // Per::ESequenceMode sequenceMode = Per::kKey); 00056 00057 private: 00058 // Config: 00059 Int_t fDetector; 00060 Double_t fRate; 00061 Int_t fDate; 00062 Int_t fTime; 00063 Int_t fPlane; 00064 Int_t fStrip; 00065 Int_t fEnd; 00066 Double_t fPulseHeight; 00067 Double_t fPulseWidth; 00068 00069 // When and where the pulse happens: 00070 VldTimeStamp fPulseTime; 00071 VldContext fContext; 00072 PlexStripEndId fPulseSeid; 00073 00074 // For analysis: 00075 static PlexPixelSpotId fPsid; 00076 static TFile* fFile; 00077 static TH1* fHisto[65]; // One for each pixel. 00078 00079 int fCurrentRun; // Run number. 00080 int fCurrentSnarl; // Current snarl number 00081 }; 00082 00083 #endif // LIGHTINJECTOR_H 00084
1.3.9.1