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

FillNearRunQuality.h

Go to the documentation of this file.
00001 #ifndef FILLNEARRUNQUALITY_H
00002 #define FILLNEARRUNQUALITY_H
00003 
00004 #include "JobControl/JobCModule.h"
00005 
00006 #include "RawData/RawChannelId.h"
00007 
00008 #include "TFile.h"
00009 #include "TTree.h"
00010 #include "TString.h"
00011 
00012 #include "NearReadout.h"
00013 
00014 //
00015 // NOTE: 
00016 // The variables followed by '//db'
00017 // are those written in the database
00018 // and the root file.
00019 //
00020 
00021 class MomNavigator;      
00022 
00023 class FillNearRunQuality : public JobCModule
00024 {
00025 public:
00026 
00027   FillNearRunQuality();
00028   ~FillNearRunQuality();
00029   void BeginJob();              
00030   JobCResult Ana(const MomNavigator *mom); 
00031   const Registry& DefaultConfig() const;
00032   void Config(const Registry &r);
00033   void EndJob();                           
00034 
00035 private:
00036 
00037   void WriteToDatabase();
00038   void ReadFromDatabase();
00039   void WriteOutDatabaseVariables();
00040   void WriteOutFile();
00041   void PrepareRow();
00042 
00043   void ProcessHeader(TObject* obj);
00044   void ProcessBlock(TObject* obj);
00045 
00046   void EndSubRun();
00047   void WriteSubRun();
00048 
00049   void Reset();
00050 
00051   const Int_t NbConnMindersSpec;
00052   const Int_t NbConnMenusSpec;
00053   const Int_t NbConnMindersCal;
00054   const Int_t NbConnMenusCal;
00055 
00056   // Dbi Task Number
00057   // ---------------
00058   Int_t fDbiTaskNear;
00059 
00060   // Outputs (file or DB)
00061   //---------------------
00062   Int_t fWriteOutDatabaseVariables;
00063   Int_t fWriteToDatabase;
00064   Int_t fReadFromDatabase;
00065 
00066   TFile* fDatabaseFile;
00067   TTree* fDatabaseTree;
00068 
00069   TString fName;
00070   TString fOutputLocation;
00071 
00072   Int_t fRunElements[11];
00073   Int_t fGoodRun;
00074 
00075   // Parameters
00076   //-----------
00077   Int_t fCapidErrorCut;
00078   Int_t fParityErrorCut;
00079   Int_t fMiscountErrorCut;
00080   Int_t fPriorTruncErrorCut;
00081   Int_t fSameMenuErrorCut;
00082   Int_t fSharedMinderErrorCut;
00083   Int_t fTransfMinderErrorCut;
00084   Int_t fHighAdcCut;
00085   Int_t fHotLimitCal;
00086   Int_t fHotLimitSpec;  
00087   Int_t fColdLimitCal;
00088   Int_t fColdLimitSpec;  
00089   Int_t fTimeframeArrayCounter;
00090 
00091   // Counters
00092   //---------
00093   Int_t fRecCounter;
00094   Int_t fCounter;
00095   Int_t fGoodCounter;
00096   Int_t fSnarls;
00097   Int_t fGoodSnarls;
00098   Int_t fTimeFrames;
00099   Int_t fSnarlRateMin;//db
00100   Int_t fSnarlRateMax;//db
00101   Float_t fSnarlRateMean;//db
00102   Float_t fSnarlRateMedian;//db
00103   Int_t* fSnarlRates;
00104   Int_t fTriggersPlane;//db
00105   Int_t fTriggersActivity;//db
00106   Int_t fTriggersSpill;//db
00107 
00108 
00109   // from the header blocks
00110   //-----------------------
00111   Int_t fRun;//db
00112   Int_t fSubRun;//db
00113   Int_t fRunType;
00114   Int_t fTime; 
00115   Int_t fTimeFrame;
00116   Int_t fSnarl;
00117   Int_t fTrigSrc; 
00118   Int_t fDigits;
00119 
00120   Int_t fPhysicsRun;   //db 
00121   Int_t fModifiedRun;//db
00122   Int_t fTestRun;//db
00123   Int_t fStartTime;//db
00124   Int_t fEndTime;//db
00125   Int_t fSubrunLength;//db
00126 
00127   // from the data blocks
00128   //---------------------
00129   Int_t fTrigBaseTime;
00130   Int_t fTrigTime;
00131   Int_t fRopMask;//db
00132   Int_t fTriggerMask;//db
00133   Int_t fRate;
00134   Int_t fCrate; 
00135   Int_t fMaster;
00136   Int_t fMinder;
00137   Int_t fMenu;
00138   Int_t fNearReadoutInt;
00139 
00140   Int_t fAdc;
00141   Int_t fTdc;
00142   Int_t fDeltatdc;
00143   Int_t fCratet0sec;
00144   Int_t fCratet0nsec;
00145   Int_t fDatatype;
00146   Int_t fErrorcode;
00147   
00148   NearReadout* fNearReadout;
00149 
00150   Int_t fMinTdc;
00151   Int_t fMaxTdc;
00152 
00153   // tpsingles indicators
00154   //---------------------
00155   Int_t fNbCratesReadout;
00156   Int_t fNTimeframesBadCrates;
00157   Int_t fMaxNbColdMindersCal;//db
00158   Int_t fMaxNbColdMindersSpec;//db
00159   Int_t fMaxNbColdCrates;//db
00160   Int_t fMaxNbColdMenusCal;//db
00161   Int_t fMaxNbColdMenusSpec;//db
00162   Int_t fMaxNbHotMenusSpec;//db
00163   Int_t fMaxNbHotMenusCal;//db
00164   enum fInstrumType_t{
00165     kSpectrometer = 0,
00166     kCalorimeter = 1,
00167     kError = 3
00168   };
00169   fInstrumType_t fInstrumType;
00170   
00171   Int_t arrayColdMindersCal[8][16][8];
00172   Int_t arrayColdMindersSpec[8][16][8];
00173   Int_t* arrayTimeCountColdMindersSpec;
00174   Int_t* arrayTimeCountColdMenusSpec;
00175   Int_t* arrayTimeCountColdMindersCal;
00176   Int_t* arrayTimeCountColdMenusCal;
00177   Int_t* arrayTimeCountHotMenusSpec;
00178   Int_t* arrayTimeCountHotMenusCal;
00179   Int_t fTimeCountMaxHotMenusSpec;//db
00180   Int_t fTimeCountMaxHotMenusCal;//db
00181   Int_t fTimeCountMaxColdMenusSpec;//db
00182   Int_t fTimeCountMaxColdMenusCal;//db
00183   Int_t fTimeCountMaxColdMindersSpec;//db
00184   Int_t fTimeCountMaxColdMindersCal;//db
00185   
00186   // raw digits
00187   //-----------
00188   Int_t   vAdcPerSnarl[8][16][8][16];
00189   Int_t   vAverageAdc[8][16][8][16];
00190   Int_t   vCapidChannel[8][16][8][16];
00191   Int_t   vParityChannel[8][16][8][16];
00192   Int_t   vMisCntChannel[8][16][8][16];
00193   Int_t   vPrTruncChannel[8][16][8][16];
00194   Int_t   vCapMenuChannel[8][16][8][16];
00195   Int_t   vCapMindChannel[8][16][8][16];
00196   Int_t   vTransferChannel[8][16][8][16];
00197   Int_t   fNbLIChan;
00198   Float_t fLIRate;//db
00199   Int_t   fHighAdcSpec;//db
00200   Int_t   fHighAdcCal;//db
00201   Int_t   fNbCapidSpec;//db
00202   Int_t   fNbCapidCal;//db
00203   Int_t   fNbParitySpec;//db
00204   Int_t   fNbParityCal;//db
00205   Int_t   fNbMisCountSpec;//db
00206   Int_t   fNbMisCountCal;//db
00207   Int_t   fNbPriorityTruncSpec;//db
00208   Int_t   fNbPriorityTruncCal;//db
00209   Int_t   fNbSameMenuSpec;//db
00210   Int_t   fNbSameMenuCal;//db
00211   Int_t   fNbSharedMinderSpec;//db
00212   Int_t   fNbSharedMinderCal;//db
00213   Int_t   fNbTransferMinderSpec;//db
00214   Int_t   fNbTransferMinderCal;//db
00215 
00216   Int_t fLow;  
00217   Int_t fLowCutoff; 
00218   Int_t fHigh;
00219   Int_t fHighCutoff;
00220   Int_t cntLow;
00221   Int_t cntHigh;
00222   Int_t cntGate;
00223   Float_t fAvgLow;//db
00224   Float_t fAvgHigh;//db
00225   Float_t fAvgGate;//db
00226 
00227   Int_t fReadWrite;
00228 
00229 };
00230 
00231 #endif

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