Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FillHvFromSingles.h

Go to the documentation of this file.
00001 
00002 #ifndef FILLHVFROMSINGLES_H
00003 #define FILLHVFROMSINGLES_H
00004    
00005 #include "JobControl/JobCModule.h"
00006 #include "Conventions/Detector.h"   
00007 
00008 #include "TFile.h"
00009 #include "TTree.h"
00010 #include "TString.h"
00011   
00012 #include "RawReadout.h"
00013 
00014 #include <vector>
00015 using std::vector;
00016 
00017 class JobCommand;
00018 class MomNavigator;
00019 
00020 class FillHvFromSingles : public JobCModule, public TObject
00021 {
00022    
00023 public:
00024    
00025   FillHvFromSingles();
00026   ~FillHvFromSingles();
00027   void BeginJob();
00028   JobCResult Get(MomNavigator* mom);
00029   //JobCResult Ana(const MomNavigator* mom);
00030   const Registry& DefaultConfig() const;
00031   void Config(const Registry& r);
00032   void HandleCommand(JobCommand* command);
00033   void EndJob();
00034 
00035 private:
00036  
00037   Int_t fBegTime;
00038   Int_t fEndTime;
00039   Int_t fRecord;
00040   Int_t fCounter;
00041   Int_t fWriteEntries;
00042   Int_t fReadEntries;
00043   Int_t fTask;
00044 
00045   Int_t fCurrColdChipsSM1;
00046   Int_t fCurrColdChipsSM2;
00047 
00048   Int_t fMinVaRate;
00049   Int_t fMinQieRate;
00050   Int_t fMaxColdChips;
00051 
00052   Int_t fWriteToDatabase;
00053   Int_t fReadFromDatabase;
00054   Int_t fWriteOutResults;
00055   Int_t fPruneShortEntries;
00056   Int_t fPruneMinTime;
00057   Int_t fPruneMinChips;
00058 
00059   TFile* fHvFile;
00060   TString fHvFileName;
00061   TTree* fHvTree;
00062  
00063   Int_t BegTime;
00064   Int_t EndTime;
00065   Int_t Source;
00066   Int_t Detector;
00067   Int_t Supermodule;
00068   Int_t HvStatus;
00069   Int_t ColdChips;
00070 
00071   vector<int> vecTimeSM1;
00072   vector<int> vecStatusSM1;
00073   vector<int> vecColdChipsSM1;
00074   vector<int> vecTimeSM2;
00075   vector<int> vecStatusSM2;
00076   vector<int> vecColdChipsSM2;
00077   Detector::Detector_t fDetector;
00078 
00079   void PrintResults();
00080 
00081   void ProcessBlock(TObject* obj);
00082 
00083   void PruneShortEntries(Int_t nSecs,Int_t nChips);
00084 
00085   void WriteToFile();
00086 
00087   void WriteToDatabase();
00088   void WriteToDatabase(Int_t begtime,
00089                        Int_t endtime, 
00090                        Detector::Detector_t detector, 
00091                        Int_t supermodule,
00092                        Int_t hvstatus,
00093                        Int_t coldchips);
00094 
00095   void ReadFromDatabase();
00096   void ReadFromDatabase(Int_t time, 
00097                         Detector::Detector_t detector, 
00098                         Int_t supermodule,
00099                         Int_t& hvstatus,
00100                         Int_t& coldchips);
00101 
00102   void WriteOutResults(Int_t source,
00103                        Int_t begtime,
00104                        Int_t endtime, 
00105                        Detector::Detector_t detector, 
00106                        Int_t supermodule,
00107                        Int_t hvstatus,
00108                        Int_t coldchips);    
00109 
00110   RawReadout* fRawReadout;
00111 
00112   ClassDef(FillHvFromSingles,1)
00113  
00114 };
00115  
00116 #endif

Generated on Mon Feb 15 11:06:42 2010 for loon by  doxygen 1.3.9.1